var IE=document.all?true:false
if(!IE)document.captureEvents(Event.MOUSEMOVE)
document.onmousemove=getMouseXY;
var mousepositionX=0
var mousepositionY=0
var allowHide=true;
function getMouseXY(e){if(IE){mousepositionX=event.clientX+document.documentElement.scrollLeft;mousepositionY=event.clientY+document.documentElement.scrollTop;}else{mousepositionX=e.pageX;mousepositionY=e.pageY;}
if(mousepositionX<0){mousepositionX=0}
if(mousepositionY<0){mousepositionY=0}
return true}


function getElement(id){return document.getElementById(id);}
function positionLayer(layername,x,y){n=getStyle(layername);n.left=x+'px';n.top=y+'px';}
function getStyle(layer){if(document.getElementById){return document.getElementById(layer).style;}else if(document.all){return document.all[layer].style;}else{return document[layer];}}
function hideElement(elementID){if(allowHide){getStyle(elementID).display='none';}}

function showImage(imagen){if(getElement('capa').allowDisplay==false||getElement('capa').allowDisplay==undefined){getElement('capa').allowDisplay=true;getElement('imagen').allowDisplay=false;getElement('imagen').src=imagen;getElement('imagen').onload=imageOnload;document.status=getElement('capa').allowDisplay;}
positionLayer('capa',mousepositionX+15,mousepositionY-30);}

function hideImage(){getElement('capa').allowDisplay=false;hideElement('capa');}

function imageOnload(){getElement('imagen').allowDisplay=true;if(getElement('imagen').allowDisplay&&getElement('capa').allowDisplay){getStyle('capa').display='block';}}

