// JavaScript Document

function reloadPage() {
	location.reload();
}

function getBrowserWidth() {
	if (document.all) return document.all.thisdoc.offsetWidth;
	else return self.innerWidth;
}

function menuOn(layer,layerHeight) {
	layer.style.height = (35 + 25 + (15 * (layerHeight))) + "px";
}

function menuOff(layer) {
	layer.style.height = 35 + "px";
}

function openBrowserWindow(URL,winName,features) { 
	window.open(URL,winName,features);
}

function layerView(layerid,show) {
	document.getElementById(layerid).style.visibility = show;
}

function findObject(n, d) {
	var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObject(n,d.layers[i].document);
	if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function swapImage() { 
	var i,j=0,x,a=swapImage.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
	if ((x=findObject(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function timeStamp() {
	var now = new Date();
	var time = (now.getTime());
	return time;
}

function jumpMenu(targ,selObj,restore){ 
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
