function checkBoxCheck()
{
	//alert('in')
	if(document.frmActivate.Terms.checked == false){
		alert('Please accept the Terms and Conditions');
		return false;
	}else{
		return true;
	}
}

function validateAcc(theform)
{
	if(document.frmAcc.sltType.value == 0)
	{
		alert("Please select the accommodation type.")
		
		frmAcc.sltType.focus()
		return false;
	}
	
	if(document.frmAcc.Location.value == "")
	{
		alert("Please enter the location.")
		
		frmAcc.Location.focus()
		return false;
	}	
	
	if(document.frmAcc.sltNTS.value == 0)
	{
		alert("Please select the nearest tube station.")
		
		frmAcc.sltNTS.focus()
		return false;
	}	
	
	if(document.frmAcc.Cost.value == "")
	{
		alert("Please enter a cost (without the £ sign).")
		
		frmAcc.Cost.focus()
		return false;
	}	
	
	if(document.frmAcc.sltFrequency.value == 0)
	{
		alert("Please select the cost frequency.")
		
		frmAcc.sltFrequency.focus()
		return false;
	}
	
	if(document.frmAcc.Details.value == "")
	{
		alert("Please enter some more detail.")
		
		frmAcc.Details.focus()
		return false;
	}	
	
	if(document.frmAcc.ContactName.value == "")
	{
		alert("Please enter your name.")
		
		frmAcc.ContactName.focus()
		return false;
	}	
	
	if(document.frmAcc.ContactEmail.value == "")
	{
		alert("Please enter a valid email address.")
		
		frmAcc.ContactEmail.focus()
		return false;
	}


	if(document.frmAcc.Phone.value == "")
	{
		alert("Please enter your contact phone number.")
		
		frmAcc.Phone.focus()
		return false;
	}
	//else
	//{
	
	if(confirm("Acc. Type:  " + document.frmAcc.sltType.value + "\n" +
	"Location:  " + document.frmAcc.Location.value + "\n" +
	"Nearest Tube Station:  " + document.frmAcc.sltNTS.value + "\n" +
	"Cost:  " + document.frmAcc.Cost.value + " per " + document.frmAcc.sltFrequency.value + "\n\n" +
	"Detail:  " + document.frmAcc.Details.value + "\n\n" +
	"Contact Name:  " + document.frmAcc.ContactName.value + "\n" +
	"Contact Email:  " + document.frmAcc.ContactEmail.value + "\n" +
	"Phone:  " + document.frmAcc.Phone.value + "\n\n\n" +
	"If you are sure that these details are correct, click OK,\notherwise click Cancel"))
	{
	
		frmAcc.submit();
	}else{
		return false;
	}
	//}
}


function validateJob(theform)
{
	if(document.frmJob.Company.value == "")
	{
		alert("Please enter your Company Name.")
		
		frmJob.Company.focus()
		return false;
	}
	
	if(document.frmJob.JobTitle.value == "")
	{
		alert("Please enter the Job Title.")
		
		frmJob.JobTitle.focus()
		return false;
	}	
	
	if(document.frmJob.JobDesc.value == "")
	{
		alert("Please enter the Job Description.")
		
		frmJob.JobDesc.focus()
		return false;
	}	
	
	if(document.frmJob.Location.value == "")
	{
		alert("Please enter the Location.")
		
		frmJob.Location.focus()
		return false;
	}	
	
	if(document.frmJob.sltNTS.value == 0)
	{
		alert("Please select the Nearest Tube Station.")
		
		frmJob.sltNTS.focus()
		return false;
	}	
	
	if(document.frmJob.Salary.value == "")
	{
		alert("Please enter the Salary.")
		
		frmJob.Salary.focus()
		return false;
	}	
	
	if(document.frmJob.ContactName.value == "")
	{
		alert("Please enter your name.")
		
		frmJob.ContactName.focus()
		return false;
	}


	if(document.frmJob.ContactEmail.value == "")
	{
		alert("Please enter a valid email address.")
		
		frmJob.ContactEmail.focus()
		return false;
	}
	
	if(document.frmJob.Phone.value == "")
	{
		alert("Please enter your contact phone number.")
		
		frmJob.Phone.focus()
		return false;
	}
	//else
	//{
	
	if(confirm("Company:  " + document.frmJob.Company.value + "\n" +
	"Job Title:  " + document.frmJob.JobTitle.value + "\n" +
	"Job Description:  " + document.frmJob.JobDesc.value + "\n" +
	"Location:  " + document.frmJob.Location.value + "\n" +		
	"Nearest Tube Station:  " + document.frmJob.sltNTS.value + "\n" +
	"Salary:  " + document.frmJob.Salary.value + "\n" +
	"Contact Name:  " + document.frmJob.ContactName.value + "\n" +
	"Contact Email:  " + document.frmJob.ContactEmail.value + "\n" +	
	"Phone:  " + document.frmJob.Phone.value + "\n\n\n" +
	"If you are sure that these details are correct, click OK,\notherwise click Cancel"))
	{
	
		frmJob.submit();
	}else{
		return false;
	}
	//}
}

