
	
    function scrolling() {
	if (navigator.appName == "Microsoft Internet Explorer"){
	scrollposit = document.body.scrollTop;
	} else {
	scrollposit = window.pageYOffset;
	}
	}

    

	function alertSize() {
	myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
	}
	}
	
	


    

	function init(){
	dummy_mc = document.getElementById('cuadrito');
	setTimeout(moveSquare,10);
	scrolling();
	zzz = new Tween(dummy_mc.style,'top','',scrollposit,10,1,'px');
	}
	
	function moveSquare(){
	scrolling();
	alertSize();
	var y = scrollposit + ((myHeight/2)-150);
	
	var duration = 1;
	var easingFunc = Tween.elasticEaseOut;
	isNaN(duration) ? duration = 1 : null;
	zzz.func = easingFunc;
	zzz.continueTo(y,duration);
	document.getElementById('cuadrito').style.display = 'block';
	}


        

	function secondscroll() {
	dummy_md = document.getElementById('cuadrito');
	window.onscroll = moveSquare2, window.onresize = moveSquare2;
	zz2 = new Tween(dummy_md.style,'left','',parseInt(dummy_mc.style.left),10,1,'px');
	zzz2 = new Tween(dummy_md.style,'top','',parseInt(dummy_md.style.top),10,1,'px');
	}
	
	function moveSquare2(){
	scrolling();
	alertSize();
	var x = (myWidth/2)-140;
	var y = scrollposit + ((myHeight/2)-150);
	var duration = 1;
	var easingFunc = Tween.regularEaseOut;
	isNaN(duration) ? duration = 1 : null;
	zz2.func = easingFunc;
	zz2.continueTo(x,duration);
	zzz2.func = easingFunc;
	zzz2.continueTo(y,duration);
	}
	
	function test(){
	alertSize();
	var tt3 = (myWidth/2)-140;
	document.getElementById('cuadrito').style.left = tt3;	
	}
	
	function hidepop(){
	document.getElementById('cuadrito').style.display = 'none';	
	}
		
  document.write('<div id="cuadrito" style="display: none; position:absolute; width:360px; height:330px; background:url(http://www.amante-perfecto.com/PopUp/popup_exported.png) no-repeat;"><div style="height:25px; font-size:18px; color:#FFFFFF; margin:10px 0 0 10px; font-family:Arial, Helvetica, sans-serif;">ˇˇPru&eacute;balo Hoy Mismo!!</div><div style="width:330px; font-size:16px; color:#000000; margin:15px 0 0 10px; font-family:Arial, Helvetica, sans-serif;">ˇˇRecibe ahora mismo una demostraci&oacute;n <span style="font-weight:bold;">GRATUITA</span> para <span style="color:#FF0000;"><strong>Agrandar el Pene y Seducir Mujeres!!</strong></span></div><form method="POST" action="http://www.hombreirresistible.com/cgi-bin/autoresponder/alta.pl" style="margin:20px 0 0 0;"><input type="hidden" name="id" value="2"><input type="hidden" name="extra_ar" value="\"><div style="float:left; width:80px;"><div style="height:25px; margin:10px 0 0 10px; font-family:Arial, Helvetica, sans-serif; color:#1567BD; font-weight:bold; font-size:13px;">Nombre: </div><div style="height:25px; margin:10px 0 0 10px; font-family:Arial, Helvetica, sans-serif; color:#1567BD; font-weight:bold; font-size:13px;">Apellido: </div><div style="height:25px; margin:10px 0 0 10px; font-family:Arial, Helvetica, sans-serif; color:#1567BD; font-weight:bold; font-size:13px;">Email: </div></div><div style="float:left; width:200px;"><div style="height:25px; margin:10px 0 0 0;"><input type="text" name="first_name" size="15" /></div><div style="height:25px; margin:10px 0 0 0;"><input type="text" name="email" size="15" /></div><div style="height:25px; margin:10px 0 0 0;"><input type="text" name="email" size="15" /></div></div><div style="clear:both;"></div><a href="" target="_self" style="margin:0px;"><div style="margin:20px 0 0 10px;"><input type="image" value="submit" src="http://www.amante-perfecto.com/PopUp/boton.png" height="58" width="332" border="0" style="margin:0px;" /></div></a><div style=" width:60px; height:15px; margin:5px 0 0 300px;" onclick="hidepop();"></div></form></div></div>');
  


	var drag_it=false,popover;
	var gensh=0,sht,shi,shakes=20,interval=10;
	function dosh()
	{
	gensh++;
	shi=parseInt(Math.random()*15+5);
	popover.style.top=parseInt(popover.style.top)+shi;
	eval("setTimeout('popover.style.left=parseInt(popover.style.left)+"+shi+"', "+interval+");");
	eval("setTimeout('popover.style.top=parseInt(popover.style.top)-"+shi+"', 2*"+interval+");");
	eval("setTimeout('popover.style.left=parseInt(popover.style.left)-"+shi+"', 3*"+interval+");");
	if(gensh >= shakes)
	{
	clearInterval(sht);
	}
	}
	function shake()
	{
	sht=setInterval('dosh()', 3*interval);
	}
	
	d = document;
	popover = d.getElementById?d.getElementById("cuadrito"):d.all["cuadrito"];
	
	
	setTimeout(test,10);
	setTimeout(init,1000);
	setTimeout(shake,2000);
	setTimeout(secondscroll,3030);
