function GetCookie(name)
{
var arg=name+ "=";
var alen=arg.length;
var clen=document.cookie.length;
var i=0;
while (i<clen) {
var j=i+alen;
if(document.cookie.substring(i,j)
==arg)
return getCookieVal(j);
i=document.cookie.indexOf("",i)+1;
if(i==0)break;
}
return null;
}
function getCookieVal(offset) {
var endstr=document.cookie.indexOf
(";",offset);
if(endstr==-1) //没有指定其他元素
endstr=document.cookie.length;
return unescape(document.cookie.substring
(offset,endstr));
}
function Get()
{
if (cookieEnabled)
{
var CookieArea = GetCookie('zz_area');
//var CookieArea = "CNC";
if (CookieArea == "CNC")
{
document.getElementById('loading').style.display='';
document.getElementById('setarea').style.display='none';
this.location = "http://cnc.no-sky.com/index.php";
}
else
{
//判断电信线路
if (CookieArea == "TEL")
{
document.getElementById('loading').style.display='';
document.getElementById('setarea').style.display='none';
this.location = "http://dx.no-sky.com/index.php";
}
//判断移动线路
if (CookieArea == "YD")
{
document.getElementById('loading').style.display='';
document.getElementById('setarea').style.display='none';
this.location = "http://www.no-sky.com/index.php";
}
else
{
document.getElementById('setarea').style.display='';
}
}
}
else
{
this.location = "http://www.no-sky.com/index.php";
}
}
function SetCNC()
{
var mydate = new Date();
mydate.setTime(mydate.getTime() + 315360000000);
document.cookie = "zz_area=CNC;expires="+ mydate.toGMTString() + ";domain=no-sky.com";
Get();
}
function SetTEL()
{
var mydate = new Date();
mydate.setTime(mydate.getTime() + 315360000000);
document.cookie = "zz_area=TEL;expires=" + mydate.toGMTString() + ";domain=no-sky.com";
Get();
}
function SetYD()
{
var mydate = new Date();
mydate.setTime(mydate.getTime() + 315360000000);
document.cookie = "zz_area=YD;expires=" + mydate.toGMTString() + ";domain=no-sky.com";
Get();
}
</script>
<body onload="Get()">
<table width="100%" height="180" border="0" cellspacing="0">
<tr>
<td align="center" valign="bottom"><img src="http://wwwno-sky.com/images/wzlogo.gif" width="180" height="60" /></td>
</tr>