function ValidateComments(form){if(form.header.value.length<1){alert("Please fill in the header!");form.header.focus();return false;}
if(form.comments.value.length<1){alert("Please fill in the comments!");form.comments.focus();return false;}
return true;}
function ValidateOrder(form){if(form.name.value.length<1){alert("Please fill in your name!");form.name.focus();return false;}
if(form.surname.value.length<1){alert("Please fill in your surname!");form.surname.focus();return false;}
if(form.address1.value.length<1){alert("Please fill in your address!");form.address1.focus();return false;}
if(form.city.value.length<1){alert("Please fill in your city!");form.city.focus();return false;}
if(form.zipcode.value.length<1){alert("Please fill in your zip code!");form.zipcode.focus();return false;}
if(!ValidEmail(form.email.value)){alert("Please fill in a valid email address!");form.email.focus();return false;}
return true;}
function ValidateWinner(form){if(form.name.value.length<1){alert("Please fill in a name!");form.name.focus();return false;}
if(form.country.value.length<1){alert("Please fill in a country or city!");form.country.focus();return false;}
if(form.casino.value.length<1){alert("Please fill in the casino!");form.casino.focus();return false;}
if(form.amount.value.length<1){alert("Please fill in the amount!");form.amount.focus();return false;}
return true;}
function ValidateSubscribe(form){if(form.name.value.length<1){alert("Please fill in your name!");form.name.focus();return false;}
if(form.surname.value.length<1){alert("Please fill in your surname!");form.surname.focus();return false;}
if(!ValidEmail(form.email.value)){alert("Please fill in a valid email address!");form.email.focus();return false;}
return true;}
function ValidatePassword(form){if(form.password.value.length<1){alert("Your password cannot be blank!");form.password.focus();return false;}
if(form.password.value!=form.confirm.value){alert("Please confirm your password!");form.confirm.focus();return false;}
return true;}
function ValidateNews(form){if(form.header.value.length<1){alert("Please fill in the news header!");form.header.focus();return false;}
if(form.content.value.length<1){alert("Please fill in the news content!");form.content.focus();return false;}
return true;}
function ValidateAdmin(form){if(!ValidEmail(form.mailfrom.value)){alert("Please fill in a valid email address!");form.mailfrom.focus();return false;}
if(form.mailsubject.value.length<1){alert("Please fill in the mail subject!");form.mailsubject.focus();return false;}
if(form.templateurl.value.length<1){alert("Please select a template!");return false;}
return true;}
function ValidateList(form){if(!ValidEmail(form.email.value)){alert("Please fill in a valid email address!");form.email.focus();return false;}
return true;}
function ValidateFriend(form){if(form.byname.value.length<1){alert("Please fill in your name!")
form.byname.focus();return false;}
if(!ValidEmail(form.byemail.value)){alert("Please fill in a valid email address!");form.byemail.focus();return false;}
if(form.byrealno.value.length<1){alert("Please fill in your account number!")
form.byrealno.focus();return false;}
if(form.friendname1.value.length<1){alert("You have to refer at least one friend!");form.friendname1.focus();return false;}
if(!ValidEmail(form.friendemail1.value)){alert("Please fill in a valid email address!")
form.friendemail1.focus();return false;}
if(form.friendname2.value.length>1&&!ValidEmail(form.friendemail2.value)){alert("Please fill in a valid email address!");form.friendemail2.focus();return false;}
if(form.friendname3.value.length>1&&!ValidEmail(form.friendemail3.value)){alert("Please fill in a valid email address!");form.friendemail3.focus();return false;}
if(form.friendname4.value.length>1&&!ValidEmail(form.friendemail4.value)){alert("Please fill in a valid email address!");form.friendemail4.focus();return false;}
if(form.friendname5.value.length>1&&!ValidEmail(form.friendemail5.value)){alert("Please fill in a valid email address!");form.friendemail5.focus();return false;}
return true;}
function ValidateFriendAdmin(form){if(!ValidEmail(form.msgfrom.value)){alert("Please type a valid email address!");form.msgfrom.focus();return false;}
if(form.msgsubject.value.length<1){alert("Please type an email subject!");form.msgsubject.focus();return false;}
if(form.msgbody.value.length<1){alert("Please type a message body!");form.msgbody.focus();return false;}
return true;}
function ValidateCompAdmin(form){if(form.title.value.length<1){alert("Please type a competition title!");form.title.focus();return false;}
if(form.description.value.length<1){alert("Please type a competition description!");form.description.focus();return false;}}
function ValidateComp(form){if(form.name.value.length<1){alert("Please fill in your name!");form.name.focus();return false;}
if(!ValidEmail(form.email.value)){alert("Please fill in a valid email address!");form.email.focus();return false;}
return true;}
function ValidDate(date){var dateparts;dateparts=date.split('/');if(date.length<8||dateparts.length<3)
return false;else{if(isNaN(dateparts[0])||isNaN(dateparts[1])||isNaN(dateparts[2])||dateparts[0].length!=4||dateparts[1]>12||dateparts[2]>31)
return false;}
return true;}
function ValidEmail(email){if(email.length<3||email.indexOf('@')==-1||email.indexOf('.')==-1)
return false;else
return true;}