function validateDate(theform)
{
	if(document.frmDate.What.value == 0)
	{
		alert("Please select from What seeking What.")
		
		frmDate.What.focus()
		return false;
	}
	
	if(document.frmDate.Hair.value == 0)
	{
		alert("Please select your hair colour.")
		
		frmDate.Hair.focus()
		return false;
	}
	
	if(document.frmDate.Eye.value == 0)
	{
		alert("Please select your eye colour.")
		
		frmDate.Eye.focus()
		return false;
	}
	
	if(document.frmDate.Location.value == "")
	{
		alert("Please enter a Location.")
		
		frmDate.Location.focus()
		return false;
	}	
	
	if(document.frmDate.Details.value == "")
	{
		alert("Please enter details relating to your request.")
		
		frmDate.Details.focus()
		return false;
	}	
	
	
	if(document.frmDate.ContactName.value == "")
	{
		alert("Please enter your name.")
		
		frmDate.ContactName.focus()
		return false;
	}


	if(document.frmDate.ContactEmail.value == "")
	{
		alert("Please enter a valid email address.")
		
		frmDate.ContactEmail.focus()
		return false;
	}


	if(document.frmDate.Phone.value == "")
	{
		alert("Please enter a contact number.")
		
		frmDate.Phone.focus()
		return false;
	}
	
	
	if(confirm("What:  " + document.frmDate.What.value + "\n" +
	"Hair colour:  " + document.frmDate.Hair.value + "\n" +
	"Eye colour:  " + document.frmDate.Eye.value + "\n" +
	"Location:  " + document.frmDate.Location.value + "\n" +		
	"Details:  " + document.frmDate.Details.value + "\n" +
	"Contact Name:  " + document.frmDate.ContactName.value + "\n" +
	"Contact Email:  " + document.frmDate.ContactEmail.value + "\n" +	
	"Phone:  " + document.frmDate.Phone.value + "\n\n\n" +
	"If you are sure that these details are correct, click OK,\notherwise click Cancel"))
	{
	
		frmDate.submit();
	}else{
		return false;
	}
	//}
}


function validEmail(email) {
	invalidChars = " /:,;"
	var i = 0;
	if (email == "") {
		return false
	}
	for (i=0; i<invalidChars.length; i++) {
		badChar = invalidChars.charAt(i)
		if (email.indexOf(badChar,0) > -1) {
			return false
		}
	}
	atPos = email.indexOf("@",1)
	if (atPos == -1) {
		return false
	}
	if (email.indexOf("@",atPos+1) > -1) {
		return false
	}
	periodPos = email.indexOf(".",atPos)
	if (periodPos == -1) {
		return false
	}
	if (periodPos+3 > email.length)	{
		return false
	}
	return true
}


function checkDeleteAcc(id)
{
	if(confirm("Are you sure you want to permenantly delete this job?")){
		document.location.href = "deletejob.asp?id=" + id;
	}else{
		return false;
	}
}

function checkDeleteJob(id)
{
	if(confirm("Are you sure you want to permenantly delete this accommodation?")){
		document.location.href = "deleteacc.asp?id=" + id;
	}else{
		return false;
	}
}

function checkDeleteMember(userid)
{
	if(confirm("Are you sure you want to permenantly delete this member?")){
		document.location.href = "deletemember.asp?userid=" + userid;
	}else{
		return false;
	}
}

