// JavaScript Document
function toggleSubmenu(submenuId, show){
	var theSub=document.getElementById('submenu-'+submenuId);
	var theMenu=document.getElementById(submenuId);
	if(show==1){
		theSub.className='submenu';
		theMenu.className='menu-over';
	}
	else{
		theSub.className='submenu-hide';
		theMenu.className='';
	}
}

function toggleSubmenuH(submenuId, show){
	var theSub=document.getElementById('submenu-'+submenuId);
	var theMenu=document.getElementById(submenuId);
	if(show==1){
		theSub.className='submenu-h';
	}
	else{
		theSub.className='submenu-hide';
	}
}


if (document.layers) { // Netscape
	document.captureEvents(Event.MOUSEMOVE);
	document.onmousemove = captureMousePosition;
} else if (document.all) { // Internet Explorer
	document.onmousemove = captureMousePosition;
} else if (document.getElementById) { // Netcsape 6
	document.onmousemove = captureMousePosition;
}

// Global variables
xMousePos = 0; // Horizontal position of the mouse on the screen
yMousePos = 0; // Vertical position of the mouse on the screen
xMousePosMax = 0; // Width of the page
yMousePosMax = 0; // Height of the page

function captureMousePosition(e) {
	if (document.all) { //IE
		xMousePos = window.event.x+document.body.scrollLeft;
		yMousePos = window.event.y+document.body.scrollTop;
		//xMousePos = e.x+document.body.scrollLeft;
		//yMousePos = e.y+document.body.scrollTop;
		xMousePosMax = document.body.clientWidth+document.body.scrollLeft ;
		yMousePosMax = document.body.clientHeight+document.body.scrollTop ;
	} else if (document.getElementById) {
		xMousePos = e.pageX;
		yMousePos = e.pageY;
		xMousePosMax = window.innerWidth+window.pageXOffset;
		yMousePosMax = window.innerHeight+window.pageYOffset;
	}

	//window.status = "xMousePos=" + xMousePos + ", yMousePos=" + yMousePos +", xMousePosMax=" + xMousePosMax + ", yMousePosMax=" + yMousePosMax;
}

function toggleToolTip(id, show){
	var theToolTip=document.getElementById(id);
	if(parseInt(show)){
		theToolTip.style.left=(xMousePos+20)+'px';
		theToolTip.style.top=(yMousePos+30)+'px';
		theToolTip.style.display='block';
	}else{
		theToolTip.style.display='none';
	}
}
	