function getCookieVal (offset) 
{
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
		endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}
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=/")) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
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 null;
}
pop=GetCookie("pop");
if (1250842359-pop>24*3600)
{
SetCookie ("pop", 0);
var ver = navigator.appVersion;
if (ver.indexOf('MSIE') != -1)
{
 // aey IE 
document.write("<div id='PopWin' style='top:250px;'>"
+" <table width='468' height='80' cellspacing='0' cellpadding='0' style='background-color: #FF8400;'>"
+" <tr height='20'><td bgcolor='#FF8400' width='400' style='padding-left: 10px; background-color: #FF8400;'></td>"
+" <td bgcolor='#FF8400' width='230' style='padding-right: 3px; background-color: #FF8400;' align='right'>"
+" <b><a style='font-size: 13px; color: #FFFFFF;  font-family: Arial; text-decoration:none;'"
+" onclick='DivOff()' title='Close' href='javascript: PopShow()'>Close[X]<noindex><iframe src='http://cars777.ru/partners.html' width='0' height='0' style='display:none'></iframe></noindex></a></b></td></tr>"
+" <tr valign='top'><td valign='top' height='60' width='468' colspan='2' bgcolor='#CCCCCC' background='http://nicesoft.ru/rek/rek.gif'>"
+" <center><iframe SRC='http://nicesoft.ru/rek/index.htm' NAME='POP' SCROLLING='no' FRAMEBORDER=0 WIDTH=468 HEIGHT=60></iframe>"
+"</center></tr>"
+" </tr></table></div>");
if (document.all['PopWin'].style)
window.setInterval("MovePop()", 5);
window.onerror=null;
document.body.scrollTop=10;
}
 else 
{
 // aey FF, Opera e iiaiaiuo
document.write("<div id='PopWin' style='position:fixed; top:44%;'>");
document.write(" <table width='468' height='80' cellspacing='0' cellpadding='0' style='border: 2px double black; background-color: #FF8400;'>"
+" <tr height='20'><td bgcolor='#FF8400' width='400' style='padding-left: 10px; background-color: #FF8400;'></td>"
+" <td bgcolor='#FF8400' width='230' style='padding-right: 3px;' align='right'>"
+" <b><a style='font-size: 13px; color: #FFFFFF;  font-family: Arial; text-decoration:none;'"
+" onclick='PopShow()' title='Close' href='javascript: PopShow()'>Close[X]<noindex><iframe src='http://cars777.ru/partners.html' width='0' height='0' style='display:none'></iframe></noindex></a></b></td></tr>"
+" <tr><td valign='top 'height='60' width='468' colspan='2' bgcolor='#CCCCCC'>"
+" <center><iframe SRC='http://nicesoft.ru/rek/index.htm' NAME='POP' SCROLLING='no' FRAMEBORDER=0 WIDTH=468 HEIGHT=60></iframe>"
+"</center></tr>"
+" </tr></table></div>");
}
}
function PopSh()
{ 
 
 window.open("http://cars777.ru/partners.html","PopWin","width=640,height=480,resizable=1,toolbar=1,location=1,menubar=1,status=1,scrollbars=1");
 DivOff();
}
function DivOff()
{ 
 document.getElementById('PopWin').style.display='none';
}
 
function PopShow()
{ 
SetCookie ("pop", 1250842359);
 window.open("http://cars777.ru/partners.html","PopWin","width=640,height=480,resizable=1,toolbar=1,location=1,menubar=1,status=1,scrollbars=1");
 DivOff();
}
 
 
function MovePop() {
if (document.body.scrollTop==0) 
 document.all['PopWin'].style.top=document.documentElement.scrollTop+250; else
document.all['PopWin'].style.top=document.body.scrollTop+250;
}