var strMustConnectToInternet = "The 'Slide In' option will only work with relative URLs\nin the 'Show this webpage...' option or in a Popup Rotator.\nWhen used with a full URL (http://www.....) it will not\nfunction correctly.";

var win;
var wthreec=(document.getElementById)? true: false;
var ie5=(wthreec && document.all)? true : false;
var ns6=(wthreec && (navigator.appName=="Netscape"))? true: false;
var end_top=0;
var end_left=0;
var transition=0;
var speed = 15;
var shad_width=4;
var gSlideOut = false;
var gSlideIn = false;
currIDb=null; 
xoff=0; 
yoff=0;
currRS=null; 
rsxoff=0; 
rsyoff=0;
oldac=null; 
newac=null; 
zdx=1; 
mx=0; 
my=0;
var tmpW = 4;
var tmpH = 10;
var shad_w = shad_width;
var gNomaxmin;
var gdeltaBorderSize;

var idlist=new Array();
idlist.btns=new Array();
idlist.btns[0]=new Image(); 
//idlist.btns[0].src="min.gif";
idlist.btns[0].src="_";

idlist.btns[1]=new Image(); 
//idlist.btns[1].src="max.gif";
idlist.btns[1].src="=";

idlist.btns[2]=new Image(); 
//idlist.btns[2].src="close.gif";
idlist.btns[2].src="X";

idlist.btns[3]=new Image(); 
//idlist.btns[3].src="resize.gif";
idlist.btns[3].src="/";

function setCookie_1110405680406(name, value, expires, path, domain, secure) 
{
	var curCookie = name + "=" + escape(value) +((expires) ? "; expires=" + expires.toGMTString() : "") +((path) ? ";path=" + path : "") +((domain) ? ";domain=" + domain : "") +((secure) ? ";	secure" : "");
	document.cookie = curCookie;
}

function getCookie_1110405680406(name) 
{
	var prefix = name + "=";
	var cookieStartIndex = document.cookie.indexOf(prefix);
	if (cookieStartIndex == -1)return null;
	var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length);
	if (cookieEndIndex == -1)cookieEndIndex = document.cookie.length;
	return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex));
}

function deleteCookie_1110405680406(name, path, domain) 
{
	if (getCookie_1110405680406(name)) 
	{
		document.cookie = name + "=" + ((path) ? "; path=" + path : "") +((domain) ? "; domain=" + domain : "") +"; expires=Thu, 01-Jan-70 00:00:01 GMT";
	}
}

