// JavaScript Document
var IE = document.all?true:false;
	//if (!IE) document.captureEvents(Event.MOUSEMOVE);
	//document.onmousemove = getMouseXY;
	var tempX = 0;
	var tempY = 0;

function showLargeImg(ImgName,e)
{
	var myWidth = 0;
	  if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
	  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
	  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
	  }
		  
		getMouseXY(e);
		var olddiv = document.getElementById('LargeImgRollover');
		var placeholder = document.getElementById('LargeImgRolloverPlace');
		if(olddiv)
		{placeholder.removeChild(olddiv);}
		
		RollOverThumb = "<img src=\"images/"+ImgName+"\" border=\"0\" />"
		
		var newdiv = document.createElement('div');
		newdiv.setAttribute('id','LargeImgRollover');
		newdiv.innerHTML = RollOverThumb;
		newdiv.style.position = "absolute";
		newdiv.style.top = ((tempY-340)<0?"0":(tempY-340))+"px";
		//if(tempY < 340){newdiv.style.top = "0px";}
		newdiv.style.left = (tempX+30) + "px";
		newdiv.style.width = "330px";
		newdiv.style.height = "330px";
		newdiv.style.background = "url(../images/LIBGBorder.gif) top left no-repeat";
		newdiv.style.padding = "5px 0px 0px 0px";
		newdiv.style.visibility = "visible";
		newdiv.style.zIndex = "100000";
		placeholder.appendChild(newdiv);
		placeholder.style.visibility = "visible";
}
function moveLargeImage(e)
{
	getMouseXY(e);
	var mvdiv = document.getElementById('LargeImgRollover');
	if(mvdiv)
	{
		//mvdiv.style.top = (tempY-340)+"px";
		mvdiv.style.top = ((tempY-340)<0?"0":(tempY-340))+"px";
		//if(tempY < 340){newdiv.style.top = "0px";}
		mvdiv.style.left = (tempX+30) + "px";
	}
	else
	{
		//alert('no');	
	}
}

function hideLargeImg()
{
	var getEl = document.getElementById('LargeImgRolloverPlace');
	if(getEl)
	{
		var olddiv = document.getElementById('LargeImgRollover');
		if(olddiv)
		{getEl.removeChild(olddiv);}
		getEl.style.visibility = 'hidden';
	}
}

function getMouseXY(e) {
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft
    tempY = event.clientY + document.body.scrollTop
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX
    tempY = e.pageY
  }  
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}  
  // show the position values in the form named Show
  // in the text fields named MouseX and MouseY
}