function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			oldonload();
			if (func) func(); //itomic modification
		}
	}
}

var hdiv, mousex, mousey;

addLoadEvent( function(){
	hdiv = document.getElementById('docHoverDiv');
	hdiv.style.display = 'none';
	document.onmousemove = captureMouse;
	//initHome()
});

function showDesc(id){
	//get the info we want
	var text = document.getElementById('docDesc'+id).innerHTML;

	hdiv.innerHTML = text;

	hdiv.style.display = 'block';
	hdiv.style.position = 'absolute';
	posDiv();
}

function hideDesc(id){
	hdiv.style.display = 'none';
}

function captureMouse(e){
	if (document.all) { // grab the x-y pos.s if browser is IE
		mousex = event.clientX + document.documentElement.scrollLeft;
		mousey = event.clientY + document.documentElement.scrollTop;
		
//		alert(event.clientY );
	}	else {  // grab the x-y pos.s if browser is NS
		mousex = e.pageX;
		mousey = e.pageY;
	}
	
	if(hdiv.style.display == 'block'){
		posDiv();
	}
}

function posDiv(){
	hdiv.style.left = mousex + 15 + 'px';
	hdiv.style.top  = mousey - 80 + 'px';
}

function photoLarge(theURL,winName,features) { 
  window.open(theURL,'photolandscape','width=580,height=630,scrollbars=yes,resizable=yes' );
}