function checkDeleteDate(id)
{
	if(confirm("Are you sure you want to permenantly delete this date request?")){
		document.location.href = "deletedate.asp?id=" + id;
	}else{
		return false;
	}
}

function checkAuthoriseJob(id)
{
	//alert(ID);
	if(confirm("Are you sure you want to authorise this job?")){
		document.location.href = "authorisejob.asp?id=" + id;
	}else{
		return false;
	}
}


function checkAuthoriseAcc(id)
{
	//alert(ID);
	if(confirm("Are you sure you want to authorise this accommodation?")){
		document.location.href = "authoriseacc.asp?id=" + id;
	}else{
		return false;
	}
}

function checkAuthoriseDate(id)
{
	//alert(ID);
	if(confirm("Are you sure you want to authorise this date request?")){
		document.location.href = "authorisedate.asp?id=" + id;
	}else{
		return false;
	}
}

function checkUnAuthoriseJob(id)
{
	//alert(ID);
	if(confirm("Are you sure you want to unauthorise this job?")){
		document.location.href = "unauthorisejob.asp?id=" + id;
	}else{
		return false;
	}
}


function checkUnAuthoriseAcc(id)
{
	//alert(ID);
	if(confirm("Are you sure you want to unauthorise this accommodation?")){
		document.location.href = "unauthoriseacc.asp?id=" + id;
	}else{
		return false;
	}
}

function checkUnAuthoriseDate(id)
{
	//alert(ID);
	if(confirm("Are you sure you want to unauthorise this date request?")){
		document.location.href = "unauthorisedate.asp?id=" + id;
	}else{
		return false;
	}
}

function checkEditAcc(id)
{
	//alert(ID);
	if(confirm("Are you sure you want to edit this accommodation?")){
		document.location.href = "editacc.asp?id=" + id;
	}else{
		return false;
	}
}

function checkEditJob(id)
{
	//alert(ID);
	if(confirm("Are you sure you want to edit this job?")){
		document.location.href = "editjob.asp?id=" + id;
	}else{
		return false;
	}
}

function checkEditMember(userid)
{
	//alert(ID);
	if(confirm("Are you sure you want to edit this member?")){
		document.location.href = "editmember.asp?userid=" + userid;
	}else{
		return false;
	}
}

function checkEditDate(id)
{
	//alert(ID);
	if(confirm("Are you sure you want to edit this date request?")){
		document.location.href = "editdate.asp?id=" + id;
	}else{
		return false;
	}
}

function checkUpdateAcc(id)
{
	//alert(ID);
	if(confirm("Are you sure you want to update this accommodation?")){
		document.location.href = "updateacc.asp?id=" + id;
	}else{
		return false;
	}
}

function checkUpdateJob(id)
{
	//alert(ID);
	if(confirm("Are you sure you want to update this job?")){
		document.location.href = "updatejob.asp?id=" + id;
	}else{
		return false;
	}
}

function checkUpdateDate(id)
{
	//alert(ID);
	if(confirm("Are you sure you want to update this date request?")){
		document.location.href = "updatedate.asp?id=" + id;
	}else{
		return false;
	}
}




function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail ID")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail ID")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

 		 return true					
	}

function ValidateForm(){
	var emailID=document.frmSample.txtEmail
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email ID")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}
	return true
 }
 
 
