


var dopopupwh;
function dopopup(url,winhandle,width,height)
{
	if (typeof(dopopupwh) != "undefined" && dopopupwh != self) {
			dopopupwh.location = url;
			dopopupwh.focus;
			}
		else {
			dopopupwh = open(url,winhandle,'height=' + height + ',width=' + width + ',resizable=yes,scrollbars=yes,menubar=no,toolbar=no,directories=no,location=no,status=yes,left=0,top=0,screenX=0,screenY=0')
		}
}

function fitWindowSize() {
	window.resizeTo(500, 500);
	
	width = 500 - (document.body.clientWidth -  document.images[0].width);
	height = 500 - (document.body.clientHeight -  document.images[0].height);
	window.resizeTo(width+30, height+125);
}

function suicide() {
	self.opener.dopopupwh = opener;
}



function ClearFormField(field,text) {
	// Usage: onFocus="ClearFormField(this.form.username,'Username');"
		if (field.value == text) {
			field.value = "";
			field.SetFocus;
		}
	}

	function Navigate(FormObj) {
		if (FormObj.options[FormObj.selectedIndex].value != "") {
			self.location.href=FormObj.options[FormObj.selectedIndex].value;
		}
	}

