<!--
var imgWaitPreload = "/images/updates/wait_button.gif";
var imgWaitLoc = -1;
PreloadIWaitImage();

function PreloadIWaitImage()
{
	if (document.preloadArray==null) document.preloadArray = new Array();
	var j = document.preloadArray.length;
	imgWaitLoc = j
	document.preloadArray[j] = new Image();
	document.preloadArray[j].src = imgWaitPreload;
}

function ShowWait(sCapt)
{
	var obj = document.getElementById("wait");
	obj.innerHTML =  sCapt + "<p><img id=imgwait name=imgwait src=''>"; 
	var img = document.getElementById("imgwait");
	img.src = document.preloadArray[imgWaitLoc].src
	obj.style.visibility = "visible";
	return true;
}

function ShowStandardWindow(sPage, sCapt, iWidth, iHeight)
{
	win = window.open(sPage, sCapt, "width=" + iWidth + ", height=" + iHeight);
	win.focus();
	return false;
}

function ShowMinimumWindow(sPage, sCapt, iWidth, iHeight)
{
	win = window.open(sPage, sCapt, "width=" + iWidth + ", height=" + iHeight + ", location=no, menubar=no, scrollbar=no, statusbar=no, toolbar=no, directories=no, resizable=no");
	win.focus();
	return false;
}

function ChildCloseAndReport()
{
	window.close();
	window.opener.ChildClosed();
}

function ChildClosed()
{
	window.location.reload();
}

function ShowDivWindow(sName, sCapt, sBody, iWidth, iHeight)
{
	var mBody, main, sText;
	mBody = document.getElementById("mainbody");
	main = document.getElementById(sName);
	if (main == null)
	{
		main = document.createElement("div");
		main.setAttribute("id", sName);
		main.setAttribute("class", "notice");
		main.setAttribute("className", "notice");
		main.style.position="absolute";
	}

	main.style.minWidth = iWidth;
	main.style.minHeight = iHeight;
	main.style.width = 'auto';
	main.style.height = 'auto';
	main.style.top = (window.pageYOffset + iHeight / 2) + "px";
	main.style.left = ((window.innerWidth / 2) - (iWidth / 2)) + "px";
	sText = "<div Class='toolbar'>\n";
	sText += sCapt + "\n";
	sText += "<div Class='toolbutton'><input type='button' class='close' onClick=\"return HideDiv('" + sName + "');\" value='X'></div>\n";
	sText += "</div>\n";
	sText += sBody + "\n";
	main.innerHTML = sText;
	mBody.appendChild(main);
	ShowDiv(sName);
	return false;
}

function ShowDiv(sName)
{
	return DivVis(sName, "visible");
}

function HideDiv(sName)
{
	return DivVis(sName, "hidden");
}

function DivVis(sName, sVis)
{
	var obj;
	obj = document.getElementById(sName);
	obj.style.visibility = sVis;
	return true;
}

function GotoPage(sPage)
{
	location.href = sPage;
	return true;
}

function GetInputGotoPage(sLink, sCapt)
{
	var sRet = prompt(sCapt, "");
	if (sRet != null && sRet != "")
	{
		sLink = sLink.replace("%1", sRet);
		return GotoPage(sLink);
	}
	return false;
}

function CheckSlectedGotoPage(sLink, cObj)
{
	if (!IsSomethingChecked(cObj)) return false;
	sendData(cObj, sLink, false);
}

function ImgSwap(cName, sSrc)
{
	var obj = document.getElementById(cName);
	obj.src = sSrc;
	return true;
}

function SelectAll(cSrc, cObj)
{
	var src = document.getElementById(cSrc);
	var obj = document.getElementsByName(cObj);
	for (var i=0; i < obj.length; i++)
	{
		obj[i].checked = src.checked;
	}
}

function IsSomethingChecked(cObj)
{
	var obj = document.getElementsByName(cObj);	
	for (var i=0; i < obj.length; i++)
	{
		if (obj[i].checked) return true;
	}
	alert("Nothing selected, select something and try again!");
	return false;
}

function rememberMe(cLogin, cCheck)
{
	var login = document.getElementById(cLogin);
	var check = document.getElementById(cCheck);

	if (check.checked == true)
	{
		setCookie("keyes.login.name", login.value, 30);
	}
	else
	{
		if (getCookie("keyes.login.name") != null) setCookie("keyes.login.name", "", 0);
	}
	return true;
}

function getLogin(cLogin, cPwd, cCheck)
{
	var login = document.getElementById(cLogin);
	var txt = getCookie("keyes.login.name");
	if (txt == null || txt == "")
	{
		login.focus();
		return;
	}

	var pwd = document.getElementById(cPwd);
	var check = document.getElementById(cCheck);

	login.value = txt;
	check.checked = true;
	pwd.focus();
}

function getCookie(cName)
{
	if (document.cookie.length > 0)
	{
		var cStart = document.cookie.indexOf(cName + "=");
		if (cStart != -1)
		{
			cStart = cStart + cName.length + 1;
			var cEnd = document.cookie.indexOf(";", cStart);
			if (cEnd == -1) cEnd = document.cookie.length;
			return unescape(document.cookie.substring(cStart, cEnd));
		}
	}
	return "";
}

function setCookie(cName, sValue, iExp)
{
	var expDate = new Date();
	expDate.setDate(expDate.getDate() + iExp);
	document.cookie = cName + "=" + escape(sValue) + ((iExp != null) ? ";expires=" + expDate.toUTCString() : "");
}

function setCookieShort(cName, sValue, iExp)
{
	var expDate = new Date();
	expDate.setHours(expDate.getHours() + iExp);
	document.cookie = cName+ "=" + escape(sValue) +	((iExp != null) ? ";expires=" + expDate.toUTCString() : "");
}
-->
