//Window Status

setInterval("window.status=' Onla: [www.onlaet.com]'",1);

//Gradual-Highlight image script- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use

function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",50)
}

function low(which2){
clearInterval(highlighting)
if (which2.style.MozOpacity)
which2.style.MozOpacity=0.3
else if (which2.filters)
which2.filters.alpha.opacity=30
}

function highlightit(cur2){
if (cur2.style.MozOpacity<1)
cur2.style.MozOpacity=parseFloat(cur2.style.MozOpacity)+0.1
else if (cur2.filters&&cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}

function low2(which2){
if (which2.style.MozOpacity)
which2.style.MozOpacity=0.3
else if (which2.filters)
which2.filters.alpha.opacity=30
}

function highlightit2(cur2){
if (cur2.style.MozOpacity<1)
cur2.style.MozOpacity=parseFloat(cur2.style.MozOpacity)+0.1
else if (cur2.filters&&cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.cycle)
clearInterval(cycle)
}

function openNewWindow(file, name)
{
	var features = 'width=700,height=500,directories=no,location=no,menubar=no,scrollbars=yes';
		features += ',status=no,toolbar=no,resizable=no';

	window.open(file,name,features);
	
	return false;
}

function setBookmark()
{
	if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4))
	{
		window.external.AddFavorite ('http://www.onlaet.com/','ONLA: Adult Entertainment!');
	}
	else
	{
		var msg = "To bookmark Onla with your browser, press CTRL+D";
		alert(msg);
	}
}

var iGirl = 1;
var iCount = 1;
var bForward = true;
var cycle;

function init()
{
	cycle = setInterval("highlightit(girl())", 250 );
}
			
function girl()
{
	var oGirl = document.getElementById('girl-' + iGirl );
				
	if ( oGirl.style.MozOpacity >= 1 )
	{
		low2(oGirl);
		iGirl = (bForward ? ++iGirl : --iGirl);
	}	
	else if ( oGirl.filters && oGirl.filters.alpha.opacity >= 100 )
	{
		low2(oGirl);
		iGirl = (bForward ? ++iGirl : --iGirl);
	}
				
	if ( iGirl > 10 ) 
	{
		bForward = false;
					
		iGirl = (bForward ? ++iGirl : --iGirl);
		iCount++;
	}
				
	if ( iGirl < 1 )
	{
		clearInterval(cycle);
		iGirl = 1;
	}
				
	oGirl = document.getElementById('girl-' + iGirl );
				
	return oGirl;
}
