function PopupWindow(url, name) {
popupWin = window.open(url, name, 'scrollbars,resizable,width=950,height=510,left=0,top=0')
}

function showhideTable(TableId){ 
if (TableId.style.display=="none"){TableId.style.display=""} 
else{TableId.style.display="none"}
} 

function validate_quick_registration(){
	 if (document.quick_reg.email.value==""){
		alert ("Please enter your name and email address for this quick registration");
		return false;
	}		
}

function logout_confirm(){
	return confirm("Click OK to Logout or Cancel to Continue");
}
 
function login_try(){
	var err_str
	if(document.login_form.username.value=="" && document.login_form.password.value==""){
		err_str = 'Please enter your username and password';
	}else if (document.login_form.username.value==""){
		err_str = 'Please enter your username';
	}else if (document.login_form.password.value==""){
		err_str = 'Please enter your password';
	}
	
	if(err_str){
		alert(err_str);
		return false;
	}else{
		return true;
	}
}

function checknumeric(){
   // Get ASCII value of key that user pressed
   var key = window.event.keyCode;

   // Was key that was pressed a numeric character (0-9)?
   if ( key > 47 && key < 58 )
      return; // if so, do nothing
   else
      window.event.returnValue = null; // otherwise discard character
}
function imageWindow( url, name, width, height ) {
	if ( width > 800 ) {
		width = 800;
	}
	if ( height > 600 ) {
		height = 600;
	}
	winprops = 'height='+height+',width='+width+',resizable=1,scrollbars=1,left=0,top=0';
	win = window.open(url, 'image', winprops);
}

