// Common JScript source code


function PopupWithScrolls(url, wname, w, h) 
{
  window.open(url, wname, "menubar=1,scrollbars=1,toolbar=0,location=1,width="+w+", height="+h);
}

function Popup(url, wname, w, h) 
{
  window.open(url, wname, "menubar=1,toolbar=0,location=1,directories=0,status=1,copyhistory=0,width="+w+", height="+h);
}

/*

var isNav = (navigator.appName.indexOf("Netscape") != -1);
var isIE = (navigator.appName.indexOf("Microsoft") != -1);

function WinPop(winName, winSrc, winWidth, winHeight, scrollbars, menubar, toolbar, winStatus, resizable, winLocation, winTop, winLeft) {
	winProps = "";
	winProps = winProps + ((winWidth > 0) ? ",width="+winWidth : "") +
		((winHeight > 0) ? ",height="+winHeight : "") +
		((winTop > 0) ? ",top="+winTop : "") +
		((winLeft > 0) ? ",left="+winLeft : "") +
		((scrollbars == 0) ? ",scrollbars=0" : ",scrollbars=1") +
		((menubar == 0) ? ",menubar=0" : ",menubar=1") +
		((toolbar == 0) ? ",toolbar=0" : ",toolbar=1") +
		((winStatus == 0) ? ",status=0" : ",status=1") +
		((resizable == 0) ? ",resizable=0" : ",resizable=1") +
		((winLocation == 0) ? ",location=0" : ",location=1");
	winProps = winProps.substring(1,winProps.length);
	//if (isNav) {winTop = window.screenY+100; winLeft = window.screenX+50; };
	//if (isIE) {winTop = window.screenTop+25; winLeft = window.screenLeft+50; };
	var winLeft = (screen.width-winWidth)/2;
	var winTop = (screen.height-winHeight)/2;
	wname=window.open(winSrc, winName, winProps);
}

function ShowModal(winName, winSrc, winWidth, winHeight) {
	if (isIE) {
		var params = "dialogWidth:" + winWidth + "px; dialogHeight:" + winHeight + "px; center:yes; status:no";
		var x = window.showModalDialog(winSrc,"",params);
	} else {
		var winLeft = (screen.width-winWidth)/2;
		var winTop = (screen.height-winHeight)/2;
		var params = "menubar=0,toolbar=0"+
			",resizable=0,scrollbars=0,width="+winWidth+
			",height="+winHeight+",top="+winTop+",left="+winLeft+
			",modal=yes";
		var x = window.open(winSrc,winName,params);
	}
}
function ShowHelp(x)
{
	WinPop("help","/ShowHelp.asp?topic="+x,400,400,1,0,0,0,1,0);
}
function SetCookie(CookieName,Key,Val,Expires,Path,Domain,Secure) {
	if (Expires) {
		var expire = new Date();
		expire.setTime(expire.getTime() + Expires*24*60*60*1000);
		Expires = expire.toUTCString();
	}
	var Cookie = document.cookie;
	x = CookieName + "=";
	CookieStart = Cookie.indexOf(x);
	if (CookieStart == -1) {
		Cookie = CookieName + "=" + Key + "=" + escape(Val);
	} else {
		CookieStart
		CookieEnd = Cookie.indexOf(";",CookieStart);
		if (CookieEnd == -1) {
			CookieEnd = Cookie.length;
		}
		Cookie = Cookie.substring(CookieStart,CookieEnd);
		x = Key + "=";
		KeyStart = Cookie.indexOf(x);
		if (KeyStart == -1) {
			Cookie += "&" + Key + "=" + escape(Val);
		} else {
			KeyStart = KeyStart;
			KeyEnd = Cookie.indexOf("&",KeyStart);
			if (KeyEnd == -1) {
				KeyEnd = Cookie.length;
			}
			x = Cookie.substring(KeyStart,KeyEnd);
			y = Key + "=" + escape(Val);
			Cookie = Cookie.replace(x,y);
		}
	}
	Cookie += ((!Expires) ? "" : ("; Expires=" +
	Expires)) +
	((!Path) ? "" : ("; Path=" + Path)) +
	((!Domain) ? "" : ("; Domain=" + Domain)) +
	((!Secure) ? "" : "; Secure");
	document.cookie = Cookie;
}
function RemoveCookie(CookieName,Key,Path) {
	//alert("RemoveCookie() called.");
	if (Key) {
		var Cookie = document.cookie;
		x = CookieName + "=";
		CookieStart = Cookie.indexOf(x);
		if (CookieStart == -1) {
			return;
		} else {
			//CookieStart
			CookieEnd = Cookie.indexOf(";",CookieStart);
			if (CookieEnd == -1) {
				CookieEnd = Cookie.length;
			}
			Cookie = Cookie.substring(CookieStart,CookieEnd);
			x = Key + "=";
			KeyStart = Cookie.indexOf(x);
			if (KeyStart == -1) {
				return;
			} else {
				//KeyStart
				KeyEnd = Cookie.indexOf("&",KeyStart);
				if (KeyEnd == -1) {
					KeyEnd = Cookie.length;
				}
				//alert(Cookie.charAt(KeyStart-1));
				if (Cookie.charAt(KeyStart-1) == "&") {
					KeyStart = KeyStart - 1;
				}
				x = Cookie.substring(KeyStart,KeyEnd+1);
				Cookie = Cookie.replace(x,"");
				Cookie += ((!Path) ? "" : ("; Path=" + Path));
				document.cookie = Cookie;
			}			
		}	
	} else {
		SetCookie(CookieName,"Remove","Remove",-1);
	}
}
function GetCookie(CookieName,Key) {
	Cookie = document.cookie;
	CookieArray = Cookie.split("; ");
	for(i=0; i<CookieArray.length; i++) {
		if (CookieArray[i].substr(0,CookieName.length) == CookieName) {
			KeysArray = CookieArray[i].substr(CookieName.length+1).split("&");
			for(k=0; k<KeysArray.length; k++) {
				if (KeysArray[k].substr(0,Key.length) == Key) {
					value = KeysArray[k].substr(Key.length+1);
					return unescape(unescape(value));
				}
			}
		}
	} 
	return null;
}
function SwapImg(x,imgSrc) {
	document.getElementById(x).src = imgSrc;
}
function ImgPop(img) {
	img = escape(img);
	url = 'http://tbserver/imgPop.asp?img=' + img + '&title=' + img;
	WinPop('Photo',url,640,480,1,0,0,0,1,0);
}

function ShowPerfmon(machine) {
	var url;
	url = "/perfmon.htm?m="+machine;
	WinPop("_blank",url,800,600,0,0,0,0,1,0);
}

*/