/*
Function in this docuument:

track
reveal
popup
check_frames
mylog

*/
if(navigator.appName == "Netscape")
	window.captureEvents(Event.MOUSEMOVE);
document.onmousemove = track;
var m2 = document.getElementById("menu_2");
var m3 = document.getElementById("menu_3");
var m4 = document.getElementById("menu_4");
var m5 = document.getElementById("menu_5");
function track(e) {
	m2 = document.getElementById("menu_2");
	m3 = document.getElementById("menu_3");
	m4 = document.getElementById("menu_4");
	m5 = document.getElementById("menu_5");
	var x = (document.all) ? event.x : e.pageX;
	var y = (document.all) ? event.y : e.pageY;

	if ((!(x>20 && x<220) || !(y>70 && y<120)) && (!(x>190 && x<350) || !(y>70 && y<260)))
	 m2.style.visibility = "hidden";

	if ((!(x>20 && x<220) || !(y>140 && y<190)) && (!(x>190 && x<350) || !(y>140 && y<310)))
	 m3.style.visibility = "hidden";

	if ((!(x>20 && x<220) || !(y>210 && y<260)) && (!(x>190 && x<400) || !(y>200 && y<360)))
	 m4.style.visibility = "hidden";

	if ((!(x>20 && x<200) || !(y>290 && y<340)) && (!(x>190 && x<370) || !(y>290 && y<450)))
	 m5.style.visibility = "hidden"; 

}
function reveal(menu){
	m2 = document.getElementById("menu_2");
	m3 = document.getElementById("menu_3");
	m4 = document.getElementById("menu_4");
	m5 = document.getElementById("menu_5");
	if (menu == 2) m2.style.visibility = "visible";
	if (menu == 3) m3.style.visibility = "visible";
	if (menu == 4) m4.style.visibility = "visible";
	if (menu == 5) m5.style.visibility = "visible";
}

function popup(thefile,thename,theplace)	{
	var theitems=theplace.split(",");
	//  *******  the width  *********
	var theitem = theitems[0];
	var theparts=theitem.split("=");
	//  *******  the height  *********
	var htheitem = theitems[1];
	var htheparts=htheitem.split("=");
	
	//  *******  the rest  *********
	var thewidth = screen.width;
	var theheight = screen.height;
	var mywidth = screen.width - 50;
	var myheight = screen.height - 150;
	
	if ((theparts[1] > mywidth) || (htheparts[1] > myheight))	{
		theplace = "width="+mywidth+",height="+myheight+",scrollbars=1,toolbar=1,resizable=1,left=1,top=1";
		window.open(thefile, thename, theplace);
		return false;
		}
	else	{
		window.open(thefile, thename, theplace);
		return false;
		}
	}

function check_frames()
	{
	if (!top.frames.length==0) {
	top.location = "http://www.cooke.ws";
	}
}

function mylogit(myprog) {
	var now = new Date();
	var myzone = now.getTimezoneOffset()/60;
	var thisdoc = document.title
	var thisfile = document.URL
	var theline = "dolog.php?to="+myprog+"&fromx="+thisdoc+"&zone="+myzone;
	window.location=theline; 
	}

