/*************************************************************************
  
  PageUse.js
  version date: March 2005
  Mapds:Charlie Su  
  
*************************************************************************/
function convclick(){
	this.convX = function (Event, imgElem) { 
	if (navigator.appName.toUpperCase().match(/MICROSOFT INTERNET EXPLORER/) != null)
    	{ return Event.clientX-this.getRealLeft(imgElem); }
	if (navigator.appName.toUpperCase().match(/NETSCAPE/) != null)
    	{ return Event.pageX- this.getRealLeft(imgElem); }
	}
	
	this.convY = function (Event, imgElem) { 
	if (navigator.appName.toUpperCase().match(/MICROSOFT INTERNET EXPLORER/) != null)
    	{ return Event.clientY-this.getRealTop(imgElem); }
	if (navigator.appName.toUpperCase().match(/NETSCAPE/) != null)
    	{ return Event.pageY- this.getRealTop(imgElem); }
    	}
		
	this.getRealTop = function(imgElem) {
 	yPos = eval(imgElem).offsetTop;
 	tempEl = eval(imgElem).offsetParent;
 	while (tempEl != null) 
	{
  	yPos += tempEl.offsetTop;
  	tempEl = tempEl.offsetParent;
 	}
 	return yPos;
	}

	this.getRealLeft = function(imgElem)
	{
 	xPos = eval(imgElem).offsetLeft;
 	tempEl = eval(imgElem).offsetParent;
 	while (tempEl != null)
 	{
   	xPos += tempEl.offsetLeft;
   	tempEl = tempEl.offsetParent;
 	}
 	return xPos;
	}
}