function checkTerms(){
	//var result;
	if(document.frmActivate.Terms.checked){
		result = 1;
		return true;
		vForm(frmActivate);	

	}else{
		alert('You must accept the Terms and Conditions');
		//result = 0;
		return false;
	}
}
 
 
// For each required field in your form, use "r_" at the beginning of the name (i.e. 'r_Email').
// Be sure 'email' appears in the name of any field in which an email address will be entered,
// and 'phone' appears in the name of any field in which a phone number will be entered.
// Accepted phone formats are local, long distance and international with up to 5 digit extentsion.
// Dashes, spaces, parentheses and other non-numerical characters are allowed in phone numbers.
// Script replaces 'r_' and underscores with spaces in element 'name=' to make a pretty field
// name for alerts, so 'r_First_Name' appears in an alert as: 'First Name is a required field.'
  function vForm(tForm) {
     var feArr = tForm.elements;
     var tReq = /r_/;
      var tEml = /email/i;
      var tPhn = /phone/i;
      var reReq = /\S/;
      var reEml = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,6}|[0-9]{1,3})(\]?)$/;
     var rePhn = /^((\+\d{1,3}(-| )?\(?\d\)?(-| )?\d{1,3})|(\(?\d{2,3}\)?))(-| )?(\d{3,4})(-| )?(\d{4})(( x| ext)\d{1,5}){0,1}$/;
      
	  //if(result = 1){
	  
		  for (var i=0; i<feArr.length; i++ ) { // Loop through form elements.
			with (feArr[i]) {
				
			   var ffName = name.replace(/r_/i,'');
				var alName = ffName.replace(/_/g,' ');
				if (tReq.test(name)) { // Test for "r_" in element name to see if it is a required field.
				  if (!reReq.test(value)) { // If required, and no value is in field, alert user.
					 alert(alName + ' is a required field.');
					  focus();
					  return false;}}
				if (tEml.test(name)) { // Test if "email" is in element name.
				   if (!reEml.test(value)) {  // If "email" in name of field, test if valid email format.
					  alert(alName + ' appears to be invalid.');
					  focus();
					  return false;}}
				if (tPhn.test(name)) { // Test if "phone" is in element name.
				   if (!rePhn.test(value)) {  // If "phone" in name of field, test if valid format.
					  alert(alName + ' appears to be invalid.');
					  focus();
					  return false;
					  }}}}
	  //}else{
			//return false;  
	  //}
   //return true;
}


// START OF FORM VALIDATION SCRIPT

 function checkActivationForm ( theForm ) {
 
  var errors = new Array();
  errors.push( new Array() );
  errors.push( new Array() );
  
  if ( !frmActivate.r_First_Name.value.checkExists() ) {
  
   errors[0].push( 'your First Name' );
  }
  
  if ( !frmActivate.r_Surname.value.checkExists() ) {
  
   errors[0].push( 'your Surname' );
  }
  
  if ( !frmActivate.r_DOB.value.checkExists() ) {
  
   errors[0].push( 'your Date of Birth' );
  }
  
  if ( !frmActivate.r_Sex.value.checkExists() ) {
  
   errors[0].push( 'your Sex' );
  }
  
  if ( !frmActivate.r_Email_Address.value.checkExists() ) {
  
   errors[0].push( 'your Email Address' );
  }
  
  if ( frmActivate.r_Email_Address.value.checkExists() && !frmActivate.r_Email_Address.value.checkEmail() ) {
  
   errors[1].push( 'Your email address is invalid' );
  }
  
  if ( !frmActivate.r_Nationality.value.checkExists() ) {
  
   errors[0].push( 'your Nationality' );
  }
  
  if ( !frmActivate.Terms.checked ) {
  
   errors[0].push( 'You must accept the Terms & Conditions' );
  }
  
  if ( errors[0].length >= 1 || errors[1].length >= 1 ) {
  
   errors.push( new Array() );
  
   if ( errors[0].length >= 1 ) {
   
    errors[2].push( "You must complete the following fields before submitting your activation details:\n\n    * "+errors[0].join( "\n    * " ) );
   }
   
   if ( errors[1].length >= 1 ) {
   
    errors[2].push( errors[1].join( "\n\n" ) );
   }
   
   alert( errors[2].join( "\n\n" ) );
   return false;
  }
  		if(confirm("First Name:  " + document.frmActivate.r_First_Name.value + "\n" +
		"Surname:  " + document.frmActivate.r_Surname.value + "\n" +
		"Date of Birth:  " + document.frmActivate.r_DOB.value + "\n" +
		"Sex:  " + document.frmActivate.r_Sex.value + "\n" +		
		"Email Address:  " + document.frmActivate.r_Email_Address.value + "\n" +
		"Nationality:  " + document.frmActivate.r_Nationality.value + "\n\n\n" +
		"If you are sure that these details are correct, click OK,\notherwise click Cancel"))
		{
			frmActivate.action = "sendactivation.asp";
			frmActivate.submit();
		}else{
			return false;
		}
	//frmActivate.action = "sendactivation.asp";
	//frmActivate.submit();
 	//return true;
 }

 
String.prototype.checkNumber = function ( ) {
 
 return ( isNaN( parseInt( this ) ) || parseInt( this ) < 1 ) ? false : true;
};
 
