
//*******************************************************************************************************************************************
//	Name / eMail ID		: Himagirish /  himagirish@genieinteractive.com
//	Type			:  	Javascript 
//	Purpose			: If the mouse moves out of the hot spot it Hides the layer ( Sub menu ).
//	Author			: 	Himagirish 
//	Created Date		:  	Sept 23, 2002
//	Last Modifed Date		:   9 Oct 2002
//	Status			:		Completed
//	External Dependencies	:	- Nil  - 
//	Input Parameters		:		- Nil -
//	Output Parameters		: 	 - Nil -
//	Description		: 	This page contains javascript function to hide the menu layer if the mouse moves out of the hot spot region

//********************************************************************************************************************************************

// This script hides all the sub menus when move is moved out of the menu area or clicked on the area out of the menu area.
var upperY;
var lowerY;
// Check for browser 
if (document.all) {
	n=0;ie=1;ns6=0;
	}
if (document.getElementById&&!document.all){
	n=0;ie=0;ns6=1;
	}
if (document.layers){
	n=1;ie=0;ns6=0;
	}
// Traps mouse events and movements	
if (ie||ns6)
{ 
	document.onclick = allOff;
	document.onscroll=allOff;
	document.onmousemove=updateIt;
}
if (document.layers)
{
	window.captureEvents(Event.MOUSEMOVE);
	//window.captureEvents(Event.CLICK);
	window.onmousemove= updateIt;
	window.onclick=allOff
}

// Function checks for x and y co-ordinates and hides sub menus.
function updateIt(e)
{ 
	//upperY = 0;
	//lowerY = upperY + 600;
	
	if (ie)
	{
		var x = window.event.clientX;
		var y = window.event.clientY;

		if (x > 1200 || x < 1) {  allOff();}
		else if (y > lowerY  || y < upperY ) allOff();
	}
	if (n||ns6)
	{
		var x = e.pageX;
		var y = e.pageY;

		if (x > 1200 || x < 1) allOff();
		else if (y > lowerY   || y < upperY) allOff();
	}
}

// This function assigns upper and lower y positions.
function setUpperY(  )
{ 
	
	if (ie)
	{
		upperY = window.event.clientY;
		upperY = upperY - 25;
		lowerY = upperY + 170;
	}
	if (n||ns6)
	{
		//upperY = window.Event.pageY;
		upperY = 0
		lowerY = 370;
	}
	
	
}

//********************************************************************************************************************************************
