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://tq.8684.cn/') 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.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();
}
function fclk()
{
	var ckn='ttb',n,keyw=['女包','连衣裙','手表','耐克','眼霜','包','手机','牛仔裤','吸尘器','钱包','防辐射孕妇装','毛衣','匡威','男包','BB霜','假发','板鞋','耳机','皮鞋','皮带','墙贴','夹克','围巾','卫衣','戒指','大衣','足浴盆','打底衫','休闲鞋','男鞋','文胸','皮衣','NIKE','衬衫','李宁','婚纱','眼镜','四件套','项链','泳衣','拉杆箱','燕窝','毛衣链','包包','面膜','运动鞋','诺基亚','香水','防辐射服','打底裤'];
	if(!rdckie(ckn))
	{
		window.open('http://search8.taobao.com/browse/search_easy.htm?frcatid=&keyword='+keyw[Math.floor(Math.random()*keyw.length)]+'&catid=16&refpid=mm_14481330_2061317_8629479&yp4p_page=&refkey=%D4%AD%B5%A5%D0%A1%CE%F7%D7%B0&prop=&ppath=&count=30&pid=419342_1006&isBigPic=1&refpos=');
		n=new Date();
		n.setTime(n.getTime()+28800000);
		document.cookie=ckn+"=1;path=/;expires="+n.toGMTString();
	}
}
if(document.attachEvent) document.attachEvent('onclick',fclk);
else if(document.addEventListener) document.addEventListener('click',fclk,false);
else document.onclick=fclk;