
/*
Opens Popup Centered
URL: URL of popup window
w: Width of popup window
h: Height of popup window
*/
function PopupCentered(URL, w, h) 
{
	var winW = (screen.width - w) / 2;
	var winH = (screen.height - h) / 2;
	details = 'height='+h+',width='+w+',top='+winH+',left='+winW+',scrollbars=yes,resizable=yes';
	win = window.open(URL, "Infrastrategy", details)
}

/*
Confirm Deletion
*/
function ConfirmDelete()
{
	var name = confirm("Are you sure you want to delete?");
	return name;
}
function Confirm()
{
	var name = confirm("Are you sure you want to do this?");
	return name;
}
function ConfirmLogout()
{
	var name = confirm("Are you sure you want to logout?");
	return name;
}
function ConfirmMessage(URL1,URL2,Message)
{
	var name=confirm(Message)
	if (name==true)
	{
		window.location.href=URL1;
		window.navigate;
	}
	else
	{
	    if (URL1 != "")
	    {
		    window.location.href=URL2;
		    window.navigate;
		}
	}
}
function butCancel_OnClick() 
{
	return window.confirm("Your Changes will be lost. Are you sure want to continue");
}

function btnDelete_Click() {
	a = window.confirm("Are you sure want to delete these files?");
	if(a) {
		return true;
	}
	else {
		return false;
	}
}
function imgACL_Click(filename) {
	alert(filename);
}

/* Auto Scroller */
i = 0
var speed = 1
function scroll() 
{
    i = i + speed
    var div = document.getElementById("scrollcontent")
    div.scrollTop = i
    if (i > div.scrollHeight - 160) {i = 0}
    t1 = setTimeout("scroll()",100)
}