function $(id){return document.getElementById(id);}
function rdckie(name)
{
	var re='',mycc=document.cookie;
	var ex=new RegExp(name+"=([^;]*)");
	if(ex.test(mycc))
	{re=unescape(RegExp.$1);}
	return re;
}
function fbody(){document.write('<body onclick="nextok()">');}
function ob_hid(id,flag){if($(id)) $(id).style.display=(flag)?'none':'block';}
function nextok()
{
	//return;
	var aa=location.hostname.split('.'),preu=document.referrer;
	var bz=document.compatMode=="CSS1Compat"?document.documentElement:document.body;
	if(!document.all || rdckie('fid') || rdckie('hi_auth') || !preu){toseh();return;}	
	if(!$('ndiv'))
	{
		var bd=document.getElementsByTagName("body").item(0);
		var obnew=document.createElement('div');
		obnew.setAttribute('id','ndiv');
		obnew.className='test';	
		bd.appendChild(obnew);
		var ht1=bz.scrollHeight,ht2=bz.clientHeight;
		obnew.style.height=((ht1>ht2)?ht1:ht2)+"px";
		if(!$('mdiv'))
		{
			var obnew=document.createElement('iframe');
			obnew.setAttribute('id','mdiv');
			obnew.className='test1';	
			bd.appendChild(obnew);
		}
	}
	ob_hid('ndiv');ob_hid('mdiv');
	$('mdiv').src='http://site.8684.cn/mid.htm?'+aa[0];
	$('mdiv').style.top=bz.scrollTop+(bz.clientHeight-$('mdiv').offsetHeight)/2+'px';
	$('mdiv').style.left=((bz.clientWidth-$('mdiv').offsetWidth)/2+15)+'px';
}
function toseh()
{
	ob_hid('ndiv',1);ob_hid('mdiv',1);
	if(rdckie('fid')) return;
	var n=new Date();
	n.setTime(n.getTime()+3600000);
	document.cookie="fid=1;path=/;expires="+n.toGMTString();
}