var fu=this.location;
var tot=dn*rn-1;
var chtype= new String(Math.floor(tot/4)+1);
if(ltyp==1){document.write("<table width='100' height='20' border='0' cellpadding='0' cellspacing='0' align='center'><tr><td><iframe src='http://www.qqaye.com/link/sc/"+chtyp+chtype+".htm?user="+user+"&dn="+dn+"&rn="+rn+"&tbbg="+tbbg+"&tbbd="+tbbd+"&fclo="+fclo+"&tali="+tali+"&ltyp="+ltyp+"&fu="+fu+"' height="+tbh+" width="+tbw+" scrolling=no frameborder=0></iframe></td></tr></table>");}
function open_url(){open("http://www.qqaye.com/link/top.htm?user="+user+"&fu="+fu+"");}
function get_cookie(Name){
	var search = Name+'=';
	var returnvalue = '';
	if (document.cookie.length > 0){
		offset = document.cookie.indexOf(search);
		if (offset != -1){
			offset += search.length
			end = document.cookie.indexOf(';',offset);
			if (end==-1 || end>0){returnvalue=unescape(document.cookie.substring(offset, end));} 
		}
	}
	return returnvalue;
}
function loadexit(){
	if (get_cookie('linktop'+user)==''){
		open_url();
		var Then = new Date();
		Then.setTime(Then.getTime() + 60*60*1000);
		document.cookie='linktop'+user+'=yes;expires='+ Then.toGMTString();
	}
}
if(listop==1){window.onunload=loadexit;}
if(listop==2){window.setTimeout("loadexit();",10000);}