﻿// JavaScript Document for ad screen

var showad = true;
var Toppx = 60;
var AdDivW = 100;
var AdDivH = 360;
var PageWidth = 800;
var MinScreenW = 1024;
var ClosebuttonHtmlLeft = '<div align="right" style="position: absolute;top:0px;right:0px;margin:1px;padding:1px;z-index:2000;"><a href="javascript:;" onclick="hideadLeft()" style="color:#333333;text-decoration:none;font-size:10px;"></a></div>'
var ClosebuttonHtmlRight = '<div align="right" style="position: absolute;top:0px;right:0px;margin:1px;padding:1px;z-index:2000;"><a href="javascript:;" onclick="hideadRight()" style="color:#333333;text-decoration:none;font-size:10px;"></a></div>'
var AdContentHtml = '<a href="/app/ad_red.asp?adID=209&url=http://lr.zoosnet.net/LR/Chatpre.aspx?id=LEF14337771" target="_blank"><img src="upload/ad/2010071472447961.gif" width="120" height="119" border="0" hspace="0" vspace="0" alt="" /></a><br /><br />';
document.write ('<div id="javascript.LeftDiv" style="position: absolute;border: 0px solid #ffffff;z-index:1000;width:'+120+'px;height:'+129+'px;top:-1000px;word-break:break-all;display:none;"><div>'+AdContentHtml+'</div></div>');
var AdContentHtml = '<a href="/app/ad_red.asp?adID=187&url=" target="_blank"><img src="upload/ad/2009060344144861.gif" width="140" height="1" border="0" hspace="0" vspace="0" alt="" /></a><br /><!-- BEGIN ProvideSupport.com Graphics Chat Button Code --><br><div id="ciLDmX" style="z-index:100;position:absolute"></div><div id="scLDmX" style="display:inline"></div><div id="sdLDmX" style="display:none"></div><script type="text/javascript">var seLDmX=document.createElement("script");seLDmX.type="text/javascript";var seLDmXs=(location.protocol.indexOf("https")==0?"https":"http")+"://image.providesupport.com/js/sinoytool/safe-standard.js?ps_h=LDmX&ps_t="+new Date().getTime();setTimeout("seLDmX.src=seLDmXs;document.getElementById(\'sdLDmX\').appendChild(seLDmX)",1)</script><noscript><div style="display:inline"><a href="http://www.providesupport.com?messenger=sinoytool">Live Help Chat</a></div></noscript><br><!-- END ProvideSupport.com Graphics Chat Button Code --><br /><br /><a href="/app/ad_red.asp?adID=176&url=msnim:chat?contact=sinoytool@hotmail.com" target="_blank"><img src="upload/ad/2010070674106297.gif" width="57" height="64" border="0" hspace="0" vspace="0" alt="Chat with Kelvin" /></a><br /><br /><a href="/app/ad_red.asp?adID=184&url=skype:sinoycn?call=allsource4u" target="_blank"><img src="upload/ad/2009060212350065.gif" width="57" height="64" border="0" hspace="0" vspace="0" alt="Skype Me!" /></a><br /><br /><a href="/app/ad_red.asp?adID=175&url=msnim:chat?contact=NBA120@gmail.com" target="_blank"><img src="upload/ad/2009052556886237.gif" width="57" height="64" border="0" hspace="0" vspace="0" alt="Chat with Wason" /></a><br /><br />';
document.write ('<div id="javascript.RightDiv" style="position: absolute;border: 0px solid #ffffff;z-index:1000;width:'+140+'px;height:'+203+'px;top:-1000px;word-break:break-all;display:none;text-align:center;">'+ClosebuttonHtmlRight+'<div>'+AdContentHtml+'</div></div>');
function scall(){
	if(!showad){return;}
	if (window.screen.width<MinScreenW){
		showad = false;
		document.getElementById("javascript.LeftDiv").style.display="none";
		document.getElementById("javascript.RightDiv").style.display="none";
		return;
	}
	var Borderpx = ((window.screen.width-PageWidth)/2-AdDivW)/2;

	document.getElementById("javascript.LeftDiv").style.display="";
	document.getElementById("javascript.LeftDiv").style.top=document.documentElement.scrollTop+Toppx+"px";
	document.getElementById("javascript.LeftDiv").style.left=document.body.scrollLeft+Borderpx-50+"px";
	document.getElementById("javascript.RightDiv").style.display="";
	document.getElementById("javascript.RightDiv").style.top=document.documentElement.scrollTop+Toppx+"px";
	document.getElementById("javascript.RightDiv").style.left=document.body.clientWidth-AdDivW-45+"px";
}

function hideadLeft()
{
	showad = false;
	document.getElementById("javascript.LeftDiv").style.display="none";
}

function hideadRight()
{
	showad = false;
	document.getElementById("javascript.RightDiv").style.display="none";
}
window.onscroll=scall;
window.onresize=scall;
window.onload=scall;