String.prototype.checkExists = function ( ) {
 
 return ( this == '' || this == null ) ? false : true;
};
 
String.prototype.checkEmail = function ( ) {
 
 return /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test( this );
}; 
 

Array.prototype.inArray = function ( needle ) {
 
 if ( this.length <= 0 ) return false;
 
 for ( currentItem in this ) {
  
  if ( this[currentItem] == needle ) return true;
 }
 
 return false;
}

// END OF FORM VALIDATION SCRIPT

function checkMail()
{
	var x = document.frmActivate.r_Email_Address.value;
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if(x.length > 0){
		if (!filter.test(x)){
			alert('Please enter a valid email address.')
			document.frmActivate.r_Email_Address.focus();
		}else{
			return true;	
		}
	}
}


function validateActivation(theform)
{	
		var themessage = "";
		
		if(document.frmActivate.r_First_Name.value == "")
		{
			themessage = themessage + "First Name\n";
		}
		
		if(document.frmActivate.r_Surname.value == "")
		{
			themessage = themessage + "Surname\n";
		}	
		
		if(document.frmActivate.r_Day.value == "--" || document.frmActivate.r_Month.value == "--" || document.frmActivate.r_Year.value == "--")  
		{
			themessage = themessage + "DOB\n";
		}			
		
		if(document.frmActivate.r_Sex.value == "")
		{
			themessage = themessage + "Sex\n";
		}	

		if(document.frmActivate.r_Email_Address.value == "")
		{
			themessage = themessage + "Email Address\n";
		}	
		
		if(document.frmActivate.r_Nationality.value == "")
		{
			themessage = themessage + "Nationality\n";
		}
		
		if(document.frmActivate.r_Newsletter.value == "")
		{
			themessage = themessage + "Newsletter\n";
		}
		
		//if(document.frmActivate.r_Email_Format.value == "")
		//{
		//	themessage = themessage + "Email Format\n";
		//}

		
		if  (themessage ==  "")  {
			if(!document.frmActivate.Terms.checked)
			{
				alert('You must accept the Terms and Conditions.');
				return false;
			}
			else
			{
				if(confirm("First Name:  " + document.frmActivate.r_First_Name.value + "\n" +
				"Surname:  " + document.frmActivate.r_Surname.value + "\n" +
				"Date of Birth:  " + document.frmActivate.r_Day.value + "/" + document.frmActivate.r_Month.value + "/" + document.frmActivate.r_Year.value + "\n" +
				"Sex:  " + document.frmActivate.r_Sex.value + "\n" +		
				"Email Address:  " + document.frmActivate.r_Email_Address.value + "\n" +
				"Nationality:  " + document.frmActivate.r_Nationality.value + "\n\n" +
				"Newsletter:  " + document.frmActivate.r_Newsletter.value + "\n\n" +
				//"Email Format:  " + document.frmActivate.r_Email_Format.value + "\n\n\n" +
				"If you are sure that these details are correct, click OK,\notherwise click Cancel"))
				{
					document.frmActivate.action = "sendactivation.asp";
					document.frmActivate.submit();
				}else
				{
					return false;
				}
			}
		}else{
			alert("You must complete the following fields:\n\n" + themessage);
			return false;
		}	

}
function validateEvent(theform)
{
	//alert('IN')
	var strEventName = document.frmEvent.EventName.options[document.frmEvent.EventName.selectedIndex].text
	
	if(document.frmEvent.EventName.value == "")
	{
		alert("Please select an event from the list.")
		
		frmEvent.EventName.focus()
		return false;
	}
	
	if(document.frmEvent.EventDate.value == "")
	{
		alert("Please enter the event date.")
		
		frmEvent.EventDate.focus()
		return false;
	}
	
	if(document.frmEvent.FullName.value == "")
	{
		alert("Please enter your full name.")
		
		frmEvent.FullName.focus()
		return false;
	}
	
	if(document.frmEvent.EmailAddress.value == "")
	{
		alert("Please enter your email address (confirmation email will be sent to this address).")
		
		frmEvent.EmailAddress.focus()
		return false;
	}
	
	if(document.frmEvent.MobileContactNumber.value == "")
	{
		alert("Please enter a mobile contact number.")
		
		frmEvent.MobileContactNumber.focus()
		return false;
	}	
	
	if(isNaN(document.frmEvent.GuestsNumber.value) || (document.frmEvent.GuestsNumber.value == ""))
	{
		alert("Please enter the number of guests.")
		
		frmEvent.GuestsNumber.focus()
		return false;
	}	
	
	if(document.frmEvent.YazaboGuestNames.value == 0)
	{
		alert("Please enter the full names of all guests who are Yazabo members.")
		
		frmEvent.YazaboGuestNames.focus()
		return false;
	}
	
	if(confirm("Event Name:  " + strEventName + "\n" +
	"Event Date:  " + document.frmEvent.EventDate.value + "\n" +
	"Full Name:  " + document.frmEvent.FullName.value + "\n" +
	"Yazabo Card Number: " + document.frmEvent.CardNumber.value + "\n" +
	"Email Address:  " + document.frmEvent.EmailAddress.value + "\n" +
	"Mobile Number:  " + document.frmEvent.MobileContactNumber.value + "\n\n" + 
	"No of Guests:  " + document.frmEvent.GuestsNumber.value + "\n\n" +
	"Yazabo Guest Names: " + "\n\n" + document.frmEvent.YazaboGuestNames.value + "\n\n" +	
	"Non Yazabo Guest Names: " + "\n\n" + document.frmEvent.GuestNames.value + "\n\n" +
	"If you are sure that these details are correct, click OK,\notherwise click Cancel"))
	{
	
		frmEvent.action = 'sendguestlist.asp?email='+document.frmEvent.EventName.value+'&eventName='+strEventName;
		frmEvent.submit();
	}else{
		return false;
	}
	//}
}

