// JavaScript Document

function BrowserCheck() {   
	var b = navigator.appName
	if (b=="Netscape") this.b = "ns"
	else if (b=="Microsoft Internet Explorer") this.b = "ie"
	else this.b = b
	this.version = navigator.appVersion
	this.v = parseInt(this.version)
	this.ns = (this.b=="ns" && this.v>=4)
	this.ns4 = (this.b=="ns" && this.v==4)
	this.ns5 = (this.b=="ns" && this.v==5)
	this.ns6 = (this.b=="ns" && this.v==6)
	this.ie = (this.b=="ie" && this.v>=4)
	this.ie4 = (this.version.indexOf('MSIE 4')>0)
	this.ie5 = (this.version.indexOf('MSIE 5')>0)
	this.min = (this.ns||this.ie)
}//endfunction
is = new BrowserCheck();

function redirect($s){
	self.location.href=$s;
}//end function

function open_childwin($url, $w, $h){
	$t = (screen.height / 2) - ($h / 2);
	$l = (screen.width / 2) - ($w / 2);
	$childwin = window.open($url, "subWindow", "status, scrollbars=yes,top="+$t+",left="+$l+",height="+$h+",width="+$w);
}//end function

function submit_enter(evt, frm, el) {
	evt = (evt) ? evt : event;
	var charCode = (evt.charCode) ? evt.charCode :
		((evt.which) ? evt.which : evt.keyCode);
	if (charCode == 13 || charCode == 3) {
		
		frm.pass.value = hex_md5(el.value);
		frm.submit();
		return false;
	}//endif
	return true;
}//endfunction
