var  url =  new  Array("http://www.kubao.com/",
		"http://www.kubao.com/rjxz.shtml",
		"http://login.kubao.com/update_im.htm",
		"http://sns.kubao.com/",
		"http://www.kubao.com/zfbz.shtml",
		"http://www.kubao.com/cpys.shtml",
		"http://www.kubao.com/wzkb.shtml",
		"http://blog.kubao.com/default.aspx",
		"http://login.kubao.com/activity/Freefee.aspx");
var  img1 =  new  Array("images/20080129/kbsy_01.jpg",
		"images/20080129/rjxz_01.jpg",
		"images/20080129/zhcz_01.gif",
		"images/20080129/zhgl_01.jpg",
		"images/20080129/zfbz_01.jpg",
		"images/20080129/cpys_01.jpg",
		"images/20080129/kbts_01.jpg",
		"images/20080129/kbbk_01.jpg",
		"images/2009/mfhf_01.gif");
var  img2 =  new  Array("images/20080129/kbsy_02.jpg",
		"images/20080129/rjxz_02.jpg",
		"images/20080129/zhcz_02.jpg",
		"images/20080129/zhgl_02.jpg",
		"images/20080129/zfbz_02.jpg",
		"images/20080129/cpys_02.jpg",
		"images/20080129/kbts_02.jpg",
		"images/20080129/kbbk_02.jpg",
		"images/2009/mfhf_02.jpg");

	document.write("<table width='898' border='0' align=center cellpadding='0' cellspacing='0' >");
	document.write("<tr>");
	document.write("<td align=center>");
	document.write("<iframe scrolling='no' frameborder='0' height='31' width='896' src='http://login.kubao.com/imlogin.aspx' ></iframe>");
	document.write("</td>");
	document.write("</tr>");
	document.write("</table>");
	document.write("<table width='898' border='0' align='center' cellpadding='0' cellspacing='0' background='http://www.kubao.com/images/20080129/08127yule_5.jpg'>");
	document.write("<tr>");
    document.write("<td width='297' height='86' align='center' bgcolor='#FFFFFF'><img src='http://www.kubao.com/images/20080129/08127yule_40.jpg'></td>");
    document.write("<td width='102' background='http://www.kubao.com/images/20080129/08127yule_9.jpg' bgcolor='#FFFFFF'></td>");
    document.write("<td><a href='http://www.kubao.com/Entertainment.htm'><img src='http://www.kubao.com/images/20080129/08127yule_6.jpg' hspace='10'></a></td>");
    document.write("<td><a href='http://union.kubao.com/'><img src='http://www.kubao.com/images/20080129/08127yule_7.jpg' hspace='12'></a></td>");
    document.write("<td><a href='http://card.kubao.com/'><img src='http://www.kubao.com/images/20080129/08129yule_8.jpg' hspace='12'></a></td>");
    document.write("<td width='150'><a href='http://help.kubao.com/index.shtml'><img src='http://www.kubao.com/images/20080129/08127yule_8.jpg' hspace='6'></a></td>");
	document.write("</tr>");
	document.write("</table>");
	
	var topurl = window.location.href; 
	document.write("<table width='898' height='38' border='0' align='center' cellpadding='0' cellspacing='0'>");
	document.write("  <tr>");
	document.write("<td background='http://www.kubao.com/images/20080129/08127yule_10.jpg'><table width='100%' height='38' border='0' cellspacing='0' cellpadding='0'>");
	document.write("<tr>");
	document.write("<td width='15'>&nbsp;</td>");
	for (i = 0; i < url.length; i++)
	{
		if(url[i] == topurl)
		{
			document.write("<td width='29'><a href='"+url[i]+"'><img src='http://www.kubao.com/"+img2[i]+"' width='82' height='29'></a></td>");
			//document.write("<td width='29'><a href='#' onclick='javascript:window.location.href="+url[i]+"'><img src='http://www.kubao.com/"+img2[i]+"' width='82' height='29'></a></td>");
		}
		else
		{
			document.write("<td width='29'><a href='"+url[i]+"'><img src='http://www.kubao.com/"+img1[i]+"' width='82' height='29'></a></td>");
			//document.write("<td width='29'><a href='#' onclick='javascript:window.location.href="+url[i]+"'><img src='http://www.kubao.com/"+img1[i]+"' width='82' height='29'></a></td>");
		}
	}
	document.write("<td width='49'>&nbsp;</td>");
	document.write("<td><img src='http://www.kubao.com/images/20080129/top_cnc.jpg' width='170' height='38'></td>");
	document.write("</tr>");
	document.write("</table></td>");
	document.write("</tr>");
	document.write("</table>");
	
	document.write("<table width='898' border='0' style='-webkit-text-size-adjust:none;' align='center' cellpadding='0' cellspacing='0' background='http://www.kubao.com/images/20080129/08127index-1.jpg'>");
	document.write("<tr>");
    document.write("<td width='120' height='25' align='center'><a href='http://login.kubao.com/activity/urldown.aspx?unionid=1000'><img src='http://www.kubao.com/images/20080129/08127index-2.jpg' width='67' height='15'></a></td>");
    document.write("<td width='166'><a href='http://updateim.kubao.com/update/KubaoPhone/installer/kubaomsg.exe' class='kb_wd6'>下载最新版本</a></td>");
    document.write("<td width='49' align='center'><a href='#' class='kb_wd6'>News</a></td>");
    document.write("<td width='18' align='center'><img src='http://www.kubao.com/images/20080129/08127index-22.jpg' width='5' height='9'></td>");
    document.write("<td width='250'><div class='kb_wd9' id='mq' name='mq' style='width:100%;height:16px;overflow:hidden' onmouseover='iScrollAmount=0' onmouseout='iScrollAmount=1'>");
