<!--

//opens a new popup window containing the page from parameter "url":
var newWin;
function OpenWin(url,title,w,h){
	w=parseInt(w);
	h=parseInt(h);
	if (!mac) if (new String(newWin)!="undefined" && newWin!=null) if (!newWin.closed) newWin.close();
	newWin=window.open(url,title,"width="+w+",height="+h+",top=50,left=50,location=no,directories=no,hotkeys=no,copyhistory=no,resizable=yes,menubar=no,status=no,toolbar=no,scrollbars=yes,z-lock=yes");
	//if (mac) win.resizeTo(w+25,h+50);
	newWin.focus();
}

 

//opens a new popup window containing the image from parameter:
var newWinImg;
function OpenImage(imgFile){
	if (new String(newWinImg)!="undefined" && newWinImg!=null) if (!newWinImg.closed) newWinImg.close();
	var newWinImg=window.open("","ProjectNewWindowImage","width=100,height=100,top=0,left=0,location=no,directories=no,hotkeys=no,copyhistory=no,resizable=no,menubar=no,status=no,toolbar=no,scrollbars=no,z-lock=yes");
	newWinImg.document.write('<html><head><title>Project :: New Window Image</title></head><body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" bgcolor="#ffffff" onload="window.resizeTo(parseInt(document.images[\'img\'].width)+10,parseInt(document.images[\'img\'].height)+29)"><img src="' + imgFile + '" name="img" /></body></html>');
	newWinImg.document.close();
	newWinImg.focus();
}

//used for paging:
function GoToPageNo(page){
	document.frmPaging.page.value=page;
	document.frmPaging.submit();
}



function doRefresh()
{
	window.location.href="admin.asp";
}

//open login pop-up
function OpenLoginWindow()
{
	var varURL = "";
	var hgt = document.body.clientHeight;
	var wdt = document.body.clientWidth;
	var topPos = hgt / 4;
	var leftPos = wdt / 4;
	alert(site_sslpath+"login_popup.asp")
	var win = new Window({
						className: "darkX", 
						title: "Login", 
						top:topPos, 
						left:leftPos, 
						width:420, 
						height:105, 
						closeCallback: doRefresh,
						url: site_sslpath+"login_popup.asp", showEffectOptions: {duration:0}, hideEffectOptions: {duration:0}
					})
	win.show();
}


  function login(showhide){
    if(showhide == "show"){
        document.getElementById('popupbox').style.visibility="visible"; /* If the function is called with the variable 'show', show the login box */
    }else if(showhide == "hide"){
        document.getElementById('popupbox').style.visibility="hidden"; /* If the function is called with the variable 'hide', hide the login box */
    }
  }

function ValidateLoginForm(frm)
	{
		if (Trim(frm.txtUsername.value)=="") {alert("Please enter username."); frm.txtUsername.focus(); return false;}
		else if (Trim(frm.txtPassword.value)=="") {alert("Please enter password."); frm.txtPassword.focus(); return false;}
		else return true;
	}

//-->