//*****************************************************************************
// ABRIR FOTOS DE LA EMPRESA
function picWindow(fich, x, y) {
	var paddingTop = 0;
	var paddingLeft = 0;
	win = window.open("about:blank", "_blank", "toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,scrollbars=0,width="+(x+paddingLeft)+",height="+(y+paddingTop));
	M = '';
	M += "<html><head><title>Foto en Paralelo40.org</title></head><body bgcolor=white style='margin:0px'>";
	M += "<center><a href='javascript:void(0)' title='Pulse para cerrar la ventana' onclick='window.close()'><img src='"+fich+"' width="+x+" height="+y+" border=0></a></center>";
	M += "</body></html>";
	win.document.open('text/html');
	win.document.write(M);
	win.document.close();
	return false;
}

//*****************************************************************************
// TOOLTIP EN POSICIÓN DEL RATON
var IE = document.all ? true : false;
//if (!IE) document.captureEvents(Event.MOUSEMOVE)
//else document.onmousemove = getMouseXY;
function getMouseXY(e)
{
	var tempX = 0;
	var tempY = 0;

	if (IE)
	{
		tempX = event.clientX;
		tempY = event.clientY + document.body.scrollTop;
//		window.status = "|" + document.scrollTop;

	} else {

		tempX = e.clientX;
		tempY = e.clientY;
	}
	if (tempX < 0){tempX = 0;}
	if (tempY < 0){tempY = 0;}

	var tip = document.getElementById("icotip");
	if(tip)
	{
		tip.style.left	= ""+(tempX + 5)+"px";
		tip.style.top	= ""+(tempY - 10)+"px";
	}
	return true;
}

function onOverIco(ico, showTip)
{
	var tip = document.getElementById("icotip");
	if(!tip) return;

	if(!showTip)
	{
		ico.title = tip.innerHTML;
		tip.style.display = "none";
		return;
	}

	// position tip
	var x = 0;
	var y = 0;
	for(var E=ico; E; E = E.offsetParent)
	{
		x += E.offsetLeft;
		y += E.offsetTop;
	}
	tip.style.left = x + 1;
	tip.style.top = y - 20;

	// show tip
	tip.innerHTML = ico.title;
	ico.title = "";
	tip.style.display = "block";
}

//*****************************************************************************
//*****************************************************************************
//*****************************************************************************
