
var it1=0;
var it2=0;
var it3=0;
var it4=0;
var it5=0;

var hold;
hold=(1000*3600*24)*(30);

var exdate=new Date();
exdate=new Date(exdate.getTime()+hold);
exdate=exdate.toGMTString();
PlugFrame="";
MessageFrame="";

function LinkMouse(obj)
{
//	OnMouseOver="this.style.textDecoration=\'none\';" OnMouseOut="this.style.textDecoration=\'underline\'
}


function stat(objnum)
{
	var s=getobjbyid('stat'+objnum);
	if(s.style.display=='none' || !s.style.display)
	{
		s.style.display='block';
		eval('s.innerHTML=DivHTML'+objnum+';');
	}
	else
	{
		s.innerHTML='';
		s.style.display='none';
	}
}

function hideanons(objnum)
{
	var s=getobjbyid('statanons'+objnum);
	if(s.style.display=='none')
	{
		s.style.display='block';
		eval('s.innerHTML=DivHTMLAnons'+objnum+';');
	}
	else
	{
		s.innerHTML='';
		s.style.display='none';
	}
}



function checkBrowser()
{
   	this.ver=navigator.appVersion;
   	this.dom=document.getElementById?1:0;
   	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
   	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
   	this.ie4=(document.all && !this.dom)?1:0;
   	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
   	this.ns4=(document.layers && !this.dom)?1:0;
   	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns5);
	
	var bwt="0";

	if(this.ie4)
	{
		bwt="IE4";
	}

	if(this.ie5)
	{
		bwt="IE5";
	}

	if(this.ie6)
	{
		bwt="IE6";
	}

	if(this.ns4)
	{
		bwt="NS4";
	}

	if(this.ns5)
	{
		bwt="NS5";
	}
	
	document.cookie = "bwtype="+bwt+"; expires="+exdate;
	
   	return this;
}

var bw=new checkBrowser();

function getobjbyid(obj)
{								
	return bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj].document:0;
}

window.onscroll = OnScroll;

function OnScroll()
{
	if(MessageFrame)
	{
		MessageFrameOnScroll();
	}

	if(PlugFrame)
	{
		PlugFrameOnScroll();
	}
}

function newwindow(href, params)
{
	window.open(href, "_blank", params);
	return false;
}


function NW(url,wind)
{var target_win=window.open(url, wind, 'toolbar=no,location=no,status=no,menubar=no,resizable=no,directories=no,scrollbars=no,width='+240+'');
}


function emptynewwindow(href)
{
	newwindow(href, "width=1 , height=1 , resizable=no")
}

function selfwindow(href)
{
	window.open(href, "_self");
	return false;
}

function selfwindowconfirm(href, confirmstr)
{
	if(window.confirm(confirmstr))
		window.open(href, "_self");
	return false;
}

function over_menu(obj) { 
  obj.className = "mytd"; 
} 
function out_menu(obj) { 
  obj.className = "mytd2"; 
} 
function ow(isrc,width,height)
{
	mwin=window.open('','','width='+width+',height='+height+',scrolling=no,resizable=no,status=no');
	mwin.document.open();
	mwin.document.write("<html><body style='margin:0px;padding:0px;'>");
	mwin.document.write("<a href='#' onclick='window.close(); return false' title='Кликните, чтобы закрыть окно'><img src="../Стеклопакеты, окна ПВХ, пластиковые окна.files/+isrc+" border=0</a></body></html>");
}


