ode - number in wrong position.");
document.postcodeForm.postcode.focus();
return false;
}
if (!(isNaN(test.charAt(size-1)))){ //third character of inward code must be alpha rule
alert(test + " is not a valid postcode - number in wrong position.");
document.postcodeForm.postcode.focus();
return false;
}
if (!(test.charAt(size-4) == " ")){//space in position length-3 rule
alert(test + " is not a valid postcode - no space or space in wrong position.");
document.postcodeForm.postcode.focus();
return false;
}
count1 = test.indexOf(" ");count2 = test.lastIndexOf(" ");
if (count1 != count2){//only one space rule
alert(test + " is not a valid postcode - only one space allowed.");
document.postcodeForm.postcode.focus();
return false;
}
window.open('http://maps.google.co.uk/maps?f=q&hl=en&q='+document.postcodeForm.postcode.value+'+to+MK43 7AE','roaddir','');
return true;
}
// End -->