/* 	
	GRAPHICAL PROGRESS OF COUNTDOWN OF LOGIN TIME
	Created 2004-04-06 by Robert Karlsson <robert /AT/ i2studios.com> for i2 STUDIOS
	Visit http://www.i2studios.com for additional details
	This script is free and can be used freely. For details about license, refer to http://www.i2studios.com/php/policy.php


	NOTE: Change the value in setTimeout below. Unit: milliseconds, eg 18000=15 minutes.
	It should be set to be 1/100 of the time in the cookie (that is, if you leave the progress bar 100 pixels wide)
	
*/

function updateTime(){
	if (document.images['expires'].width>1) {
		//decrease the width 1 pixel
		document.images['expires'].width=document.images['expires'].width-1;
		setTimeout("updateTime();",50);
	}
	else if (document.images['expires'].width>0) {
		//set the width to zero to stop the function from being run again
		document.images['expires'].width=0;
		alert('Time\'s up! Now a page should be loaded to logout the user...');
		//a more suitable solution might be:
		//window.top.main.self.location='logout.php';
	}
}