<!--
 // para pasar variables a la pelicula
function swfSetVble (campo, vble){
	if (browser.isIE) distancias.SetVariable (campo, vble);
	if (browser.isNS) document.embeds.distancias.SetVariable (campo, vble);
	return;
}
// calcula browser
function Browser ()
{
	var ua, s, i;
	this.isIE = false;
	this.isNS = false;
	ua = navigator.userAgent;
	s = "MSIE";
	if ((i = ua.indexOf (s)) >= 0)
	{
		this.isIE = true;
		return;
	}
	s = "Netscape6/";
	if ((i = ua.indexOf (s)) >= 0)
	{
		this.isNS = true;
		return;
	}
	s = "Gecko";
	if ((i = ua.indexOf (s)) >= 0)
	{
		this.isNS = true;
		this.version = 6.1;
		return;
	}
}

var browser = new Browser ();

//suscribimos al evento mousemove la función posicion
function capturarEventos(){
	
	if (browser.isIE)
	{
		document.attachEvent ("onmousemove", posicion);
		//window.event.cancelBubble = true;
		//window.event.returnValue = false;	
	}
	if (browser.isNS)
	{
		document.addEventListener ("mousemove", posicion, true);
	}
}
// calcula la posición en cada movimiento de ratón
function posicion (event)
{
	var x, y;
	// calculamos la posición x e y del object
	var offsetTrail = document.getElementById ('distancias');
	var offsetTop = 0;
	var offsetLeft = 0;
	if (browser.isNS) {
		offsetTrail = offsetTrail.offsetParent;
	}
	while (offsetTrail) {
		offsetTop += offsetTrail.offsetTop;
		offsetLeft += offsetTrail.offsetLeft;
		offsetTrail = offsetTrail.offsetParent;
	}
	if (browser.isIE) {
		// calculamos posición absoluta del mouse en documento
		x = window.event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft;
		y = window.event.clientY + document.documentElement.scrollTop + document.body.scrollTop;
		// calculamos posición relativa
		x -= offsetLeft;
		y -= offsetTop;
		window.event.cancelBubble = true;
		window.event.returnValue = false;
		var strDebug = "x: " + x + " y:" + y;
		strDebug += " | offsetLeft: "+offsetLeft+" offsetTop: "+offsetTop;
		strDebug+=" | clientX: "+window.event.clientX+" clientY: "+window.event.clientY;
		strDebug+=" | dE.x: "+document.documentElement.scrollLeft+" dE.y: "+document.documentElement.scrollTop;
		strDebug+=" | body.x: "+document.body.scrollLeft+" body.y: "+document.body.scrollTop;


	}
	if (browser.isNS) {
		x = event.clientX + window.scrollX;
		y = event.clientY + window.scrollY;
		x -= offsetLeft;
		y -= offsetTop;
		event.preventDefault ();

		var strDebug = "x: " + x + " y:" + y;
		strDebug += " || offsetLeft: "+offsetLeft+" offsetTop: "+offsetTop;
		strDebug += " || event.clientX : "+event.clientX +" event.clientY : "+event.clientY;
		strDebug += " ||  window.scrollX : "+ window.scrollX +"  window.scrollY : "+ window.scrollY;

		
	}
	//window.status = strDebug;
	swfSetVble ("mx", x);
	swfSetVble ("my", y);
}
setTimeout("capturarEventos()",1500);
//-->		




