/* THE FILE prototype.js MUST BE INCLUDED BEFORE THIS FILE */
function isNetscape() {
			 if (navigator.appName == "Netscape") {
				return true
			}
			return false
		}
var navcheck = isNetscape();
function openWin4(opturl) 
{
	paramstring='scrollbars=yes,resizable=yes,toolbar=no,menubar=no,width=626,height=500,left=400,top=100'
	 optwind = open(opturl, '', paramstring);
  	if (navcheck) 
	{
		optwind.focus()
	}
}
function check_form()
{
	empty = /^\s*$/; /* EMPTY INPUT REGEX CHECK VARIABLE */

	/* GET ALL FORM INPUT OBJECTS */
	aname = $('accountname'); 
	apass = $('accountpass');
	uname = $('username');
	upass = $('userpass');

	/* EMPTY INPUT LOGIC WORKS DOWN FORM FAILING OF FIRST REQUIRED EMPTY INPUT */
	if( !aname.value.match( empty ) )
	{
		if( !apass.value.match( empty ) )
		{
			if( !uname.value.match( empty ) )
			{
				if( !upass.value.match( empty ) )
				{
					return true;
				}
				else
				{
					alert( "Please enter a user password." );
					upass.focus();
					return false;
				}	
			}
			else
			{
				alert( "Please enter a username." );
				uname.focus();
				return false;
			}
		}
		else
		{
			alert( "Please enter an account password." );
			apass.focus();
			return false;
		}
	}
	else
	{
		alert( "Please enter an account name." );
		aname.focus();
		return false;
	}
}
function login_init()
{
	var acname = $('accountname');
	if( acname.value != '' )
	{
		$('accountpass').focus();
	}	
	else
	{
		acname.focus();
	}
}
