var IE = document.all?true:false;
var tempX = 0;
var tempY = 0;
var curTop = 0;
var curLeft = 0;
var currentCloseTimeout=null;/*This handles all threads that remove iframes.*/

function findPos(obj) {
	if (obj.offsetParent) {
		curLeft = obj.offsetLeft;
		curTop = obj.offsetTop;
		while (obj = obj.offsetParent){
			curLeft += obj.offsetLeft;
			curTop += obj.offsetTop;
		}
	}
}

function getMouseXY(e){
	if(IE){
		/*grab the x-y pos.s if browser is IE*/
		tempX = e.clientX;
		tempY = e.clientY;
	}
	else{
		/*grab the x-y pos.s if browser is NS*/
		tempX = e.clientX;
		tempY = e.clientY;
	}
	  
	if(tempX < 0){tempX = 0;}
	if(tempY < 0){tempY = 0;}	
}

function shownav(id,e,obj){
	clearTimeout(currentCloseTimeout);
	if(obj != null){
		getMouseXY(e);
		findPos(document.getElementById("myimage"));
		document.getElementById(id).style.display="inline";
		
		/*CHANGE THIS LINE TO ADJUST OFFSETS FROM THE TOP & LEFT OF THE PAGE*/
		document.getElementById(id).style.top=parseInt(curTop)+parseInt(29);
		document.getElementById(id).style.left=parseInt(curLeft)+parseInt(320);	
		
	}
}

function starthidenav(id){
	currentCloseTimeout = setTimeout("hidenav('"+id+"')", 150);
}

function hidenav(id){
	document.getElementById(id).style.display="none";
}