function truebody_1110405680406()
{
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function hidebox_1110405680406(id)
{
	if (ie5) 
	{
		if ((document.getElementById(id+'_b'))&&(document.getElementById(id+'_s'))) 
		{
			document.getElementById(id+'_b').removeNode(true);document.getElementById(id+'_s').style.display="none";
			document.getElementById(id+'_s').removeNode(true);
		}
	} else 
	{
		document.getElementById(id+'_b').style.visibility='hidden';
		document.getElementById(id+'_s').style.visibility='hidden';
		document.getElementById(id+'_t').style.visibility='hidden';
		document.getElementById(id+'_c').style.visibility='hidden';
		document.getElementById(id+'_rs').style.visibility='hidden';
		document.getElementById(id+'_btt').style.visibility='hidden';
		document.getElementById(id+'_min').style.visibility='hidden';
		document.getElementById(id+'_max').style.visibility='hidden';
		document.getElementById(id+'_max').style.visibility='hidden';
	}
	window.document.body.onscroll='';
}

function showbox_1110405680406(id,l_ok,t_ok,l_smid,t_smid)
{
	if (gSlideIn) 
	{
		var popupext = document.getElementById(id+'_b');
		var shadowext = document.getElementById(id+'_s');
		speed = (Math.abs(speed)*(-1));
		if (l_smid>l_ok&&!ns6)
		{
			popupext.style.left = l_smid+speed;
			shadowext.style.left = l_smid+shad_w+speed;
			l_smid = popupext.style.left.substring(0,popupext.style.left.length-2)*1;
			t_smid = popupext.style.top.substring(0,popupext.style.top.length-2)*1;
			setTimeout("showbox_1110405680406('"+id+"',"+l_ok+","+t_ok+","+l_smid+","+t_smid+")",10);
		} else 
		{
			gSlideIn = false;showbox_1110405680406(id);
		}
	} else
	{
		document.getElementById(id+'_b').style.display=''; 
		document.getElementById(id+'_s').style.display='';
	}
}

function minimize()
{
	if(wthreec)
	{
		this.IDS[0].style.height=(ie5)? '26px':'24px';
		this.IDS[3].style.height='26px';
		this.IDS[2].style.display='none';
		this.IDS[4].style.display='none';
		setTimeout('ns6bugfix()',100);
	}
}

function restore()
{
	if(wthreec)
	{
		var h=this.IDS[10];
		this.IDS[0].style.height=h+'px';
		this.IDS[3].style.height=(ie5)? h+'px':h+2+'px';
		this.IDS[2].style.display='block';
		this.IDS[4].style.display='block';
		setTimeout('ns6bugfix()',100);
	}
}

function ns6bugfix()
{
	self.resizeBy(0,1);
	self.resizeBy(0,-1);
}

function trackmouse(evt)
{
	mx=(ie5)?event.clientX+truebody_1110405680406().scrollLeft:evt.pageX;
	my=(ie5)?event.clientY+truebody_1110405680406().scrollTop:evt.pageY;
	if(!ns6)movepopup_1110405680406();
	if((currIDb!=null)||(currRS!=null))return false;
}

function movepopup_1110405680406()
{
	if((currIDb!=null)&&wthreec)
	{
		var x=mx+xoff;
		var y=my+yoff;
		currIDb.style.left=x+'px';
		currIDs.style.left=x+shad_w+'px';
		currIDb.style.top=y+'px';
		currIDs.style.top=y+shad_w+'px';
	}
	
	if((currRS!=null)&&wthreec)
	{
		var rx=mx+rsxoff;
		var ry=my+rsyoff;
		var c=currRS;
		c.style.left=Math.max(rx,((ie5)?88:92))+'px';
		c.style.top=Math.max(ry,((ie5)?68:72))+'px';
		if (gdeltaBorderSize==-1) 
		{
			var tmp_out_shad = 1;
		} else 
		{
			var tmp_out_shad = 0;
		}
		c.IDS[0].style.width=Math.max(rx-tmpW+((ie5)?12:9),100-tmpW)-tmp_out_shad*2+'px';
		c.IDS[0].style.height=Math.max(ry-tmpH+((ie5)?12:7),80-tmpH)-tmp_out_shad*3+'px';
		c.IDS[1].style.width=Math.max(rx+((ie5)?4:3),((ns6)?95:92))+'px';
		c.IDS[4].style.left=parseInt(c.IDS[1].style.width)-8+'px';
		c.IDS[4].style.top=parseInt(c.IDS[0].style.height)-((ie5)?12:11)+'px';
		c.IDS[4].style.zIndex=++zdx;
		
		if (gNomaxmin) 
		{
			c.IDS[5].style.left=parseInt(c.IDS[1].style.width)-16+'px';
		}else
		{
			c.IDS[5].style.left=parseInt(c.IDS[1].style.width)-48+'px';
		}
		c.IDS[3].style.width=Math.max(rx-tmpW+((ie5)?12:10),((ie5)?100:102)-tmpW)-tmp_out_shad*2+'px';
		c.IDS[3].style.height=Math.max(ry-tmpH+((ie5)?12:8),((ie5)?80:84)-tmpH)-tmp_out_shad*3+'px';
		c.IDS[2].style.width=Math.max(rx-((ie5)?-4:4),((ie5)?92:87))-2*gdeltaBorderSize+'px';
		c.IDS[2].style.height=Math.max(ry-((ie5)?24:28),44)-2*gdeltaBorderSize+'px';
		c.IDS[10]=parseInt(c.IDS[0].style.height);
	}
}

function startRS(evt)
{
	var ex=(ie5)?event.clientX+truebody_1110405680406().scrollLeft:evt.pageX;
	var ey=(ie5)?event.clientY+truebody_1110405680406().scrollTop:evt.pageY;
	rsxoff=parseInt(this.style.left)-ex;
	rsyoff=parseInt(this.style.top)-ey;
	currRS=this;
	if(ns6)this.IDS[2].style.overflow='hidden';
	return false;
}

function stopdrag_1110405680406(id)
{
	currIDb=null;
	ns6bugfix();
	end_top = document.getElementById(id+'_b').style.top;
	end_top = parseInt(end_top.substring(0,end_top.length-2))-truebody_1110405680406().scrollTop;
	end_left = document.getElementById(id+'_b').style.left;
	end_left = parseInt(end_left.substring(0,end_left.length-2))-truebody_1110405680406().scrollLeft;
}

function grab_id(evt)
{
	var ex=(ie5)?event.clientX+truebody_1110405680406().scrollLeft:evt.pageX;
	var ey=(ie5)?event.clientY+truebody_1110405680406().scrollTop:evt.pageY;
	xoff=parseInt(this.IDS[0].style.left)-ex;
	yoff=parseInt(this.IDS[0].style.top)-ey;
	currIDb=this.IDS[0];currIDs=this.IDS[3];
	return false;
}

function moveOnScrool_1110405680406(id,evt)
{
	if(wthreec)
	{
		var ey = (ie5)?end_top+truebody_1110405680406().scrollTop:evt.pageY;
		var ex = (ie5)?end_left+truebody_1110405680406().scrollLeft:evt.pageX;
		document.getElementById(id+'_b').style.top = ey+'px';
		document.getElementById(id+'_s').style.top = ey+shad_w+'px';
		document.getElementById(id+'_b').style.left = ex+'px';
		document.getElementById(id+'_s').style.left = ex+shad_w+'px';
	}
}

function subBox_1110405680406(x,y,w,h,bgc,id)
{
	var v=document.createElement('div');
	v.setAttribute('id',id); 
	v.style.position='absolute';
	v.style.left=x+'px';
	v.style.top=y+'px';
	v.style.width=w+'px';
	v.style.height=h+'px';
	v.style.backgroundColor=bgc;
	v.style.visibility='visible';
	v.style.padding='0px 0px 0px 0px';
	return v;
}

function createpopup_1110405680406(email_adr,email_subj,email_body,buts,up_under,h,w,full_scr,t,l,pos,freq,freq_days,tbbg_c,tbf_st,tbf_f,tbf_c,tbf_si,cbg_c,cbg_im,bord_c,shad_c,scroll_c,isdrag,isresize,tb_text,content_text,cid,from_file,file_name,tb,lb,db,sbs,mb,sb,slidein,slideFrom,slideout,slideTo,createR,noshadows,autoscroll,nomaxmin,defSend,autoclose,addClickLink,ClickBankUserName,addCodeFromCntDwn,noclose,borderS)
{
	var str_resize = "yes";
	gSlideIn = slidein;
	gSlideOut = slideout;
	transitionOut = slideTo;
	transition = slideFrom;
	shad_w = shad_width;
	gNomaxmin = nomaxmin;
	x=l;y=t;w=Math.max(w,120);h=Math.max(h,80);
	var wH=document.body.clientHeight;
	var wW=document.body.clientWidth;
	var tmp_wfr=0;
	var tmp_extended_zero = 0;
	var s_top=document.all? document.body.scrollTop : window.pageYOffset;
	tmp_extended_zero=10;
	y=s_top+t;x=l;
	end_top = y-s_top;
	end_left = x;
	var strTbodyB = /<TBODY>/g;var strTbodyE = /<\/TBODY>/g;
	var strBr = /<br>/g;
	content_text = content_text.replace(strTbodyB,"");
	content_text = content_text.replace(strTbodyE,"");
	content_text = content_text.replace(strBr,"");
	var rdiv=new subBox_1110405680406(w-tmpW-((ie5)?12:11),h-tmpH-((ie5)?12:11),7,7,'',cid+'_rs');
	
	rdiv.innerHTML='<img src="resize.gif" width=7 height=7>';
	rdiv.style.cursor='move';
	
	var tw,th;tw=w;th=h;var tmp_out_shad_delta=0;
	var shadow=new subBox_1110405680406(x+shad_w,y+shad_w,tw-tmpW-2*tmp_out_shad_delta,th-tmpH-3*tmp_out_shad_delta,shad_c,cid+'_s');
	shadow.style.filter="alpha(opacity=50)";
	shadow.style.zIndex=++zdx;
	if (ie5) {
		var outerdiv=new subBox_1110405680406(x,y,w-tmpW-2*tmp_out_shad_delta,h-tmpH-3*tmp_out_shad_delta,bord_c,cid+'_b');
	} else {
		var outerdiv=new subBox_1110405680406(x,y,w-tmpW-1-2*tmp_out_shad_delta,h-tmpH-1-3*tmp_out_shad_delta,bord_c,cid+'_b');
	}
	
	outerdiv.style.borderStyle="outset";
	outerdiv.style.borderWidth="1px";
	outerdiv.style.borderColor=bord_c;
	outerdiv.style.zIndex=++zdx;tw=(ie5)?w-8:w-5;th=(ie5)?h+4:h-4;
	
	var titlebar=new subBox_1110405680406(0,1,tw,20,tbbg_c,cid+'_t');
	titlebar.style.overflow="hidden";
	titlebar.style.cursor="default";
	
	//var str_close = '<img src="close.gif" width="16" height="16" id="'+cid+'_cls">';
	var str_close = '<font size="3" color="white" face="Webdings" id="'+cid+'_cls" style="cursor:hand;" title="Cerrar">r</font>';
	
	//var tmp_noclose_w = 16;
	var tmp_noclose_w = 26;
	//var str_maxmin = '<span id="'+cid+'_btt" style="position:absolute; width:48px; height:16px; left:'+(tw-(32+tmp_noclose_w))+'px;top:2px;"><img src="min.gif" width=16 height=16 id="'+cid+'_min"><img src="max.gif" width=16 height=16  id="'+cid+'_max">';
	var str_maxmin = '<span id="'+cid+'_btt" style="position:absolute; width:48px; height:16px; left:'+(tw-(32+tmp_noclose_w))+'px;top:0px;"><font size="3" color="white" face="Webdings" id="'+cid+'_min" style="cursor:hand;"  title="Minimizar">0</font><font size="3" color="white" face="Webdings" id="'+cid+'_max" style="cursor:hand;" title="Maximizar">1</font>';
	titlebar.innerHTML='<span style="position:absolute; left:3px; top:1px; font:'+tbf_si+' '+tbf_f+'; '+tbf_st+' color:'+tbf_c+'; height:18px; overflow:hidden; clip-height:16px;">'+tb_text+'</span>'+str_maxmin+str_close+'</span>';
	tw=(ie5)?w-8:w-14;
	th=(ie5)?h-36:h-36;
	
	var tmp_bordersize = 2;
	gdeltaBorderSize = tmp_bordersize;
	var content_x, content_y;
	
	if ((ie5)||(borderS==0)) 
	{
		content_x=1;content_y=22;
	} else {
		content_x=2;content_y=23;
	}
	
	content_x=content_x+tmp_bordersize;
	content_y=content_y+tmp_bordersize;
	var content=new subBox_1110405680406(content_x,content_y,tw-2*tmp_bordersize,th-2*tmp_bordersize,cbg_c,cid+'_c');
	content.style.borderColor=cbg_c;
	content.style.borderWidth="1px";
	content.style.overflow="auto";
	content.style.padding="0px 2px 0px 4px";
	content.style.scrollbarBaseColor=scroll_c;
	content.innerHTML=content_text;
	outerdiv.appendChild(titlebar);
	outerdiv.appendChild(content);
	outerdiv.appendChild(rdiv);
	
	document.body.appendChild(shadow);
	document.body.appendChild(outerdiv);
	var IDS=new Array();
	IDS[0]=document.getElementById(cid+'_b');
	IDS[1]=document.getElementById(cid+'_t');
	IDS[2]=document.getElementById(cid+'_c');
	IDS[3]=document.getElementById(cid+'_s');
	IDS[4]=document.getElementById(cid+'_rs');
	IDS[5]=document.getElementById(cid+'_btt');
	IDS[6]=document.getElementById(cid+'_min');
	IDS[7]=document.getElementById(cid+'_max');
	IDS[8]=document.getElementById(cid+'_cls');
	IDS[9]=cid;
	IDS[10]=h-tmpH;
	this.IDb=IDS[0]; 
	this.IDb.IDS=IDS;
	this.IDt=IDS[1]; 
	this.IDt.IDS=IDS;
	this.IDc=IDS[2]; 
	this.IDc.IDS=IDS;
	this.IDs=IDS[3]; 
	this.IDs.IDS=IDS;
	this.IDrs=IDS[4]; 
	this.IDrs.IDS=IDS;
	this.IDbtt=IDS[5]; 
	this.IDbtt.IDS=IDS;
	this.IDmin=IDS[6]; 
	this.IDmin.IDS=IDS;
	this.IDmax=IDS[7]; 
	this.IDmax.IDS=IDS;
	this.IDcls=IDS[8]; 
	this.IDcls.IDS=IDS;
	this.IDb.activecolor=tbbg_c;
	this.IDb.inactivecolor=scroll_c;
	if(oldac!=null)oldac.IDS[1].style.backgroundColor=oldac.inactivecolor;
	oldac=this.IDb;
	this.IDcls.onclick=new Function("hidebox_1110405680406('"+cid+"');");
	this.IDmin.onclick=minimize;
	this.IDmax.onclick=restore;
	this.IDrs.onmousedown=startRS;
	this.IDrs.onmouseup=new Function("currRS=null");
	this.IDb.onmousedown=function()
	{ 
		if(oldac!=null)
		{
			oldac.IDS[1].style.backgroundColor=oldac.inactivecolor;
		}
		oldac=this;
		this.IDS[1].style.backgroundColor=this.activecolor;
		this.IDS[3].style.zIndex=++zdx; 
		this.style.zIndex=++zdx;
	};
	
	this.IDt.onmousedown=grab_id;
	this.IDt.onmouseup=new Function("stopdrag_1110405680406('"+cid+"');");
	showbox_1110405680406(cid,x,y,screen.width,y);
}
	
if(ns6)setInterval('movepopup_1110405680406()',40);
document.onmousemove=trackmouse;
document.onmouseup=new Function("currRS=null");

function mmove_1110405680406(left,top)
{
	if(flag_jo)
	{ 
		startleft=screen.width;
		starttop=top;
		flag_jo=false;
	}
	var a, b;
	a=Math.abs(speed)*(-1);
	b=0;
	win.moveBy(a,b);
	startleft-=Math.abs(speed);
	if(startleft>left)
	{
		setTimeout("mmove_1110405680406("+left+","+top+");",500/Math.abs(speed));
	}else{ 
		flag_jo=true; win.moveTo(left,top);
	}
}

function ShowWin_1110405680406()
{
	if (!(getCookie_1110405680406('cookPopUp1110405680406') == 'jPopup')) 
	{
		var strBody = '<div><font face="Verdana" size="2">Prueba</font></div>';
		var strTitulo = 'Suscríbete GRATIS';
			
		//createpopup_1110405680406(email_adr,email_subj,email_body,buts,up_under,h,w,full_scr,t,l,pos,freq,freq_days,tbbg_c,tbf_st,tbf_f,tbf_c,tbf_si,cbg_c,cbg_im,bord_c,shad_c,scroll_c,isdrag,isresize,tb_text,content_text,cid,from_file,file_name,tb,lb,db,sbs,mb,sb,slidein,slideFrom,slideout,slideTo,createR,noshadows,autoscroll,nomaxmin,defSend,autoclose,addClickLink,ClickBankUserName,addCodeFromCntDwn,noclose,borderS)		
		new createpopup_1110405680406('N/A','Subscribe Me','N/A',false,1,400,520,false,40,200,0,5,3,'DarkBlue','font-weight:bold;','Verdana','White','9pt','White','','DarkBlue','Gray','#808040',true,true, strTitulo, strBody,'Div1110405680406',false,'',false,false,false,false,false,false,true,2,false,1,false,false,false,false,true,false,false,'N/A',false,false,3);
	}

	var s = new Date();
	expired_date = "new Date((s.getYear()), s.getMonth(), s.getDate()+3, 00, 00, 00)";
	setCookie_1110405680406('cookPopUp1110405680406','jPopup',eval(expired_date),'/');
}


//window.onload=ShowWin_1110405680406;

function MuestraPopupFree(strCorreo) 
{
	var strBody = '<div style="margin:5pt;"><font face="Verdana" size="2"><form id="formEmail" action="http://www.activatuweb.com/Asite/WebSite/Lib/WS_SuscripcionActivaFree.asp" method="post" target="_blank" onsubmit="javascript:this.submit();hidebox_1110405680406(\'Div1110405680406\');">' +
					'<center>Dirección de correo electrónico <br/>' +
					'<input type="text" name="txtEmail" id="txtEmail" size="40" maxlength="250" style="form:10px Verdana;" />' +
					'<br/><input type="submit" value="Enviar" style="width:80pt; cursor:hand;form:10px Verdana;" ID="Submit1" NAME="Submit1" />' +
					'&nbsp;<input type="button" value="Cerrar" onclick="javascript:hidebox_1110405680406(\'Div1110405680406\');" style="width:80pt;cursor:hand;form:10px Verdana;"/>' +
					'<input type="hidden" name="hidEmailDestino" id="hidEmailDestino" value="' + strCorreo + '">' +
					'</form><br/><br/>' +
					'<a href="http://www.activatuweb.com" target="_blank"><img src="http://www.activatuweb.com/Asite/Website/img/miniActiva.gif" border="0" /></a></center>' +
					'</form></font></div>';


	var strTitulo = 'Suscríbete GRATIS';
	//createpopup_1110405680406(email_adr,email_subj,email_body,buts,up_under,h,w,full_scr,t,l,pos,freq,freq_days,tbbg_c,tbf_st,tbf_f,tbf_c,tbf_si,cbg_c,cbg_im,bord_c,shad_c,scroll_c,isdrag,isresize,tb_text,content_text,cid,from_file,file_name,tb,lb,db,sbs,mb,sb,slidein,slideFrom,slideout,slideTo,createR,noshadows,autoscroll,nomaxmin,defSend,autoclose,addClickLink,ClickBankUserName,addCodeFromCntDwn,noclose,borderS)		
	createpopup_1110405680406('N/A','Subscribe Me','N/A',false,10,210,400,false,40,200,0,5,3,'DarkBlue','font-weight:bold;','Verdana','White','9pt','White','','DarkBlue','Gray','#808040',true,true, strTitulo, strBody,'Div1110405680406',false,'',false,false,false,false,false,false,true,2,false,1,false,false,false,false,true,false,false,'N/A',false,false,3);
}




function CargaAutomaticaPopupFree(strCorreo)
{
	if (!(getCookie_1110405680406('cookPopUp1110405680406') == 'jPopup')) 
		MuestraPopupFree(strCorreo);	

	var s = new Date();
	expired_date = "new Date((s.getYear()), s.getMonth(), s.getDate()+3, 00, 00, 00)";
	setCookie_1110405680406('cookPopUp1110405680406','jPopup',eval(expired_date),'/');
}


