/* popupsearch */

if (window != top) top.location.href = location.href;

NS4 = (document.layers) ? 1 : 0;
IE4 = (document.all) ? 1 : 0;
DOM = (document.getElementById) ? 1 : 0;
ver4 = (NS4 || IE4) ? 1 : 0;

var loaded = 0;
var gotlayers = 0;


function moveLayers() {
	if (gotlayers) {
		if (NS4) {
			screenWidth = window.innerWidth;
			document.layers['search_callout'].left = 60;
			document.layers['search_callout'].top = 180;
		} else if (DOM) {
			screenWidth = (document.body.clientWidth ? document.body.clientWidth : window.innerWidth) + 18;
			document.getElementById('search_callout').style.left = 60;
			document.getElementById('search_callout').style.top = 180;
        } else {
			screenWidth = document.body.clientWidth + 18;
			document.all['search_callout'].style.pixelLeft = 60;
			document.all['search_callout'].style.pixelTop = 180;
		}
	}
}

function popUp(menuName,on) {
	if (gotlayers) {
		if (on) {
			moveLayers();
			if (NS4) {
				document.layers[menuName].visibility = "show";
			} else if (DOM) {
				document.getElementById(menuName).style.visibility = "visible";
                        } else {
				document.all[menuName].style.visibility = "visible";
			}
		} else {
			if (NS4) {
				document.layers[menuName].visibility = "hide";
			} else if (DOM) {
				document.getElementById(menuName).style.visibility = "hidden";
			} else {
				document.all[menuName].style.visibility = "hidden";
			}
		}
	}
}


/* The popuppane stuff */

var x,y,a,b;

function setupDescriptions() {
	var x = navigator.appVersion;
	y = x.substring(0,4);
	if (y>=4) setVariables();
}

var isNav = (navigator.appName.indexOf("Netscape") !=-1);

function setVariables(){
	if (isNav) {
		h=".left=";
		v=".top=";
		dS="document.";
		sD="";
	} else {
		h=".pixelLeft=";
		v=".pixelTop=";
		dS="";
		sD=".style";
   }
}

function popLayer(title, text){
	desc = "<TABLE border=0 cellspacing=0 cellpadding=0 bgcolor=#000000 WIDTH=250><tr><td><table border=0 cellspacing=1 cellpadding=5 bgcolor=#000000><tr><td bgcolor=#0000c0 WIDTH=95%><FONT SIZE=2 FACE='Verdana, Arial' COLOR=#ffffff><B>";
	desc += title;
	desc += "</B></FONT></td><td bgcolor=#0000c0 WIDTH=20><FONT SIZE=2 FACE='Verdana, Arial' COLOR=#ffffff><B><a href='JavaScript:hideLayer(-50);' STYLE='color:#FFFFFF;text-decoration:none;' ALIGN=CENTER>X</a></td></tr>";
	desc += "<tr><td colspan=2 bgcolor=#ffffff><FONT SIZE=2 FACE='Verdana, Arial'>"+text+"</td></tr>";
	desc += "</tr></table></td></tr></table>";

	if(isNav) {
		document.popuppane.document.write(desc);
		document.popuppane.document.close();
		document.popuppane.left=x;
		document.popuppane.top=y;
	} else {
		popuppane.innerHTML=desc;
		eval(dS+"popuppane"+sD+h+(x));
		eval(dS+"popuppane"+sD+v+y);
   }
}

function hideLayer(a){
	if(isNav) {
		eval(document.popuppane.top=-500);
	} else {
		popuppane.innerHTML="";
	}
}

function handlerMM(e){
	x = (isNav) ? e.pageX : event.x+document.body.scrollLeft;
	y = (isNav) ? e.pageY : event.y+document.body.scrollTop;
	
}

if (isNav){
	document.captureEvents(Event.MOUSEMOVE);
}

document.onmousemove = handlerMM;
	
setupDescriptions();



