function editItem(theForm)
{
 if (theForm.itemTitle.value == "")
  {
    alert("Please enter a value for the \"Item Title\" field.");
    theForm.itemTitle.focus();
    return (false);
  }
 if (theForm.itemPrice.value == "")
  {
    alert("Please enter a value for the \"Item Price\" field.");
    theForm.itemPrice.focus();
    return (false);
  }
   return (true);
}

function editBio(theForm)
{
 if (theForm.name.value == "")
  {
    alert("Please enter a value for the \"Name\" field.");
    theForm.name.focus();
    return (false);
  }
 if (theForm.title.value == "")
  {
    alert("Please enter a value for the \"Title\" field.");
    theForm.title.focus();
    return (false);
  }
   if (theForm.email.value == "")
  {
    alert("Please enter a value for the \"Email\" field.");
    theForm.email.focus();
    return (false);
  }
   if (theForm.line.value == "")
  {
    alert("Please enter a value for the \"Line Order\" field.");
    theForm.line.focus();
    return (false);
  }
   return (true);
}

function editEntertainers(theForm) {
 if (theForm.fName.value=="")
  {
    alert("Please enter a value for the \"First Name\" field.");
    theForm.fName.focus();
    return (false);
  }
   if (theForm.lName.value=="")
  {
    alert("Please enter a value for the \"Last Name\" field.");
    theForm.lName.focus();
    return (false);
  }
  return (true);
}

function editAthletes(theForm) {
 if (theForm.fName.value=="")
  {
    alert("Please enter a value for the \"First Name\" field.");
    theForm.fName.focus();
    return (false);
  }
   if (theForm.lName.value=="")
  {
    alert("Please enter a value for the \"Last Name\" field.");
    theForm.lName.focus();
    return (false);
  }
  return (true);
}

function editClients(theForm) {
 if (theForm.title.value=="")
  {
    alert("Please enter a value for the \"Header\" field.");
    theForm.title.focus();
    return (false);
  }
  return (true);
}

// Writen by hurriKane Solutions, LLC 2002 All Rights Reserved
function sameAddress(theForm)
{
	var strErrorVal = "The following fields are required for this Feature: ";
	var focus = 0;
	if (theForm.fName.value == "")
	{
		strErrorVal += "First Name, ";
		focus = 1;
	}
	if (theForm.lName.value == "")
	{
		strErrorVal += "Last Name, ";
		focus = 2;
	}
	if (theForm.street.value == "")
	{
		strErrorVal += "Address, ";
		focus = 3;
	}
	 if ( (theForm.city.value == "") )
	{
		strErrorVal += "City, ";
		focus = 4;
	}
	 if ( (theForm.state.value == "") )
	{
		strErrorVal += "State, ";
		focus = 5;
	}
 if ( (theForm.zip.value == "") )
	{
		strErrorVal += "Zip ";
		focus = 6;
	}
if (focus != 0){
	alert(strErrorVal); }
else {
	theForm.bfName.value = theForm.fName.value
	theForm.blName.value = theForm.lName.value
	theForm.bstreet.value = theForm.street.value
	theForm.bcity.value = theForm.city.value
	theForm.bstate.value = theForm.state.value
	theForm.bzip.value = theForm.zip.value
	}
}

function addPhoto(theForm) {
 if (theForm.image.value=="")
  {
    alert("Please Upload an Image before submitting this form.");
    theForm.image.focus();
    return (false);
  }
  return (true);
}

function addGallery(theForm) {
 if (theForm.eventId.value=="")
  {
    alert("Please select an event.");
    theForm.eventId.focus();
    return (false);
  }
  return (true);
}

function addaType(theForm) {
 if (theForm.aType.value=="")
  {
    alert("Please enter a value for the \"Title\" field.");
    theForm.aType.focus();
    return (false);
  }
  return (true);
}
function addbType(theForm) {
 if (theForm.bType.value=="")
  {
    alert("Please enter a value for the \"Title\" field.");
    theForm.bType.focus();
    return (false);
  }
  return (true);
}
function addeType(theForm) {
 if (theForm.eType.value=="")
  {
    alert("Please enter a value for the \"Title\" field.");
    theForm.eType.focus();
    return (false);
  }
  return (true);
}

