<!-- Begin
function submitAddrestaurant() {
{if ( isname() && isusername() && isemail() && isestablishment() && iscity() && iscountry() && iscategory() && islocation() && isdescription() && iscapture())
       {
		  return true
     }
}
return false;
}
function isname() {
if (document.forms[0].elements[0].value == "") {
alert ("Please enter your name.")
document.forms[0].elements[0].focus();
return false;
}
return true;
}
function isusername() {
if (document.forms[0].elements[1].value == "") {
alert ("Please enter your gayxi username.")
document.forms[0].elements[1].focus();
return false;
}
return true;
} 
function isemail() {
if (document.forms[0].elements[2].value == "") {
alert ("Please enter your email address.")
document.forms[0].elements[2].focus();
return false;
}
if (document.forms[0].elements[2].value.indexOf ('@',0) == -1 ||
document.forms[0].elements[2].value.indexOf ('.',0) == -1) {
alert ("Please enter a valid email address.")
document.forms[0].elements[2].select();
document.forms[0].elements[2].focus();
return false;
}
return true;
}
function isestablishment() {
if (document.forms[0].elements[3].value == "") {
alert ("Please enter the name of the venue or event.")
document.forms[0].elements[3].focus();
	// box is not checked
	return false;
}
return true;
}
function iscity() {
if (document.forms[0].elements[5].value == "") {
alert ("Please enter the city.")
document.forms[0].elements[5].focus();
	// box is not checked
	return false;
}
return true;
}
function iscountry() {
if (document.forms[0].elements[6].value == "") {
alert ("Please enter the country.")
document.forms[0].elements[6].focus();
	// box is not checked
	return false;
}
return true;
}
function iscategory() {
if (document.forms[0].elements[7].value == "") {
alert ("Please enter a category.")
document.forms[0].elements[7].focus();
	// box is not checked
	return false;
}
return true;
}
function islocation() {
if (document.forms[0].elements[12].value == "") {
alert ("Please enter a location.")
document.forms[0].elements[12].focus();
	// box is not checked
	return false;
}
return true;
}
function isdescription() {
if (document.forms[0].elements[16].value == "") {
alert ("Please enter a description.")
document.forms[0].elements[16].focus();
	// box is not checked
	return false;
}
return true;
}
function iscapture() {

var valName = new RegExp("y6phv", "i");

if (document.forms[0].elements[25].value == "") {
alert ("Please enter the security code")
document.forms[0].elements[25].focus();
return false;
}
if (document.forms[0].elements[25].value.match(valName) == null) {
alert ("The security code you entered is not correct. Please try again.")
document.forms[0].elements[25].focus();
return false;
}
return true;
}
