(function(){
	parent.window.porno = function(el,s,l){
		l = l.replace(/-text/g,"-thumb");
		el.href="http://www.porn2.com/cgi-bin/atx/out.cgi?s=" + s + "&c=1&l=" + l + "&u="+ el.href;
		el.onmousedown="";return true;};
})();
function pornshowwebmasterlink (){
	document.write('<a target="_blank" href="'+unescape( "%68%74%74%70%3A%2F%2F%77%77%77%2E%69%6E%78%69%6F%2E%63%6F%6D%2F" ) +'">Webmasters</a>');
}
var def_val="Search porn videos..";
function inp_txt_focus (object,default_string){
	object.style.fontWeight="bold";
	if (object.value == default_string) object.value = "";
}
function inp_txt_blur (object,default_string){
	object.style.fontWeight="normal";
	if (object.value == "")
	object.value = default_string;
}
function inp_submit(q){
	if (q == def_val || q == '') return false;
}
function showShareBox() { $('#embedbox').hide(); $('#sharebox input').attr('value',window.location.href); $('#sharebox').show(); }
function hideShareBox() { $('#sharebox').hide(); }
function showEmbedBox() { $('#sharebox').hide(); $('#embedbox textarea').attr('value',$('#flowplayerholder').html()); $('#embedbox').show(); }
function hideEmbedBox() { $('#embedbox').hide(); }
function selectAll(el) { el.focus(); el.select(); }

var thumbs=new Array();
var stat=new Array();
var thumb=new Array();

function rotatethumb(i,str)
{ var loop=0;

if (stat[str])
{
	while ((thumbs[str][i]==0 || i>=5) && loop<100)
	{ if (i>=5) { i=0; }
	else
	{ i++;
	}
	loop++;
	}

	if (thumb[str][i].complete)
	{	
		document.getElementById(str).src=thumb[str][i].src;
	setTimeout("rotatethumb("+(i+1)+",'"+str+"')",500);
	}
	else
	{	setTimeout("rotatethumb("+i+",'"+str+"')",20);
	}
}


}

function loadthumb(url,str,j)
{	if (stat[str]) { thumb[str][j].src=url; }
}

function startr(str,ta,te)
{	stat[str]=1;
var num;
var first=1;
for(var j=0;j<16;j++)
{ if (thumbs[str][j]==1)
{ thumb[str][j]=new Image();
num=j+1;
if (first) { first=0; loadthumb(ta+num+te,str,j); }
else { setTimeout("loadthumb('"+ta+num+te+"','"+str+"',"+j+")",j*50); }
}
}
rotatethumb(0,str);
}

function endr(str)
{
	stat[str]=0;
}
