// 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;
	  }
		  
	var getEl = document.getElementById('MainBody');
	if(getEl)
	{
		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 = "100px";
		//newdiv.style.left = (((myWidth-200)/2)-125) + "px";
		//newdiv.style.left = "400" + "px";
		newdiv.style.top = (tempY-400)+"px";
		newdiv.style.left = (tempX-180) + "px";
		newdiv.style.width = "260px";
		newdiv.style.height = "260px";
		newdiv.style.visibility = "visible";        
		placeholder.appendChild(newdiv);
		placeholder.style.visibility = "visible";
        
        $("div#LargeImgRollover").css('background-color', '#FFFFFF');
	}
}
function moveLargeImage(e)
{
	getMouseXY(e);
	var mvdiv = document.getElementById('LargeImgRollover');
	if(mvdiv)
	{
		mvdiv.style.top = (tempY-400)+"px";
		mvdiv.style.left = (tempX-180) + "px";
	}
	else
	{
		//alert('no');	
	}
}

function hideLargeImg()
{
	var getEl = document.getElementById('LargeImgRolloverPlace');
	if(getEl)
	{
		var olddiv = document.getElementById('LargeImgRollover');
		if(olddiv)
		{getEl.removeChild(olddiv);}
	}
}

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
}