function creditCheck(theForm) {
var valid = 1
 if (theForm.fName.value == "")
  {
    alert("Please enter a value for the \"First Name\" field.");
    theForm.fName.focus();
    return (false);
  }
 if (theForm.lName.value == "")
  {
    alert("Please enter a value for the \"Last Name\" field.");
    theForm.lName.focus();
    return (false);
  }

 if (theForm.street.value == "")
  {
    alert("Please enter a value for the \"Street\" field.");
    theForm.street.focus();
    return (false);
  }
 if (theForm.city.value == "")
  {
    alert("Please enter a value for the \"city\" field.");
    theForm.city.focus();
    return (false);
  }
 if (theForm.state.value == "")
  {
    alert("Please enter a value for the \"state\" field.");
    theForm.state.focus();
    return (false);
  }
  if (theForm.zip.value.length  < 5)
  {
		alert("Please enter a correct value for the \"Zip\" field.");
    theForm.zip.focus();
    return (false);
  }
if (!hkZip(theForm.zip.value)) {
		valid = 0
		alert("Please enter a correct value for the \"Zip\" field.");
		theForm.zip.focus();
    	return (false);
	}
 if (theForm.email.value == "")
  {
    alert("Please enter a value for the \"Email\" field.");
    theForm.email.focus();
    return (false);
  }
 if (theForm.phone.value == "")
  {
    alert("Please enter a value for the \"Phone\" field.");
    theForm.phone.focus();
    return (false);
  }
 if (theForm.bfName.value == "")
  {
    alert("Please enter a value for the \"Billing First Name\" field.");
    theForm.bfName.focus();
    return (false);
  }
 if (theForm.blName.value == "")
  {
    alert("Please enter a value for the \"Billing Last Name\" field.");
    theForm.blName.focus();
    return (false);
  }
if (theForm.bstreet.value == "")
  {
    alert("Please enter a value for the \"Billing Street\" field.");
    theForm.bstreet.focus();
    return (false);
  }
 if (theForm.bcity.value == "")
  {
    alert("Please enter a value for the \"city\" field.");
    theForm.bcity.focus();
    return (false);
  }
 if (theForm.bstate.value == "")
  {
    alert("Please enter a value for the \"state\" field.");
    theForm.bstate.focus();
    return (false);
  }
  if (theForm.bzip.value.length  < 5)
  {
		alert("Please enter a correct value for the \"Zip\" field.");
    theForm.bzip.focus();
    return (false);
  }
if (!hkZip(theForm.bzip.value)) {
		valid = 0
		alert("Please enter a correct value for the \"Zip\" field.");
		theForm.bzip.focus();
    	return (false);
	}
 if (theForm.cardType.value == "")
  {
    alert("Please enter a value for the \"Card Type\" field.");
    theForm.cardType.focus();
    return (false);
  }
  if (theForm.cardNumber.value.length  < 16)
  {
    alert("You have Entered in an Invalid Card Number!");
    theForm.cardNumber.focus();
    return (false);
  }
if (!hkCardNumber(theForm.cardNumber.value)) {
		valid = 0
		alert("Please Enter in Numbers Only")
		theForm.cardNumber.focus();
    	return (false);
	}

if (!hkExperation(theForm.experation.value)) {
		valid = 0
		alert("Please enter a correct value for the \"Experation Date\" field.")
		theForm.experation.focus();
    	return (false);
	}
 if (theForm.experation.value.length  <= 4)
  {
    alert("Please make sure the format of your \"Experation Date\" is as follows \"00/00\"");
    theForm.experation.focus();
    return (false);
  }
 return (true);
 }
	
function hkCardNumber(TheNumber) {
var valid = 1
var hkGoodNumbers = "0123456789"
var i = 0
if (TheNumber=="") {
valid = 0
	}
for (i =0; i <= TheNumber.length -1; i++) {
if (hkGoodNumbers.indexOf(TheNumber.charAt(i)) == -1) {
valid = 0
}
	}
return valid
}

function hkExperation(TheNumber2) {
var valid = 1
var hkGoodNumbers2 = "0123456789/"
var i = 0
if (TheNumber2=="") {
valid = 0
	}
for (i =0; i <= TheNumber2.length -1; i++) {
if (hkGoodNumbers2.indexOf(TheNumber2.charAt(i)) == -1) {
valid = 0
}
	}
return valid
}

