
/****POP UP ****/

var posx=0,posy=0;

function Locate(e){

 
if(e==null) e=window.event;

if(e.pageX || e.pageY){

    posx=e.pageX; posy=e.pageY;

    }

else if(e.clientX || e.clientY){

    if(document.documentElement.scrollTop){

        posx=e.clientX+document.documentElement.scrollLeft;

        posy=e.clientY+document.documentElement.scrollTop;

        }

    else{

        posx=e.clientX+document.body.scrollLeft;

        posy=e.clientY+document.body.scrollTop;

        }

    }

}



function popup_videos(strUrl,strImg,strTitulo)
{
	var px_width="580";
	var px_height="380";
	var contentDiv;
	document.getElementById("popCajaVideo").style.top=(posy-240)+"px";
	document.getElementById("popCajaVideo").style.left=(posx+90)+"px";
	MM_effectAppearFade('popCajaVideo', 500, 0, 100, false);
	

		var flashvars = {
			path_video:strUrl,
			path_imagen:strImg	,
			path_publicidad:'',
			path_titulo:strTitulo,
			auto_play:1
				};
		var params = {allowFullScreen:'true'};
		var attributes = {};

	swfobject.embedSWF("swf/swf.swf", "SwfVideo",px_width, px_height, "9.0.0","swf/expressInstall.swf", flashvars, params, attributes);
	document.getElementById("popCajaVideoTitulo").innerHTML=strTitulo;

}




function cerrarpopup()
{
	var px_width="0";
	var px_height="0";
	document.getElementById("popCajaVideo").style.top="-1000px";
	document.getElementById("popCajaVideo").style.left="-1000px";
	
		var flashvars = {
			path_video:'',
			path_imagen:''	,
			path_publicidad:'',
			path_titulo:'',
			auto_play:0
				};
		var params = {allowFullScreen:'true'};
		var attributes = {};

	swfobject.embedSWF("swf/swf.swf", "SwfVideo",px_width, px_height, "9.0.0","swf/expressInstall.swf", flashvars, params, attributes);
	

}

/* fade caja */
function MM_effectAppearFade(targetElement,duration, from, to, toggle)
{



	Spry.Effect.DoFade(targetElement, {duration: duration, from: from, to: to, toggle: toggle});
	
	

}

 document.onmousemove = Locate;


