var
imgs=new Array(),
imgSizes=new Array(),
imgUrls=new Array(),
ns4=document.layers?1:0,
ie4=document.all,
ns6=document.getElementById&&!document.all?1:0;

if(ie4) {
	scrollWid=2
};

if(ns6) {
	scrollWid=20};
	imgs[0]="images/webcam.gif";
	imgs[1]="images/chantal.gif";
	imgs[2]="images/karin.gif";
	imgs[3]="images/kimlee.gif";
	imgSizes[0]="120";
	imgSizes[1]="120";
	imgSizes[2]="120";
	imgSizes[3]="120";
	imgUrls[0]="http://www.sexchatgirls.nl";
	imgUrls[1]="http://www.sexchatgirls.nl";
	imgUrls[2]="http://www.sexchatgirls.nl";
	imgUrls[3]="http://www.sexchatgirls.nl";
	var
	slide_delay=8,
	wait_beforeSlidein=1,
	wait_beforeSlideout=5,
	repeatSlide=false,
	repeat_interval=5,
	pick_random=true,
	strBorder="none",
	once_perSession=false,
	randImg=null;
	if(pick_random)
	{
	pickRandomImg()
	};

function pickRandomImg()
{
randImg=Math.floor(Math.random()*imgs.length)
};
var maxHgt=0;

function setPopup()
{
isDone=get_cookie("slidePopup");
	if(isDone!="done")
	{
		if(randImg!=null)
		{
		maxHgt+=parseInt(imgSizes[randImg],10)
		}
		else
		{
			for(x=0;x<imgSizes.length;x++) { 
			maxHgt+=parseInt(imgSizes[x],10)
			};
		};
		maxHgt+=10;
		setTimeout('slidePopup()',(wait_beforeSlidein*1000))
	};
};
var	hgt;

function slidePopup()
	{
	hgt=document.body.clientHeight;
	wdt=document.body.clientWidth;
	document.getElementById('popup').style.top=(hgt+1);
	document.getElementById('popup').style.left=(wdt-(180+scrollWid));
	document.getElementById('popup').style.display="";
	setTimeout('doSlide()',slide_delay);
	};

function doSlide()
{
vTop=parseInt(document.getElementById('popup').style.top,10);
if(vTop>(hgt-maxHgt))
{
document.getElementById('popup').style.top=vTop-2;setTimeout('doSlide()',slide_delay);
}
else
{
setTimeout('hidePopup()',(wait_beforeSlideout*1000));
};
};

function hidePopup()
{
vTop=parseInt(document.getElementById('popup').style.top,10);
if(vTop<(hgt+1))
{
document.getElementById('popup').style.top=vTop+2;setTimeout('hidePopup()',slide_delay);
}
else
{
document.getElementById('popup').style.display="none";
	if(once_perSession)
	{
	document.cookie="slidePopup=done";
};
	if(repeatSlide)
		{
		if(pick_random){pickRandomImg();
		sHTML="<a href=\""+imgUrls[randImg]+"\" target=\"_blank\"><img src=\""+imgs[randImg]+"\" border=\"0\" /></a>";
		maxHgt=parseInt(imgSizes[randImg],10)+20;
		document.getElementById('popup').innerHTML=sHTML;
		};
	setTimeout('slidePopup()',(repeat_interval*1000))
	};
	};
};

function get_cookie(Name) {
	var search=Name+"=",returnvalue="";
	if(document.cookie.length>0) {
	offset=document.cookie.indexOf(search);
		if(offset!=-1) {
		offset+=search.length;end=document.cookie.indexOf(";",offset);
			if(end==-1)end=document.cookie.length;returnvalue=unescape(document.cookie.substring(offset,end)) 
		};
	};
return returnvalue;
};

sHTML="<div id=\"popup\" style=\"border:"+strBorder+";width:180px;height:120px;position:absolute;top:2000px;left:2000px;display:none;\">";

if(pick_random) {
	sHTML+="<a href=\""+imgUrls[randImg]+"\" target=\"_blank\"><img src=\""+imgs[randImg]+"\" border=\"0\" /></a>"
}
else {
	for(i=0;i<imgs.length;i++) {
		sHTML+="<a href=\""+imgUrls[i]+"\" target=\"_blank\"><img src=\""+imgs[i]+"\" border=\"0\" /></a>"
		};
	};
sHTML+="</div>";
document.write(sHTML);
