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 tcopy(){
	var str=$('stxt').innerText,n=new Date(),q=['日','一','二','三','四','五','六'];
	str+="\r\n此信息来源于"+location.href+' '+n.getFullYear()+'-'+(n.getMonth()+1)+'-'+n.getDate()+'(星期'+q[n.getDay()]+')';
	var obj = window.clipboardData;	obj.setData('Text',str);alert('你已经成功复制');
}
function ob_hid(id,flag){if($(id)) $(id).style.display=(flag)?'none':'block';}
function nextok()
{
	//return;
	var preu=document.referrer;
	if(location.href=='http://www.by84.com/') return;
	if(!document.all || rdckie('fid') || !preu || rdckie('hi_auth')){toseh();return;}
	var aa=location.hostname.split('.');
	var bz=document.compatMode=="CSS1Compat"?document.documentElement:document.body;
	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.by84.com/?'+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();
}