<!--

//setTimeout("iAdsFloatingClose()", 50000);	

var strBrowserType = "";
var intTopMargin = 0;
var intLeftMargin = 0;
function iAdsStartFloat() {
	if(document.all) {
		//intTopMargin	=	(document.body.clientHeight/ 2) - (document.all.iAdsFloatingItem.offsetHeight / 2);
		//intLeftMargin	=	(document.body.clientWidth / 2) - (document.all.iAdsFloatingItem.offsetWidth / 2);
		strBrowserType = 'IE';

		document.all.iAdsFloatingItem.style.pixelTop = intTopMargin;
		document.all.iAdsFloatingItem.style.pixelLeft = intLeftMargin;
		document.all.iAdsFloatingItem.style.visibility = 'visible';		
	}
	else if(document.getElementById) {
		//intTopMargin	=	(window.innerHeight / 2) - (parseInt(document.getElementById('iAdsFloatingItem').style.height) / 2);
		//intLeftMargin	=	(window.innerWidth / 2) - (parseInt(document.getElementById('iAdsFloatingItem').style.width) / 2);

		document.getElementById('iAdsFloatingItem').style.top = (intTopMargin) + 'px';
		document.getElementById('iAdsFloatingItem').style.left = (intLeftMargin) + 'px';
		document.getElementById('iAdsFloatingItem').style.visibility = 'visible';
		strBrowserType = 'FIREFOX';
	}

	if (document.all) { window.onscroll = iAdsFloating; }
	else { setInterval('iAdsFloating()', 100); }
}
function iAdsFloating() {	
	//document.all.iAdsFloatingItem.style.pixelTop = document.body.scrollTop + intTopMargin;
	if (strBrowserType == 'IE') { 
		if (document.body.scrollTop <= 0) { // HTML 4.01 Transitional
			document.all.iAdsFloatingItem.style.pixelTop = document.documentElement.scrollTop + intTopMargin;
		}
		else { 
			document.all.iAdsFloatingItem.style.pixelTop = document.body.scrollTop + intTopMargin;
		}		
	}
	else if (strBrowserType == 'FIREFOX') { document.getElementById('iAdsFloatingItem').style.top = (window.pageYOffset + intTopMargin) + 'px';  }
}
function iAdsFloatingClose() {	
	document.getElementById('iAdsFloatingItem').style.display="none";
	//alert("iAdsFloationgClose");
}
function iAdsFloating_DoFSCommand(command, args) { 
	if (command == "iAdsFloationgClose") { 
		iAdsFloatingClose();
	}
}
function iAdsFloationgIE7Close() {	
	//alert("Click iAdsFloationgIE7Close");
	iAdsFloatingClose();
}

document.write('<span id="iAdsFloatingItem" style="z-index: 5000; position: absolute; visibility: hidden; width:100%; height:100%;">');
document.write('<table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%" bgcolor="#666666" style="opacity: 0.8;filter: alpha(opacity=80);">');
document.write('<tr><td align="center" valign="middle">');
document.write('<table width="1000" height="620" border="0" cellspacing="0" cellpadding="0" style="opacity: 1.0;filter: alpha(opacity=100);"><tr><td align="right" valign="bottom" height="20" bgcolor="#666666"><a href="javascript:iAdsFloatingClose();"><img src="images/ic_close.gif" border="0" width="65" height="20"></a></td></tr>');
document.write('<tr><td align="center" valign="middle">');
//document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" width="1000" height="600" name="iAdsFloating633">');
//document.write('<param name="movie" value="http://58.181.255.2/sansiri_wyne_final.swf">');
////document.write('<param name="wmode" value="transparent">');
//document.write('<param name="quality" value="high">');
//document.write('<param name="AllowScriptAccess" value="always" />');
//document.write('<param name="menu" value="false">');
////document.write('<param name="FlashVars" value="AdsId=633">');
////document.write('<embed src="/th/event/project/townplus/FloatingAd.swf" FlashVars="AdsId=633" AllowScriptAccess="always" wmode="transparent" quality="high" menu="false" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="512" height="360" name="TownPlus" swLiveConnect="true"></embed>');
//document.write('<embed src="http://58.181.255.2/sansiri_wyne_final.swf" FlashVars="AdsId=633" AllowScriptAccess="always" quality="high" menu="false" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="1000" height="600" name="Wyne" swLiveConnect="true"></embed>');
//document.write('</object>');
document.write("<iframe id='floating' frameborder='0' scrolling='no' src='http://58.181.255.2/' width='1000' height='600' marginheight='0' marginwidth='0'></iframe>");
document.write('</td></tr></table>');
document.write('</td></tr>');
document.write('</table>');
document.write('</span>');
iAdsStartFloat();

-->