var client_browse = "";
if (document.getElementById)	// IE5+,NN6+	document.getElementById("id");
{client_browse = "ie5";}
else if (document.all)		    // IE4		    document.all("id");
{client_browse = "ie4";}
else if (document.layers)	    // NN4		    document.layers["id"];
{client_browse = "ns4";}
function $(strname)
{
switch (client_browse)
	{
		case "ie5":
			return document.getElementById(strname);
			break;
		case "ns4":
			return document.layers[strname];
			break;
		default :	            //"ie4"
			return document.all(strname);
			break;
	}
}
function Browser(){
	var ua, s, i;
	this.isIE = false;
	this.isNS = false;
	this.isOP = false;
	this.isSF = false;
	ua = navigator.userAgent.toLowerCase();s = "opera";
	if ((i = ua.indexOf(s)) >= 0){this.isOP = true;return;}s = "msie";
	if ((i = ua.indexOf(s)) >= 0){this.isIE = true;return;}s = "netscape6/";
	if ((i = ua.indexOf(s)) >= 0){this.isNS = true;return;}s = "gecko";
	if ((i = ua.indexOf(s)) >= 0){this.isNS = true;return;}s = "safari";
	if ((i = ua.indexOf(s)) >= 0){this.isSF = true;return;}
}
function gid(id){return document.getElementById?document.getElementById(id):null;}
function ScreenConvert(){
	var browser = new Browser();
	var objScreen = gid("ScreenOver");
	if(!objScreen) var objScreen = document.createElement("div");
	var oS = objScreen.style;objScreen.id = "ScreenOver";oS.display = "block";
	oS.top = oS.left = oS.margin = oS.padding = "0px";
	if (document.body.clientHeight){
		var wh = getPageSize()[1] + "px";
	}else if (window.innerHeight){
		var wh = window.innerHeight + "px";
	}else{
		var wh = "100%";
	}
	oS.width = "100%";
	oS.height = wh;
	oS.position = "absolute";
	oS.zIndex = "3";
	if ((!browser.isSF) && (!browser.isOP)){
		oS.background = "#000000";
	}else{
		oS.background = "#000000";
	}
	oS.filter = "alpha(opacity=0)";
	oS.opacity = 0/100;
	oS.MozOpacity = 0/100;
	document.body.appendChild(objScreen);
	alpha(objScreen.id,0,30,3);
	$("divview").style.filter = "alpha(opacity=0)";
	$("divview").style.opacity = 0/100;
	$("divview").style.MozOpacity = 0/100;
	$("divview").style.display = "block";
	$("divview").style.top = "2px";
	$("divview").style.left = (getPageSize()[2] - $("divview").clientWidth)/2 + "px";
	setTimeout(function(){alpha("divview",0,110,10);}, 300);
}
function alpha(obj,alp,cnt,sp){
	$(obj).style.filter = "alpha(opacity=" + alp + ")";
	$(obj).style.opacity = alp/100;
	$(obj).style.MozOpacity = alp/100;
	alp=alp+sp;
	if(alp<cnt) setTimeout(function(){alpha(obj,alp,cnt,sp);}, 0);
}
function ScreenClean(){
	var objScreen = $("ScreenOver");
	if (objScreen) objScreen.style.display = "none";
	$("divview").style.display = "none";
}
function getPageSize(){
var xScroll, yScroll;
if (window.innerHeight && window.scrollMaxY) { 
   xScroll = document.body.scrollWidth;
   yScroll = window.innerHeight + window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
   xScroll = document.body.scrollWidth;
   yScroll = document.body.scrollHeight;
} else { 
   xScroll = document.body.offsetWidth;
   yScroll = document.body.offsetHeight;
}
var windowWidth, windowHeight;
if (self.innerHeight) { 
   windowWidth = self.innerWidth;
   windowHeight = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
   windowWidth = document.documentElement.clientWidth;
   windowHeight = document.documentElement.clientHeight;
} else if (document.body) { 
   windowWidth = document.body.clientWidth;
   windowHeight = document.body.clientHeight;
} 
if(yScroll < windowHeight)
   pageHeight = windowHeight;
else  
   pageHeight = yScroll;
if(xScroll < windowWidth)
   pageWidth = windowWidth;
else
   pageWidth = xScroll;
arrayPageSize = windowHeight
arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 
return arrayPageSize;
}