// JavaScript Document
function chpass()
{
	var popup
	popup = window.open("chpass.php","ChangePassword","width=400,height=400,top=250,left=350,resizable=no,menubar=no,location=no");
	popup.focus()
}

function forgot()
{
	var popup
	popup = window.open("forgot.php","forgot","width=270,height=210,top=250,left=350,resizable=no,menubar=no,location=no");
	popup.focus()
}

function numbersonly(e, decimal)
{
	var key;
	var keychar;
	
	if (window.event) {
	   key = window.event.keyCode;
	}
	else if (e) {
	   key = e.which;
	}
	else {
	   return true;
	}
	keychar = String.fromCharCode(key);
	
	if ((key==null) || (key==0) || (key==8) ||  (key==9) || (key==13) || (key==27) ) {
	   return true;
	}
	else if ((("0123456789").indexOf(keychar) > -1)) {
	   return true;
	}
	else if (decimal && (keychar == ".")) { 
	  return true;
	}
	else
	   return false;
}

function alphaonly(e, decimal)
{
	var key;
	var keychar;
	
	if (window.event) {
	   key = window.event.keyCode;
	}
	else if (e) {
	   key = e.which;
	}
	else {
	   return true;
	}
	keychar = String.fromCharCode(key);
	if ((("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-#@$%&*").indexOf(keychar) > -1)) {
	   return true;
	}
	else
	   return false;
}
