// JavaScript Document
/*! disable right click */
//$(document).ready(function(){
//$(document).bind("contextmenu",function(e){
//return false;
//});
//});
/*! end */
/*! validate ZIP */
//function validateZIP(field) {
//var valid = "0123456789-";
//var hyphencount = 0;
//if (field.length!=5 && field.length!=10) {
//alert("Please enter your 5 digit zip code.");
//return false;
//}
//for (var i=0; i < field.length; i++) {
//temp = "" + field.substring(i, i+1);
//if (temp == "-") hyphencount++;
//if (valid.indexOf(temp) == "-1") {
//alert("Invalid characters in your zip code.  Please try again.");
//return false;
//}
//if ((hyphencount > 1) || ((field.length==10) && ""+field.charAt(5)!="-")) {
//alert("The hyphen character should be used with a properly formatted 5 digit+four zip code, like '12345-6789'. Please try again.");
//return false;
//   }
//}
//return true;
//}
/*! end */
/*! Validate US and Canadian Postcode */
function validateZIP(zip)
{
if (zip.match(/^[0-9]{5}$/)) {
return true;
}
zip=zip.toUpperCase();
if (zip.match(/^[A-Z][0-9][A-Z] [0-9][A-Z][0-9]$/)) {
return true;
}
/*if (zip.match(/^[A-Z][0-9][A-Z].[0-9][A-Z][0-9]$/)) {
return true;
}*/
//alert('*** Invalid please try again.');
alert ('Please enter your postcode in this format:\r\nUSA: "12345"\r\nCanada: "L5R 3KR"\r\n\nEntrez s\'il vous plaît votre code postal respectant ce format:\r\nUSA: "12345"\r\nCanada: "L5R 3KR"');
return false;
}
/*! end */
