var target_url='http://www.videos-scatophiles.com?key_aff='+key_aff;

var vmin=2;
var vmax=2;
var vr=1;
var timer1;
var flyimage1;
var var2 = imageSrc;
var var3 = 'float';
/*
if (window.addEventListener) window.addEventListener("load", pagestart, false);
else if (window.attachEvent) window.attachEvent("onload", pagestart);
else if (document.getElementById) window.onload=pagestart;
*/
try{
    document.write("<style type='text/css'>#flyimage1 a,#flyimage1 a:hover,#flyimage1 a:visited{background-color:transparent;text-decoration:none;color:transparent;}</style>"); 
	document.write("<div id='floating' style='position:absolute; z-index:0; overflow: visible; visibility: visible; left: 0px; top: 0;'>");
	document.write("<div id='flyimage1' style='position:absolute; left: -500px; width:161; height:161;'>");
	document.write("<a href='javascript: run_action(this)' ><img src='"+imageSrc+"' border='0'></a></div>");
	document.write("</div>");
} catch(e) { }

document.close();
function iecompattest() { return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body; }
function Chip(chipname,width,height){ this.named=chipname;this.vx=vmin+vmax*Math.random();this.vy=vmin+vmax*Math.random();this.w=width+20; this.h=height;this.xx=0; this.yy=0;this.timer1=null; }
function movechip(chipname) { 
	if (document.getElementById) {
		eval("chip="+chipname);
		if ( window.innerWidth || window.opera){
			pageX=window.pageXOffset;
			pageW=window.innerWidth-40;
			pageY=window.pageYOffset;
			pageH=window.innerHeight-20;
		} else if (document.body) { pageX=iecompattest().scrollLeft; pageW=iecompattest().offsetWidth-40; pageY=iecompattest().scrollTop; 		pageH=iecompattest().offsetHeight-20; }
		chip.xx=chip.xx+chip.vx;
		chip.yy=chip.yy+chip.vy;
		chip.vx+=vr*(Math.random()-0.5);
		chip.vy+=vr*(Math.random()-0.5);
		if(chip.vx>(vmax+vmin))  chip.vx=(vmax+vmin)*2-chip.vx;
		if(chip.vx<(-vmax-vmin)) chip.vx=(-vmax-vmin)*2-chip.vx;
		if(chip.vy>(vmax+vmin))  chip.vy=(vmax+vmin)*2-chip.vy;
		if(chip.vy<(-vmax-vmin)) chip.vy=(-vmax-vmin)*2-chip.vy;
		if(chip.xx<=pageX){ chip.xx=pageX; chip.vx=vmin+vmax*Math.random(); }
		if(chip.xx>=pageX+pageW-chip.w) { chip.xx=pageX+pageW-chip.w; chip.vx=-vmin-vmax*Math.random(); }
		if(chip.yy<=pageY) { chip.yy=pageY; chip.vy=vmin+vmax*Math.random(); }
		if (chip.yy>=pageY+pageH-chip.h) { chip.yy=pageY+pageH-chip.h; chip.vy=-vmin-vmax*Math.random(); }
		document.getElementById(chip.named).style.left=chip.xx+"px";
		document.getElementById(chip.named).style.top=chip.yy+"px";
		chip.timer1=setTimeout("movechip('"+chip.named+"')",100);
	}
}

function pagestart()
{ 
	if (typeof useCookies != 'undefined')
		shown = document.cookie.indexOf('jstools_float=') != -1 ? 1 : 0;
	else
		shown=false;

	if(shown==0)
	{
		if (typeof useCookies != 'undefined')
			document.cookie = 'jstools_float=1';

		flyimage1=new Chip("flyimage1",161,161); movechip("flyimage1"); 
	}
	
}

function run_action(obj) {

		//window.location.replace(target_url+'id='+Param['id']+'&tracker='+Param['tracker']+'&mode='+Param['mode']+'&prod='+Param['prod']+'&dist='+Param['dist']); 
		window.open(target_url,'_blank');
}

setTimeout('pagestart();', 1000);
