// initialize some global vars
var xCoord, yCoord, br, ver;

// very basic check for browser type and version
if (navigator.appName == "Netscape") {
	br="ns";
}
ver = navigator.appVersion.substring(0,1);

function rollOn(lyr) {
	// if it's a netscape browser and not over version 4
    if (br == "ns" && ver <= 4) {
		lyr = document.layers[lyr];
		lyr.position='absolute';
		lyr.left = xCoord+5;
		lyr.top = yCoord+5;
		lyr.visibility = 'visible';
    } else {
    	lyr = document.getElementById(lyr);
		lyr.style.position='absolute';
		lyr.style.left = xCoord+5;
		lyr.style.top = yCoord+5;
		lyr.style.visibility = 'visible';
    }
}

function rollOut(lyr) {
	if(br == "ns" && ver <= 4) { 		
		lyr = document.layers[lyr];
		lyr.visibility = 'hidden';
	} else {
		lyr = document.getElementById(lyr);
		lyr.style.visibility='hidden';
	}
}

function checkwhere(e) {
	// if netscape 4.x
	if (document.layers){
        xCoord = e.x;
        yCoord = e.y;
	}
	// if IE 
	        else if (document.all){
	        xCoord = event.clientX;
	        yCoord = event.clientY;
	}
	// this catches NS6 & IE 5+
        else if (document.getElementById){
        xCoord = e.clientX;
        yCoord = e.clientY;
	}
}

document.onmousemove = checkwhere;
if(document.captureEvents) {document.captureEvents(Event.MOUSEMOVE);}
