img01 = new Image();
img01.src = "pic/m1.gif";
img02 = new Image();
img02.src = "pic/m2.gif";
img03 = new Image();
img03.src = "pic/m3.gif";
img04 = new Image();
img04.src = "pic/m4.gif";
img05 = new Image();
img05.src = "pic/m5.gif";
img06 = new Image();
img06.src = "pic/m6.gif";

img01a = new Image();
img01a.src = "pic/m1a.gif";
img02a = new Image();
img02a.src = "pic/m2a.gif";
img03a = new Image();
img03a.src = "pic/m3a.gif";
img04a = new Image();
img04a.src = "pic/m4a.gif";
img05a = new Image();
img05a.src = "pic/m5a.gif";
img06a = new Image();
img06a.src = "pic/m6a.gif";

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 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 newwindow1()
{
	window.open("picview.php?id=proezd_1.jpg", "_blank", "Width=583 Height=640");
	return false;
}

function newwindow2()
{
	window.open("picview.php?id=proezd_2.jpg", "_blank", "Width=488 Height=425");
	return false;
}

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;
}





