function openWindow(link, name, width, height, scroll, resize, status, x, y) {
	var scrolling, resizable, statusBar;

	if(x == null) x = (screen.width / 2) - (width / 2);
	if(y == null) y = (screen.height / 2) - (height / 2);

	if(scroll) scrolling = "yes";
	else scrolling = "no";

	if(resize) resizable = "yes";
	else resizable = "no";

   if(status) statusBar = "yes";
   else statusBar = "no";

	return window.open(link, name, "screenX="+x+",screenY="+y+",left="+x+",top="+y+",width="+width+",height="+height+",scrollbars="+scrolling+",resizable="+resizable+",status="+statusBar);
}

function closeWindow() {
	window.opener.focus();
	window.close();
}

function pageTimeOut(url) {
	if (parent.self != self) {
		parent.document.location = url;
	}
	else {
		document.location = url;
	}
}

function chgButtonState(o, t, s, w) {
	if (s == null) {
		s = 1;
	}

	if (typeof w == "undefined") w = -1;

	o.src = "../common/buttons/buttongenerator.aspx?text="+t+"&state="+s+"&center=yes&width="+w;
}

