var sogou_1_arrUrls=new Array();
sogou_1_arrUrls[0]="http://www.sogou.com/fuwu/case/case_hzp_01.html";
sogou_1_arrUrls[1]="http://www.sogou.com/fuwu/case/case_sw_01.html";
sogou_1_arrUrls[2]="http://www.sogou.com/fuwu/case/case_jx_01.html";
sogou_1_arrUrls[3]="http://www.sogou.com/fuwu/case/case_jy_01.html";
sogou_1_arrUrls[4]="http://www.sogou.com/fuwu/case/case_ly_01.html";
sogou_1_arrUrls[5]="http://www.sogou.com/fuwu/case/case_jp_01.html";
sogou_1_arrUrls[6]="http://www.sogou.com/fuwu/case/case_qc_01.html";
sogou_1_arrUrls[7]="http://www.sogou.com/fuwu/case/case_it_01.html";
sogou_1_arrUrls[8]="http://www.sogou.com/fuwu/case/case_jd_01.html";
sogou_1_arrUrls[9]="http://www.sogou.com/fuwu/case/case_jr_01.html";
sogou_1_arrUrls[10]="http://www.sogou.com/fuwu/case/case_zx_01.html";
sogou_1_arrUrls[11]="http://www.sogou.com/fuwu/case/case_hx_01.html";
sogou_1_arrUrls[12]="http://www.sogou.com/fuwu/case/case_wj_01.html";
sogou_1_arrUrls[13]="http://www.sogou.com/fuwu/case/case_sb_01.html";
sogou_1_arrUrls[14]="http://www.sogou.com/fuwu/case/case_cy_01.html";
sogou_1_arrUrls[15]="http://www.sogou.com/fuwu/case/case_qc_02.html";

var sogou_show_url="";

function PopupDemo(id)
{
	sogou_show_url = sogou_1_arrUrls[id]
		closeDiv();
	popup();
	getMsg();
}

var divTop, divLeft, divWidth, divHeight, docHeight, docWidth, objTimer, timecounter = 0;
function getMsg() {
	try {
		divTop = parseInt(document.getElementById("SogouTSepop").style.top, 10);
		divLeft = parseInt(document.getElementById("SogouTSepop").style.left, 10);
		divHeight = parseInt(document.getElementById("SogouTSepop").offsetHeight, 10);
		divWidth = parseInt(document.getElementById("SogouTSepop").offsetWidth, 10);
		docWidth = document.body.clientWidth;
		docHeight = document.body.clientHeight;
		document.getElementById("SogouTSepop").style.top = parseInt(document.body.scrollTop, 10) + docHeight + 10;
		document.getElementById("SogouTSepop").style.left = parseInt(document.body.scrollLeft, 10) + docWidth - divWidth;
		document.getElementById("SogouTSepop").style.visibility = "visible";
		objTimer = window.setInterval("moveDiv('self')", 1);
	}
	catch (e) {
	}
}
function resizeDiv() {
	try {
		divHeight = parseInt(document.getElementById("SogouTSepop").offsetHeight, 10);
		divWidth = parseInt(document.getElementById("SogouTSepop").offsetWidth, 10);
		docWidth = document.body.clientWidth;
		docHeight = document.body.clientHeight;
		document.getElementById("SogouTSepop").style.top = docHeight - divHeight + parseInt(document.body.scrollTop, 10);
		document.getElementById("SogouTSepop").style.left = docWidth - divWidth + parseInt(document.body.scrollLeft, 10);
	}
	catch (e) {
	}
}
function resizeDiv_parent() {
	try {
		divHeight = parseInt(parent.document.getElementById("SogouTSepop").offsetHeight, 10);
		divWidth = parseInt(parent.document.getElementById("SogouTSepop").offsetWidth, 10);
		docWidth = parent.document.body.clientWidth;
		docHeight = parent.document.body.clientHeight;
		parent.document.getElementById("SogouTSepop").style.top = docHeight - divHeight + parseInt(parent.document.body.scrollTop, 10);
		parent.document.getElementById("SogouTSepop").style.left = docWidth - divWidth + parseInt(parent.document.body.scrollLeft, 10);
	}
	catch (e) {
	}
}
function moveDiv(str) {
	try {
		if ( str=="self") {
			if (parseInt(document.getElementById("SogouTSepop").style.top, 10)<=(docHeight-divHeight+parseInt(document.body.scrollTop,10))) {
				if (objTimer) window.clearInterval(objTimer);
				objTimer = window.setInterval("resizeDiv()", 3);
			}
			divTop = parseInt(document.getElementById("SogouTSepop").style.top, 10);
			document.getElementById("SogouTSepop").style.top = divTop - 10;
		} else {
			if (parseInt(parent.document.getElementById("SogouTSepop").style.top, 10)<=(docHeight-divHeight+parseInt(parent.document.body.scrollTop,10))) {
				if (objTimer) window.clearInterval(objTimer);
				objTimer = window.setInterval("resizeDiv_parent()", 3);
			}
			divTop = parseInt(parent.document.getElementById("SogouTSepop").style.top, 10);
			parent.document.getElementById("SogouTSepop").style.top = divTop - 10;
		}
	}
	catch (e) {
	}
}
function closeDiv() {
	document.getElementById("SogouTSepop").style.visibility = "hidden";
	if (objTimer) window.clearInterval(objTimer);
}

function popup() 
{
	var popup,popstr,popClose,adurl;
	adurl = sogou_show_url;
	if (adurl == "")
		return;
	popClose="closeDiv()";
	popstr = "<table width=600 border=\"0\" cellspacing=\"0\"><tr><td><IFRAME marginwidth=0 marginheight=0  frameborder=0 bordercolor=\"000000\" scrolling=no  width=600 height=450 src='"+adurl+"'></IFRAME></td></tr><tr><td valign=\"middle\" align=\"left\"><img src=\"http://www.sogou.com/fuwu/images/Max_close.gif\" width=\"80\" height=\"11\" usemap=\"#SogouAdMap\" border=0><map name=\"SogouAdMap\"><area shape=\"rect\" coords=\"42,0,80,11\" onclick=\""+popClose+";\"><area shape=\"rect\" coords=\"0,0,37,11\" onclick=\"window.open('"+adurl+"','newwin','width="+screen.availWidth+",height="+screen.availHeight+",toolbar=yes,location=yes,menubar=yes,scrollbars=yes,resizable=yes');"+popClose+";\"></map></td></tr></table>";
	popup = document.getElementById("SogouTSepop");
	popup.innerHTML = popstr;
	window.onload = getMsg;
	window.onresize = resizeDiv;
}


document.write("<div id=\"SogouTSepop\" style=\"VISIBILITY:hidden; POSITION:absolute; TOP:0px; BORDER:1px #000000 solid;WIDTH:606;;padding:2;HEIGHT:456; background-color:#FFFFFF\"></div>");


