function getVehicleCategories() { if (document.frmRegisration.hdnVehicleType==null) { alert('Your website has not correctly incorporated the warranty purchasing functionality.'); } else { var option1 = new Option("Car", "CARS"); var option2 = new Option("Motor Bike", "MOTORCYCLES"); var option3 = new Option("Commercial Vehicle", "VANS"); document.frmRegisration.hdnVehicleType.options.add(option1); document.frmRegisration.hdnVehicleType.options.add(option2); document.frmRegisration.hdnVehicleType.options.add(option3); } } function validate() { var loc = "http://www.garagiste.co.uk"; if( null == document.getElementById("wwlink")) { alert('Your website has not correctly incorporated the warranty purchasing functionality.'); return false; } var link1 = "" + document.getElementById("wwlink").href; if(link1.indexOf(loc) < 0) { alert('Your website has not correctly incorporated the warranty purchasing functionality.'); return false; } if (document.frmRegisration.UID == null || document.frmRegisration.hdnVehicleType == null || document.frmRegisration.txtRegistrationNumber == null || document.frmRegisration.txtVehicleMileage == null ) { alert('Your website has not correctly incorporated the warranty purchasing functionality.'); return false; } document.frmRegisration.UID.value ="35786d10-43a8-102a-bdec-0030059ec38b" if (document.frmRegisration.hdnVehicleType.value == '') { alert('Please select the category of your vehicle'); document.frmRegisration.hdnVehicleType.focus(); return false; } if (document.frmRegisration.txtRegistrationNumber.value == '') { alert('Please enter the registration number of your vehicle'); document.frmRegisration.txtRegistrationNumber.focus(); return false; } if (document.frmRegisration.txtVehicleMileage.value == '') { alert('Please enter the mileage of your vehicle'); document.frmRegisration.txtVehicleMileage.focus(); return false; } return true; }