<!--
function blockError(){return true;}
window.onerror = blockError;

function OnGo()
{
	var strMess;
	strMess= "";
	if ((document.thisForm.firstname.value).length < 1){ strMess += "\nPlease enter your firstname.";}
	if ((document.thisForm.surname.value).length < 1){ strMess += "\nPlease enter your lastname.";}
	if ((document.thisForm.city.value).length < 1){ strMess += "\nPlease enter your City.";}
	if ((document.thisForm.state.value).length < 1){ strMess += "\nPlease enter your State.";}
	if ((document.thisForm.country.value).length < 1){ strMess += "\nPlease enter your Country.";}
	if ((document.thisForm.phone.value).length < 1){ strMess += "\nPlease enter your Phone Number.";}
	if (!isEmail(document.thisForm.email.value)){strMess += "\nPlease enter your email.";}
	//Submit entry to database 
	if(strMess == "")
	{
		return true;
	}
	else
	{
		alert("The following input error occured \n\n" + strMess);
		return false;
	}
}
function OnGoJoin()
{
    var strMess;
	strMess= "";
	if ((document.thisForm.firstname.value).length < 1){ strMess += "\nPlease enter your firstname.";}
	if ((document.thisForm.surname.value).length < 1){ strMess += "\nPlease enter your surname.";}
	if ((document.thisForm.city.value).length < 1){ strMess += "\nPlease enter your City.";}
	if ((document.thisForm.state.value).length < 1){ strMess += "\nPlease enter your State.";}
	if ((document.thisForm.country.value).length < 1){ strMess += "\nPlease enter your Country.";}
	if (!isEmail(document.thisForm.email.value)){strMess += "\nPlease enter your email.";}	
	if ((document.thisForm.password.value)!=(document.thisForm.password2.value)){strMess += "\nYour passwords do not match.";}
	//Submit entry to database 
	if(strMess == "")
	{
		return true;
	}
	else
	{
		alert("The following input error occured \n\n" + strMess);
		return false;
	}
}

function isEmpty(s)
{   
	return ((s == null) || (s.length == 0))
}
function isEmail(s)
{   
	if(isEmpty(s)) 
	{
		return false;
	}

    var i = 1;
    var sLength = s.length;
    while ((i < sLength) && (s.charAt(i) != "@"))
    { i++
    }
    if ((i >= sLength) || (s.charAt(i) != "@")) return false;
    else i += 2;
    while ((i < sLength) && (s.charAt(i) != "."))
    { i++
    }
    if ((i >= sLength - 1) || (s.charAt(i) != ".")) return false;
    else return true;
}

function Check()
{
	var strMsg=""
	if((document.thisForm.user.value).length==0){strMsg+="Please enter your username.\n"}
	if((document.thisForm.pass.value).length==0){strMsg+="Please enter your password."}
	if (strMsg=="") 
	{return true;}
	else
	{
		alert(strMsg);
		return false;
	}		
}

function OnProc()
{
	var strMess;
	strMess= "";
	if (((document.thisForm.city.value)=="")&&((document.thisForm.state.value)=="")){ strMess += "\nYou must have either a City/Town or a State.";}
	if (((document.thisForm.city.value)!="")&&((document.thisForm.state.value)=="")){ strMess += "\nYou must enter a State/Province when entering a City.";}
	if ((document.thisForm.country[document.thisForm.country.selectedIndex].value)==""){ strMess += "\nPlease select the Country.";}
	//Submit entry to database 
	if(strMess == "")
	{
		return true;
	}
	else
	{
		alert("The following errors occured \n" + strMess);
		return false;
	}
}


// -->