　　document.write("<a href='http://sns.kubao.com/'>酷宝社区，全新闪亮登场！！！</a><br/>");
　　document.write("<a href='http://ivr.kubao.com'>炫酷彩语&nbsp;尽在酷宝</a><br/>");
	document.write("</div>");
var oMarquee = document.getElementById("mq"); //滚动对象
var curl = location.href;
var furl = document.referrer
var iLineHeight = 17; //单行高度，像素
var iLineCount = 2; //实际行数
var iScrollAmount = 1; //每次滚动高度，像素
function run() {
oMarquee.scrollTop += iScrollAmount;
if ( oMarquee.scrollTop == iLineCount * iLineHeight )
oMarquee.scrollTop = 0;
if ( oMarquee.scrollTop % iLineHeight == 0 ) {
window.setTimeout( "run()", 2000 );
} else {
window.setTimeout( "run()", 50 );
}
}
oMarquee.innerHTML += oMarquee.innerHTML;
window.setTimeout( "run()", 2000 );
	document.write("</td>");
    document.write("<td width='335' align='center'>酷宝已经被下载:<span id='KBDownCount' class='kb_wd6'></span> 次</td>");
	document.write("</tr>");
	document.write("</table>");
	document.write("<div style=\"position:absolute; top:0; width:100%;\"><iframe scrolling=\"auto\" src=\"http://login.kubao.com/WebVisitCount.aspx?furl="+furl+"&surl="+curl+"\" height=\"0\" frameborder=\"0\"></iframe></div>");
	var h=document.getElementsByTagName("head")[0];
	function loadScript(url)
	{   
		var f = document.createElement("script");   
		f.type="text/javascript";   
		f.src= url;   
		h.appendChild(f);   
	}
	loadScript("http://login.kubao.com/getAllDownCount.aspx");
	
	var obj,unid,unkey,mac,url,paras;
	//建立对象
	function createXMLHttpRequest()
	{
		if(window.ActiveXObject)
		{
			obj=new ActiveXObject("Microsoft.XMLHTTP");
		}
		else if(window.XMLHttpRequest)
		{
			obj=new XMLHttpRequest();
		}
	}
	url = document.location.href.split('?')[1];
	if(url != null)
	{
		paras = url.split('&');
		if (paras.length == 4)
		{
			unid = paras[1].split('=')[1];
			unkey = paras[2].split('=')[1];
			mac = paras[3].split('=')[1];
			alert('http://login.kubao.com/ReceiveSetup.aspx?u='+unid+'&k='+unkey+'&m='+mac);
			createXMLHttpRequest();
			obj.onreadystatechange=getReqText;
			obj.open("GET",'http://login.kubao.com/ReceiveSetup.aspx?u='+unid+'&k='+unkey+'&m='+mac,true);
			obj.send(null);
		}
		
	}
	function getReqText()
	{
		
	}

	
	

