// Temporary variables to hold mouse x-y pos.s
var mouseX = 0; // Toa do mouse that 
var mouseY = 0; // Toa do mouse that 

<!--
// Detect if the browser is IE or not.
// If it is not IE, we assume that the browser is NS.
var IE = document.all?true:false

// If NS -- that is, !IE -- then set up for mouse capture
if (!IE) document.captureEvents(Event.MOUSEMOVE)

// Set-up to use getMouseXY function onMouseMove
document.onmousemove = getMouseXY;

// Main function to retrieve mouse x-y pos.s

function getMouseXY(e) {
  if (IE) { // grab the x-y pos.s if browser is IE
    mouseX = event.clientX + document.body.scrollLeft
    mouseY = event.clientY + document.body.scrollTop
  } else {  // grab the x-y pos.s if browser is NS
    mouseX = e.pageX
    mouseY = e.pageY
  }  
  // catch possible negative values in NS4
  if (mouseX < 0){mouseX = 0}
  if (mouseY < 0){mouseY = 0}  

return true
}

//-->

function previewimg(imgpath)
{
	var imgsrc =  document.frmAdmin.imgpath.value ;
	document.images.img_view.src = imgsrc ; 

}


function show_img_tip(imgpath, textdisplay , x, y)
{
	//widthXToolTip = 160 ; 
	//widthYToolTip = 100 ; 	
	widthXToolTip = x ; 
	widthYToolTip = y ; 	
	
	beginX = 0 ;
	beginY = 0 ;
	
	PositionX = mouseX  ;
	if ( ( mouseX + widthXToolTip ) > (screen.width - 12) )
		PositionX = screen.width - (widthXToolTip  + 12)  ; 
	PositionY = mouseY - beginY  -  widthYToolTip - 16;

	bubble = document.getElementById("tooltips");
	bubble.style.left =  PositionX + "px";
	bubble.style.top =  PositionY + "px";
	bubble.style.width =  widthXToolTip + "px";
	bubble.style.height =  widthYToolTip + "px";
	bubble.style.display = "block";	
	bubble.innerHTML = "<img src=\""+ imgpath +"\"" + "><br><center><b>" + textdisplay  +"</b></center>";
}
function hide_img_tip()
{
	bubble = document.getElementById("tooltips");
	bubble.style.display = "none";	
}

function ShowImgProject(src) {
	document.getElementById("ShowImgProject").src = "upload/" + src ;
}