function validateBooking(theform)
{
	//alert('IN')
	var strPromotion = document.frmPromotion.Promotion.options[document.frmPromotion.Promotion.selectedIndex].text
	var strPromotionID = theform.Promotion.options[theform.Promotion.selectedIndex].value
		
	if(document.frmPromotion.Promotion.value == "")
	{
		alert("Please select a promotion from the list.")
		
		frmPromotion.Promotion.focus()
		return false;
	}
	
	if(document.frmPromotion.Firstname.value == "")
	{
		alert("Please enter your first name.")
		
		frmPromotion.Firstname.focus()
		return false;
	}
	
	if(document.frmPromotion.Surname.value == "")
	{
		alert("Please enter your surname.")
		
		frmPromotion.Surname.focus()
		return false;
	}
	
	if(document.frmPromotion.ContactNumber.value == "")
	{
		alert("Please enter a contact number.")
		
		frmPromotion.ContactNumber.focus()
		return false;
	}	
	
	if(document.frmPromotion.EmailAddress.value == "")
	{
		alert("Please enter your email address (confirmation email will be sent to this address).")
		
		frmPromotion.EmailAddress.focus()
		return false;
	}
	
	if(document.frmPromotion.CardNumber.value == "")
	{
		alert("Please enter your Yazabo Card Number.")
		
		frmPromotion.CardNumber.focus()
		return false;
	}
	
	if(confirm("Promotion:  " + strPromotion + "\n" +
	"First Name:  " + document.frmPromotion.Firstname.value + "\n" +
	"Surname:  " + document.frmPromotion.Surname.value + "\n" +
	"Contact Number:  " + document.frmPromotion.ContactNumber.value + "\n\n" +
	"Email Address:  " + document.frmPromotion.EmailAddress.value + "\n" +
	"Yazabo Card Number:  " + document.frmPromotion.CardNumber.value + "\n\n" +
	"If you are sure that these details are correct, click OK,\notherwise click Cancel"))
	{
	
		frmPromotion.action = 'sendbooking.asp?promotionID='+strPromotionID;
		frmPromotion.submit();
	}else{
		return false;
	}
	//}
}


function setCode(theform)
{

var strCode = document.frmVoucher.txtCode.value;

//alert(strCode);

document.frmVoucher.action = 'buy.asp?code='+strCode;
document.frmVoucher.submit();

}

function disableEnterKey(e)
{
     var key;     
     if(window.event)
          key = window.event.keyCode; //IE
     else
          key = e.which; //firefox     

     return (key != 13);
}