

function checkUniformApp() {
	var theForm = document.orderform;
	var msg = "Please enter the following required information\n\n";
	var blnValid = true;
	
 	
	if(isBlank(theForm.myname.value)){
		blnValid = false;
		msg += "\tYour Full Name\n";
	} 
	
	if(isBlank(theForm.mychild.value)){
		blnValid = false;
		msg += "\tYour Child's Name\n";
	} 
	
	if(isBlank(theForm.mytel.value)){
		blnValid = false;
		msg += "\tTel\n";
	}
	
	if(isBlank(theForm.myemail.value)){
		blnValid = false;
		msg += "\tEmail\n";
	}	
	
	if(!isBlank(theForm.myemail.value)){
		
		
		var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
		
		if (!filter.test(theForm.myemail.value)){
			blnValid = false;
			msg += "\tA valid E-mail Address\n";
		}
		
	}
	
	
	
	if(theForm.sweater.checked){
		if(theForm.sweater_size.selectedIndex<1){
			blnValid = false;
			msg += "\tA Sweater Size\n";
		}
	} 
	

	if(theForm.rugby_shirt.checked){
		if(theForm.rugby_shirt_size.selectedIndex<1){
			blnValid = false;
			msg += "\tA Rugby Shirt Size\n";
		}
	} 
	

	if(theForm.vest.checked){
		if(theForm.vest_size.selectedIndex<1){
			blnValid = false;
			msg += "\tA Vest Size\n";
		}
	} 
	

	if(theForm.tie.checked){
		if(theForm.tie_type.selectedIndex<1){
			blnValid = false;
			msg += "\tA Tie Type\n";
		}
	} 
	
	if (blnValid) {
		theForm.action='send_uniform.asp';
		theForm.submit();
	}else{
		alert(msg);
	}
}



function contactformApp() {
	var theForm = document.contactform;
	var msg = "Please enter the following required information\n\n";
	var blnValid = true;
	
 	
	if(isBlank(theForm.myname.value)){
		blnValid = false;
		msg += "\tYour Full Name\n";
	} 
	
	if(isBlank(theForm.myaddress.value)){
		blnValid = false;
		msg += "\tYour Address\n";
	} 
	
	if(isBlank(theForm.mypostcode.value)){
		blnValid = false;
		msg += "\tYour Postcode\n";
	} 
	

	if(isBlank(theForm.mytel.value)){
		blnValid = false;
		msg += "\tTel\n";
	}
	
	if(isBlank(theForm.myemail.value)){
		blnValid = false;
		msg += "\tEmail\n";
	}	
	
	if(!isBlank(theForm.myemail.value)){
		
		
		var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
		
		if (!filter.test(theForm.myemail.value)){
			blnValid = false;
			msg += "\tA valid E-mail Address\n";
		}
		
	}
	
	if(isBlank(theForm.info.value)){
		blnValid = false;
		msg += "\tYour Enquiry\n";
	} 
	
		
	if (blnValid) {
		theForm.action='send_contact.asp';
		theForm.submit();
	}else{
		alert(msg);
	}
}

