// JavaScript Document

var isIE = false;
/* IE of FF */
function testIEofFF()
{
	if (window.ActiveXObject)
	{
		isIE = true;
	}
	// code for Mozilla, Firefox, Opera, etc.
	else if (document.implementation && document.implementation.createDocument)
	{
		isIE = false;
	}
	else
	{
		alert('Su browser no puede manejar esta escritura');
	}
	
	return isIE;
}

function showPic(span, e){
	var ph = document.getElementById("picHolder");
	var a = span.lastChild;
	var pic = a.href
	var lastindex = pic.lastIndexOf("/");
	pic  = pic.substring(0, lastindex) + "/" + "thumb" + "/" + pic.substring(lastindex+1);
	//alert("" + pic );
	ph.lastChild.src = pic;
	ph.style.display = "block";
	
	var posx = 0;
	var posy = 0;
	
	var ev=(!e)?window.event:e;//Moz:IE
	if (ev.pageX){posx=ev.pageX;posy=ev.pageY}//Mozilla or compatible
	else if(ev.clientX){posx=ev.clientX;posy=ev.clientY}//IE or compatible
	else{return false}//old browsers

	if(isIE){
		ph.style.position = "fixed";
	}else{
		ph.style.position = "absolute";
	}

	//ph.style.left = posx + 5 +"px";
	ph.style.left = "52%";
	ph.style.top = posy + 10 + "px";
}

function hidePic(span, e){
	var ph = document.getElementById("picHolder");
	ph.lastChild.src = "";
	ph.style.display = "none";
	
	var posx = 0;
	var posy = 0;
	
	ph.style.left = posx;
	ph.style.top = posy;
}
