

/*<![CDATA[*/




function showCopy(x) {

	var newCopy = new Array("home","industrialDesign","footwearManufacture","featuresAndBenefits");
	for(var i=0; i<newCopy.length; i++) {

		if(document.getElementById(newCopy[i]+"_copy")){
 
            document.getElementById(newCopy[i]+"_copy").className='left_main hide';
//			document.getElementById(newCopy[i]+"_copy").style.visibility='hidden';
//			document.getElementById(newCopy[i]+"_copy").style.display='none';
		}
	}
	//document.getElementById(x).style.visibility='visible';
    //document.getElementById(x).style.display='block';
       document.getElementById(x).className='left_main';

}


 
function doCheck(document){

	var message = "Please enter the following:\n\n";

     if (checkemail(document.email_address.value)== false){
            
            message += "Please enter a valid email address\n";
                 
     }


	    if (document.name.value == "" ||  document.Postal_address.value == "" || document.city.value == "" || document.phone_number.value == "" || document.email_address.value == ""   || document.Gender.value == "0" || document.Bootsize.value == "0" || document.ageGroup.value == "0" || (document.otherGumBootChk.checked == true && document.otherGumBoot.value == "") || (document.FarmType[8].checked &&  document.otherFarmType.value == "") || document.Terms.checked == false){

        	if (document.name.value == "" ){
            message += "Name\n";
        	}
        	if (document.Postal_address.value == "" ){
            message += "Postal address\n";
        	}
        	if (document.city.value == "" ){
            message += "City\n";
        	}
        	if (document.phone_number.value == "" ){
            message += "Phone number\n";
        	}        	
       	
        	if (document.Gender.value == "0" ){
            message += "Gender\n";
        	}
        	if (document.Bootsize.value == "0" ){
            message += "Bootsize\n";
        	}
        	if (document.ageGroup.value == "0" ){
            message += "Age group\n";
        	}
 	        	        	
            if (document.otherGumBootChk.checked == true && document.otherGumBoot.value == ""){
                message += "As you have ticked 'What gumboots do you currently wear - Other' you need to specify another gum boot\n";
            }

	        if (document.FarmType[8].checked && document.otherFarmType.value == ""){
                    message += "Please provide another farm type\n";
	                }

            if (document.Terms.checked == false){
                    message += "\nPlease tick that you agree to the terms and conditions\n";
	                }                
            
        	        	
		    alert(message);
		    document.send.focus();

		return (false);

		}
			
	return (true);
	}


    var testresults

    function checkemail(str){

        var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i

        if (filter.test(str))
            testresults=true
        else{

            testresults=false
        }
        return (testresults)
        }


	
/*]]>*/

