var thisTimeOut;

function openExtraWin(url, width, height, winname) {
	Win = window.open(url,winname,'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,location=no,status=yes');
	Win.creator = self;
}

function DoDelete(delscript)
{
if (confirm("Are you sure you want to delete this?"))
	window.location = delscript;
}

/*
function doLogout(notifyWinHandle) {
	notifyWinHandle.close();
	window.location = "logout.php";
}
*/

function doLogout() {
	window.location = "logout.php";
}

function notifyLogout() {
/*
	myNotifyWindow = window.open("", "tinyNotifyWindow", 'width=150, height=110');
	myNotifyWindow.document.write('<p align="center">You will be automatically logged out in 10 seconds.<p>');
	setInterval('doLogout(myNotifyWindow)',10000);
*/
	this.window.focus();
	document.getElementById('notify_logout_div').style.display = "inline";
	setInterval('doLogout()',30000);
	alert('You will be automatically logged out in 30 seconds.');
}

function setAutoLogout() {
	/* 3600000 = 1 hour */
	thisTimeOut = setTimeout('notifyLogout()',3600000);
}

function resetAutoLogout() {
	clearTimeout(thisTimeOut);
	setAutoLogout();
}

function winToTop() {
	this.window.focus();
}
