// JavaScript Document

var cX = 0; var cY = 0;

function UpdateCursorPosition(e){ 
		cX = e.pageX; cY = e.pageY;
		
}

function UpdateCursorPositionDocAll(e){
		if(document.documentElement.clientWidth>0){
			scr=document.documentElement.scrollTop;
		}else{
			scr=document.body.scrollTop;
		}
		cX = window.event.clientX; cY = scr+window.event.clientY;
		window.status =scr;
}

if(document.all) { 
		document.onmousemove = UpdateCursorPositionDocAll; 
}else { 
	document.onmousemove = UpdateCursorPosition; 
	}

function AssignPosition(d,contentHeight) {
	if(cX>500){
		d.style.left = (cX-320) + "px";
	}else{
		d.style.left = (cX+10) + "px";
	}

	d.style.top = (cY-contentHeight) + "px";
}

function HideContent(d) {
	if(d.length < 1) { return; }
	document.getElementById(d).style.display = "none";
}

function ShowContent(d,contentHeight) {
	if(d.length < 1) { return; }
	var dd = document.getElementById(d);
	AssignPosition(dd,contentHeight);
	dd.style.display = "";
}
