window.onresize= GetWidth
window.onload= GetWidth

function ReloadWin()
{
	window.location.reload();
}

var winW;
var winH;
var screen_left = 130


if (parseInt(navigator.appVersion)>3) 
	{
		if (navigator.appName=="Netscape") 
			{
				
				winW = window.innerWidth;
				winH = window.innerHeight;
				
			}
 		
		if (navigator.appName.indexOf("Microsoft")!=-1) 
			{
			
			winW = document.body.offsetWidth;
  			winH = document.body.offsetHeight;
			
			}
		
			if (winW < 770)
			{
				winW = 763
			}
		}



// menu's position
marginal = winW-742
screen_left = Math.round((marginal/2)-12)

if ((winW > 1024) && (winW < 1030))
{
	screen_left = screen_left+2
}

if ((winW > 1280) && (winW < 1300))
{
	screen_left = screen_left+2
}

if ((winW > 800) && (winW < 820))
{
	screen_left = screen_left+2
}


if (navigator.appName=="Netscape") 
{
	screen_left = screen_left + 2
}



function GetWidth()
{
if (parseInt(navigator.appVersion)>3) 
	{
		if (navigator.appName=="Netscape") 
			{
				
				winW = window.innerWidth;
				winH = window.innerHeight;
				
			}
 		
		if (navigator.appName.indexOf("Microsoft")!=-1) 
			{
			
			winW = document.body.offsetWidth;
  			winH = document.body.offsetHeight;
			
			}
		
			if (winW < 770)
			{
				winW = 763
			}
		}



// menu's position
marginal = winW-742
screen_left = Math.round((marginal/2)-12)

if ((winW > 1024) && (winW < 1030))
{
	screen_left = screen_left+2
}

if ((winW > 1280) && (winW < 1300))
{
	screen_left = screen_left+2
}

if ((winW > 800) && (winW < 820))
{
	screen_left = screen_left+2
}


if (navigator.appName=="Netscape") 
{
	screen_left = screen_left + 2
}

}




//document.write (screen_left);
document.write ('<style>');
document.write ('#div1{position:absolute;	top:98; z-index:5;  visibility:hidden;}');
document.write ('#div2{position:absolute;	top:98; z-index:5;  visibility:hidden;}');
document.write ('#div3{position:absolute;	top:98; z-index:5;  visibility:hidden;}');
document.write ('#div4{position:absolute;	top:0; z-index:4;  visibility:hidden;}');
document.write ('#div5{position:absolute;	top:100; z-index:4;    visibility:hidden;}');
document.write ('</style>');



var index=0;
var IE=document.all;
var NS=document.layers;
var numOfLayers=5;
var LeftLoc = 0

function ShowLayer(index){
//	first close the open layer
HideLayer()

if(index == 1)
{
	LeftLoc = 205
}

if(index == 2)
{
	LeftLoc = 331
}

if(index == 3)
{
	LeftLoc = 419
}


	if(IE){		//	Explorer
		//alert("Explorer")
		document.all["div"+index].style.visibility='visible';
		document.all["div"+index].style.left = screen_left+LeftLoc;
		document.all.div4.style.visibility='visible';		
		document.all.div5.style.visibility='visible';
		document.all.div4.style.left=screen_left;		
		document.all.div5.style.left=screen_left;
	}
	else
	{		// Netscape
		document.getElementById("div"+index).style.visibility="visible";
		document.getElementById("div"+index).style.left = screen_left+LeftLoc;
		document.getElementById("div4").style.visibility="visible";
		document.getElementById("div5").style.visibility="visible";
		document.getElementById("div4").style.left=screen_left;
		document.getElementById("div5").style.left=screen_left;
	}
}



//	function close all popups
function HideLayer(){
	if(IE){		//	Explorer
		for(index=1;index<=numOfLayers;index++){
		document.all["div"+index].style.visibility='hidden';
		document.all.div4.style.visibility='hidden';
		document.all.div5.style.visibility='hidden';
		}	// End loop	
	}
	else
	{		// Netscape
		for(index=1;index<=numOfLayers;index++){
		document.getElementById("div"+index).style.visibility="hidden";
		document.getElementById("div4").style.visibility="hidden";
		document.getElementById("div5").style.visibility="hidden";
		}	// End loop	
	}
}


function SendHref (LinkHref)
{
	location.href=LinkHref;			
}

function SendURL(Slink)
{
	var myString = new String(window.top.location)
	rExp = /&/gi;
	newString = new String ("$")
	results = myString.replace(rExp, newString)
	window.top.location.href = Slink+"&page_url="+results
	
}

function OpenWindow(url, name, w, h) 
{	
	window.open(url,name,'width='+w+',height='+h+',scrollbars=1,status=1,resizable=1,top=0,left=0',1);
}

function OpenWindow2(url, name, w, h) 
{	
	window.open(url,name,'width='+w+',height='+h+',scrollbars=2 ,status=0,resizable=0,top=0,left=0',1);
}

function OpenWindowP(url, name)
{
	window.open(url,name,'width='+screenW+',height='+screenH+',scrollbars=1,status=1,resizable=1,top=0,left=0',1);
}