function hkZip(TheNumber3) {
var valid = 1
var hkGoodNumbers3 = "0123456789"
var i = 0
if (TheNumber3=="") {
valid = 0
	}
for (i =0; i <= TheNumber3.length -1; i++) {
if (hkGoodNumbers3.indexOf(TheNumber3.charAt(i)) == -1) {
valid = 0
}
	}
return valid
}



var hK;
function hurriKane(winurl,winname,winfeatures)
{
	hK = window.open(winurl,winname,winfeatures);
 	setTimeout('hK.focus();',250);
}

function disclaimer(theForm)
{
 if (theForm.authorize.checked==false)
  {
    alert("You must agree to the terms and conditions before proceeding!");
    theForm.authorize.focus();
    return (false);
  }
  return (true);
}

function contactForm(theForm)
{
 if (theForm.name.value == "")
  {
    alert("Please enter a value for the \"name\" field.");
    theForm.name.focus();
    return (false);
  }
   if (theForm.address.value == "")
  {
    alert("Please enter a value for the \"address\" field.");
    theForm.address.focus();
    return (false);
  }
    if (theForm.city.value == "")
  {
    alert("Please enter a value for the \"city\" field.");
    theForm.city.focus();
    return (false);
  }
    if (theForm.state.value == "")
  {
    alert("Please enter a value for the \"state\" field.");
    theForm.state.focus();
    return (false);
  }
    if (theForm.zip.value == "")
  {
    alert("Please enter a value for the \"zip\" field.");
    theForm.zip.focus();
    return (false);
  }
      if (theForm.phone.value == "")
  {
    alert("Please enter a value for the \"phone\" field.");
    theForm.phone.focus();
    return (false);
  }
  
 if (theForm.email.value == "")
  {
    alert("Please enter a value for the \"email\" field.");
    theForm.email.focus();
    return (false);
  }
   return (true);
}


function addUsers(theForm)
{
 if (theForm.user.value == "")
  {
    alert("Please enter a value for the \"user\" field.");
    theForm.user.focus();
    return (false);
  }
 if (theForm.password.value == "")
  {
    alert("Please enter a value for the \"password\" field.");
    theForm.password.focus();
    return (false);
  }
   return (true);
}

function editPress(theForm)
{
 if (theForm.pressdate.value == "")
  {
    alert("Please enter a value for the \"Date\" field.");
    theForm.pressdate.focus();
    return (false);
  }
 if (theForm.header.value == "")
  {
    alert("Please enter a value for the \"Header\" field.");
    theForm.header.focus();
    return (false);
  }
 if (theForm.content.value == "")
  {
    alert("Please enter a value for the \"Content\" field.");
    theForm.content.focus();
    return (false);
  }
   return (true);
}

function addPress(theForm)
{
 if (theForm.pressdate.value == "")
  {
    alert("Please enter a value for the \"Date\" field.");
    theForm.pressdate.focus();
    return (false);
  }
 if (theForm.header.value == "")
  {
    alert("Please enter a value for the \"Header\" field.");
    theForm.header.focus();
    return (false);
  }
 if (theForm.content.value == "")
  {
    alert("Please enter a value for the \"Content\" field.");
    theForm.content.focus();
    return (false);
  }
   return (true);
}

function CheckEvent(theForm)
{
 if (theForm.title.value == "")
  {
    alert("Please enter a value for the \"title\" field.");
    theForm.title.focus();
    return (false);
  }
 if (theForm.headerLogo.value == "")
  {
    alert("Please enter a value for the \"Header Logo\" field.");
    theForm.headerLogo.focus();
    return (false);
  }
 if (theForm.eventDate.value == "")
  {
    alert("Please enter a value for the \"Event Date\" field.");
    theForm.eventDate.focus();
    return (false);
  }
 if (theForm.price.value == "")
  {
    alert("Please enter a value for the \"Price\" field.");
    theForm.price.focus();
    return (false);
  }
 if (theForm.eventOpenDate.value == "")
  {
    alert("Please enter a value for the \"Event Open Date\" field.");
    theForm.eventOpenDate.focus();
    return (false);
  }
 if (theForm.gridId.checked==false)
  {
    alert("Please enter a value for the \"Grid\" field.");
    theForm.gridId.focus();
    return (false);
  }
   return (true);
}



function naming()
{
window.name = "mainWindow";
}
