
var hold;
hold=1000*3600*24;

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

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";

		function getQueryString(index)
		{
			var paramExpressions;
			var param
			var val
			paramExpressions = window.location.search.substr(1).split("&");
			if (index < paramExpressions.length)
			{
				param = paramExpressions[index]; 
				if (param.length > 0) {
					return eval(unescape(param));
				}
			}
			return ""
		}

function makevisible(id,Step,t)
{
	cur=getobjbyid(id);
	
	Start=80;
	End=100;
	Wait=50;

	if( ((Step>0)&&(t<End)) || ((Step<0)&&(t>Start)) )
	{
		t=t+Step;
		s="makevisible("+id+","+Step+","+t+");";
		setTimeout(s, Wait);
	}

	cur.filters.alpha.opacity=t;
//	window.status=cur+" "+Step+" "+t;
}

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 clearPreloadPage()
{ //DOM
	if (document.getElementById)
	{
		document.getElementById('prepage').style.visibility='hidden';
	}
	else
	{
		if (document.layers)
		{ //NS4
			document.prepage.visibility = 'hidden';
		}
		else
		{ //IE4
			document.all.prepage.style.visibility = 'hidden';
		}
	}
}


