// JScript source code
/**
 * SWFObject v1.4.1: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
 *   legal reasons.
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){
if(!document.createElement||!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute("version"),_7);
if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";
this.addParam("quality",q);
this.setAttribute("useExpressInstall",_7);
this.setAttribute("doExpressInstall",false);
var _d=(_9)?_9:window.location;
this.setAttribute("xiRedirectUrl",_d);
this.setAttribute("redirectUrl","");
if(_a){this.setAttribute("redirectUrl",_a);}};
deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
this.attributes[_e]=_f;
},getAttribute:function(_10){
return this.attributes[_10];
},addParam:function(_11,_12){
this.params[_11]=_12;
},getParams:function(){
return this.params;
},addVariable:function(_13,_14){
this.variables[_13]=_14;
},getVariable:function(_15){
return this.variables[_15];
},getVariables:function(){
return this.variables;
},getVariablePairs:function(){
var _16=new Array();
var key;
var _18=this.getVariables();
for(key in _18){_16.push(key+"="+_18[key]);}
return _16;
},getSWFHTML:function(){
var _19="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var _1a=this.getParams();
for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
var _1c=this.getVariablePairs().join("&");
if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}
_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
var _1d=this.getParams();
for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
var _1f=this.getVariablePairs().join("&");
if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}
return _19;},write:function(_20){
if(this.getAttribute("useExpressInstall")){
var _21=new deconcept.PlayerVersion([6,0,65]);
if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
this.setAttribute("doExpressInstall",true);
this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
document.title=document.title.slice(0,47)+" - Flash Player Installation";
this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
var n=(typeof _20=="string")?document.getElementById(_20):_20;
n.innerHTML=this.getSWFHTML();return true;
}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};
deconcept.SWFObjectUtil.getPlayerVersion=function(_23,_24){
var _25=new deconcept.PlayerVersion([0,0,0]);
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){_25=new deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
for(var i=3;axo!=null;i++){axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);_25=new deconcept.PlayerVersion([i,0,0]);}}
catch(e){}
if(_23&&_25.major>_23.major){return _25;}
if(!_23||((_23.minor!=0||_23.rev!=0)&&_25.major==_23.major)||_25.major!=6||_24){
try{_25=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}
catch(e){}}}return _25;};
deconcept.PlayerVersion=function(_29){
this.major=parseInt(_29[0])!=null?parseInt(_29[0]):0;
this.minor=parseInt(_29[1])||0;
this.rev=parseInt(_29[2])||0;};
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}
if(this.minor<fv.minor){return false;}
if(this.minor>fv.minor){return true;}
if(this.rev<fv.rev){return false;}return true;};
deconcept.util={getRequestParameter:function(_2b){
var q=document.location.search||document.location.hash;
if(q){var _2d=q.indexOf(_2b+"=");
var _2e=(q.indexOf("&",_2d)>-1)?q.indexOf("&",_2d):q.length;
if(q.length>1&&_2d>-1){return q.substring(q.indexOf("=",_2d)+1,_2e);}}
return "";}};
deconcept.SWFObjectUtil.cleanupSWFs=function(){
var _2f=document.getElementsByTagName("OBJECT");
for(var i=0;i<_2f.length;i++){
for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=null;}}}};
if(typeof window.onunload=="function"){
var oldunload=window.onunload;
window.onunload=function(){deconcept.SWFObjectUtil.cleanupSWFs();oldunload();};
}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}
if(Array.prototype.push==null){
Array.prototype.push=function(_32){
this[this.length]=_32;
return this.length;};}

var getQueryParamValue = deconcept.util.getRequestParameter;
var FlashObject = deconcept.SWFObject; // for backwards compatibility
var SWFObject = deconcept.SWFObject;

// JS Functions
function addLoadEvent(func) {	
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;		
	} 
	else {
		window.onload = function() {
		oldonload();
		func();
		}
	}
}

// JScript source code
var pcrex = new RegExp("^([A-PR-UWYZ0-9][A-HK-Y0-9][AEHMNPRTVXY0-9]?[ABEHMNPRVWXY0-9]? {1,2}[0-9][ABD-HJLN-UW-Z]{2}|GIR 0AA)$","i");

function checkPostCode (toCheck) {

  // Permitted letters depend upon their position in the postcode.
  var alpha1 = "[abcdefghijklmnoprstuwyz]";                       // Character 1
  var alpha2 = "[abcdefghklmnopqrstuvwxy]";                       // Character 2
  var alpha3 = "[abcdefghjkstuw]";                                // Character 3
  var alpha4 = "[abehmnprvwxy]";                                  // Character 4
  var alpha5 = "[abdefghjlnpqrstuwxyz]";                          // Character 5
  
  // Array holds the regular expressions for the valid postcodes
  var pcexp = new Array ();

  // Expression for postcodes: AN NAA, ANN NAA, AAN NAA, and AANN NAA
  pcexp.push (new RegExp ("^(" + alpha1 + "{1}" + alpha2 + "?[0-9]{1,2})(\\s*)([0-9]{1}" + alpha5 + "{2})$","i"));
  
  // Expression for postcodes: ANA NAA
  pcexp.push (new RegExp ("^(" + alpha1 + "{1}[0-9]{1}" + alpha3 + "{1})(\\s*)([0-9]{1}" + alpha5 + "{2})$","i"));

  // Expression for postcodes: AANA  NAA
  pcexp.push (new RegExp ("^(" + alpha1 + "{1}" + alpha2 + "?[0-9]{1}" + alpha4 +"{1})(\\s*)([0-9]{1}" + alpha5 + "{2})$","i"));
  
  // Exception for the special postcode GIR 0AA
  pcexp.push (/^(GIR)(\s*)(0AA)$/i);
  
  // Standard BFPO numbers
  pcexp.push (/^(bfpo)(\s*)([0-9]{1,4})$/i);
  
  // c/o BFPO numbers
  pcexp.push (/^(bfpo)(\s*)(c\/o\s*[0-9]{1,3})$/i);
  
  // Overseas Territories
  pcexp.push (/^([A-Z]{4})(\s*)(1ZZ)$/i);

  // Load up the string to check
  var postCode = toCheck;

  // Assume we're not going to find a valid postcode
  var valid = false;
  
  // Check the string against the types of post codes
  for ( var i=0; i<pcexp.length; i++) {
    if (pcexp[i].test(postCode)) {
    
      // The post code is valid - split the post code into component parts
      pcexp[i].exec(postCode);
      
      // Copy it back into the original string, converting it to uppercase and
      // inserting a space between the inward and outward codes
      postCode = RegExp.$1.toUpperCase() + " " + RegExp.$3.toUpperCase();
      
      // If it is a BFPO c/o type postcode, tidy up the "c/o" part
      postCode = postCode.replace (/C\/O\s*/,"c/o ");
      
      // Load new postcode back into the form element
      valid = true;
      
      // Remember that we have found that the code is valid and break from loop
      break;
    }
  }
  
  // Return with either the reformatted valid postcode or the original invalid 
  // postcode
  if (valid) {return postCode;} else return false;
}

function isValidEmail(str) {
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(str)){
		return true;
	}
	else {
		return false;
	}
}

function addProductBasket(prodID){
	var prod = document.getElementById("qty-prod" + prodID);
	if (prod.value==''){
		alert('Please enter a minimum quantity of one.');
		return false;
	}
	else {
		location.href='basket.asp?ProductID=' + prodID + '&ProductQuantity=' + prod.value;
	}
}

function confirmProductDelete(prodID){
	if (confirm('Are you sure you want to remove this product from your basket?')){
		location.href='basket.asp?DelProductID=' + prodID;
	}
}

function checkenquiry(){
	var ftxt = '';
	
	if (document.enquiryform.Name.value==''){
		ftxt += '\n- Please enter your Name.';
	}
	
	if (document.enquiryform.Company.value==''){
		ftxt += '\n- Please enter your Company Name.';
	}	
	
	if (document.enquiryform.Telephone.value==''){
		ftxt += '\n- Please enter your Telephone Number.';
	}
	
	if (isValidEmail(document.enquiryform.email.value)==false){
		ftxt += '\n- Please enter your Email Address.';
	}
	
	if (document.enquiryform.subject.value==''){
		ftxt += '\n- Please select your Enquiry Subject.';
	}
	
	if (ftxt!==''){
		alert('One or more errors were found while submitting this form. The errors found are displayed below.\n' + ftxt + '\n\nPlease correct the above errors and try again.');
		return false;
	}
	else {
		return true;
	}
}

function checklogin(){
	var ftxt = '';
	
	if (document.login.AccountNumber.value==''){
		ftxt += '\n- Please enter your Account Number.';
	}
		
	if (document.login.Password.value==''){
		ftxt += '\n- Please enter your Password.';
	}

	if (ftxt!==''){
		alert('One or more errors were found while submitting this form. The errors found are displayed below.\n' + ftxt + '\n\nPlease correct the above errors and try again.');
		return false;
	}
	else {
		return true;
	}
}

function checkforgottenpassword(){
	var ftxt = '';
	
	if (document.forgottenpassword.AccountNumber.value==''){
		ftxt += '\n- Please enter your Account Number.';
	}
	
	if (isValidEmail(document.forgottenpassword.EmailAddress.value)==false){
		ftxt += '\n- Please enter your Email Address.';
	}

	if (ftxt!==''){
		alert('One or more errors were found while submitting this form. The errors found are displayed below.\n' + ftxt + '\n\nPlease correct the above errors and try again.');
		return false;
	}
	else {
		return true;
	}
}

function checkregisterform(){
	var ftxt = '';
	
	// Personal Details
	var ptxt = '';
	if (document.registerform.BillingName.value==''){
		ptxt += '\n- Please enter your Name.'
	}
	
	if (isValidEmail(document.registerform.EmailAddress.value)==false){
		ptxt += '\n- Please enter your Email Address.';
	}
	
	if (document.registerform.LandlinePhone.value==''){
		ptxt += '\n- Please enter your Landline Telephone Number.';
	}
	
	if (document.registerform.DetailsFrom.value==''){
		ptxt += '\n- Please select Where you heard about us from.';
	}
	
	if (ptxt!==''){
		ftxt += '\n** Personal Details **\n' + ptxt;
	}
	
	// Security Details
	var stxt = '';
	if (document.registerform.Password.value!==document.registerform.Password_Rpt.value){
		stxt += '\n- Please ensure Both New Password\'s Match.';
	}
	else if (document.registerform.Password.value.length<6){
		stxt += '\n- Please ensure your passwird is a minimum of 6 characters long.';
	}
	
	if (stxt!==''){
		if (ftxt!==''){
			ftxt += '\n';
		}
		ftxt += '\n** Security Details **\n' + stxt;		
	}
	
	// Billing Address Details
	var btxt = '';
	if (document.registerform.BillingAddress1.value==''){
		btxt += '\n- Please enter your Billing Address Line 1.';
	}	
	
	if (document.registerform.BillingCity.value==''){
		btxt += '\n- Please enter your Billing City.';
	}
	
	if (document.registerform.BillingCounty.value==''){
		btxt += '\n- Please enter your Billing County.';
	}
	
	if (checkPostCode(document.registerform.BillingPostcode.value)==false){
		btxt += '\n- Please enter your Billing Postcode.';
	}
	
	if (btxt!==''){
		if (ftxt!==''){
			ftxt += '\n';
		}
		ftxt += '\n** Billing Address Details **\n' + btxt;		
	}
	
	if (document.registerform.AcceptedTerms.checked==false){
		if (ftxt!==''){
			ftxt += '\n';
		}
		ftxt += '\n- You must agree to the Terms & Conditions to proceed.';
	}

	if (ftxt!==''){
		alert('One or more errors were found while submitting this form. The errors found are displayed below.\n' + ftxt + '\n\nPlease correct the above errors and try again.');
		return false;
	}
	else {
		return true;
	}
}

function checkeditregistrationform(){
	var ftxt = '';
	
	// Personal Details
	var ptxt = '';
	if (document.editregistrationform.BillingName.value==''){
		ptxt += '\n- Please enter your Name.'
	}
	
	if (isValidEmail(document.editregistrationform.EmailAddress.value)==false){
		ptxt += '\n- Please enter your Email Address.';
	}
	
	if (document.editregistrationform.LandlinePhone.value==''){
		ptxt += '\n- Please enter your Landline Telephone Number.';
	}
		
	if (ptxt!==''){
		ftxt += '\n** Personal Details **\n' + ptxt;
	}
	
	// Security Details
	var stxt = '';
	if (document.editregistrationform.Password.value!==document.editregistrationform.Password_Rpt.value){
		stxt += '\n- Please ensure Both New Password\'s Match.';
	}
	else if ((document.editregistrationform.Password.value!==''&&document.editregistrationform.Password_Rpt.value!=='')&&document.editregistrationform.Password.value.length<6){
		stxt += '\n- Please ensure your passwird is a minimum of 6 characters long.';
	}
	
	if (stxt!==''){
		if (ftxt!==''){
			ftxt += '\n';
		}
		ftxt += '\n** Security Details **\n' + stxt;		
	}
	
	// Billing Address Details
	var btxt = '';
	if (document.editregistrationform.BillingAddress1.value==''){
		btxt += '\n- Please enter your Billing Address Line 1.';
	}	
	
	if (document.editregistrationform.BillingCity.value==''){
		btxt += '\n- Please enter your Billing City.';
	}
	
	if (document.editregistrationform.BillingCounty.value==''){
		btxt += '\n- Please enter your Billing County.';
	}
	
	if (checkPostCode(document.editregistrationform.BillingPostcode.value)==false){
		btxt += '\n- Please enter your Billing Postcode.';
	}
	
	if (btxt!==''){
		if (ftxt!==''){
			ftxt += '\n';
		}
		ftxt += '\n** Billing Address Details **\n' + btxt;		
	}
	
	if (ftxt!==''){
		alert('One or more errors were found while submitting this form. The errors found are displayed below.\n' + ftxt + '\n\nPlease correct the above errors and try again.');
		return false;
	}
	else {
		return true;
	}
}

function checkcheckout(){
	var bpaymentselected = false;
	for (var i=0;i<3;i++){
		if (document.checkout.PaymentMethod[i].checked==true){
			bpaymentselected = true;
		}
	}
	if (bpaymentselected==false){
		alert('Please select a Payment Method.');
		return false;
	}
	else {
		return true;
	}
}

function confirmLogout(){
	if (confirm('Are you sure you want to logout?')){
		location.href='myaccount_home.asp?Logout=True';
	}
}

function checkquickproductsearch(){
    if (document.quickproductsearchform.Criteria.value==''){
        alert('Please enter your Search Criteria.');
        return false;
    }
    else {
        return true;
    }
}

function checkchangepassword(){
    var ftxt = '';
    
    if (document.changepassword.CurrentPassword.value==''){
        ftxt += '\n- Please enter your Current Password.';
    }
    
    if (document.changepassword.NewPassword.value!==document.changepassword.ConfirmNewPassword.value){
        ftxt += '\n- Please ensure both New Passwords Match.';
    }
    else if (document.changepassword.NewPassword.value==document.changepassword.ConfirmNewPassword.value){
        if (document.changepassword.NewPassword.value.length<6){
            ftxt += '\n- Please ensure the New Password is at least 6 Characters Long.';
        }
    }
    
    if (ftxt!==''){
		alert('One or more errors were found while submitting this form. The errors found are displayed below.\n' + ftxt + '\n\nPlease correct the above errors and try again.');
		return false;
	}
	else {
		return true;
	}
}

function checkcontactform(){
    var ftxt = '';
    
    if (document.contactfrm.Name.value==''){
        ftxt += '\n- Please enter your Name.';
    }
    
    if (isValidEmail(document.contactfrm.email.value)==false){
        ftxt += '\n- Please enter your Email Address.';
    }
    
    if (document.contactfrm.TelephoneNumber.value==''){
        ftxt += '\n- Please enter your Telephone Number.';
    }
    
    if (document.contactfrm.Enquiry.value==''){
        ftxt += '\n- Please enter your Enquiry.';
    }
    
    if (ftxt!==''){
		alert('One or more errors were found while submitting this form. The errors found are displayed below.\n' + ftxt + '\n\nPlease correct the above errors and try again.');
		return false;
	}
	else {
		return true;
	}
}

/* Basket and Checkout Functions */
function updateBasket(){
    document.basketupdate.submit()
}

function clearGiftMessageBox(fieldval,fieldid){
    var theid = document.getElementById(fieldid);
    
    if (fieldval=='Please enter your message here...'){
        //theid.value='';
    }
}

function updateCheckoutPrice(){    
    var paymentmethod = '';
    for (var i=0;i<3;i++){
        if (document.ordersubmit.PaymentMethod[i].checked==true){
            paymentmethod = document.ordersubmit.PaymentMethod[i].value;
        }
    }
    document.deliveryselect.SelectedPaymentMethod.value=paymentmethod;
        
    document.deliveryselect.submit();
}

/* Calendar Functions */
function SetOpacity(elem, opacityAsInt)
{
	var opacityAsDecimal = opacityAsInt;
	
	if (opacityAsInt > 100)
		opacityAsInt = opacityAsDecimal = 100; 
	else if (opacityAsInt < 0)
		opacityAsInt = opacityAsDecimal = 0; 
	
	opacityAsDecimal /= 100;
	if (opacityAsInt < 1)
		opacityAsInt = 1; // IE7 bug, text smoothing cuts out if 0
	
	elem.style.opacity = opacityAsDecimal;
	elem.style.filter  = "alpha(opacity=" + opacityAsInt + ")";
}

function daysInMonth(month,year) {
    var dd = new Date(year, month, 0);
    return dd.getDate();
} 

function changeDateNumber(number){
    if (number<10){
        var newnumber = '0'+number;
        return newnumber;
    }
    else {
        return number;
    }
}

function selectCalendarDate(selDate,fullSelDate){ 
    var newdate = new Date(fullSelDate)
    var selectday = newdate.getDate();
    var selectmonth = newdate.getMonth()+1;
    var selectyear = newdate.getFullYear();
     
    for (var i=1;i<daysInMonth(selectmonth,selectyear)+1;i++){
        if (selectday!==i){
            var test = document.getElementById("Day" + i);
            SetOpacity(test,40);
                        
            var testlink = document.getElementById("CalDate" + changeDateNumber(i) + changeDateNumber(selectmonth) + changeDateNumber(selectyear));
            testlink.href='Javascript:void(0)';
            testlink.style.cursor='default';      
        }
    }
    
    // Highlight
    var caldate = document.getElementById("CalDate" + selDate);
    caldate.className='availabledate highlighted';    
    document.addprod.DeliveryDate.value = selectday + '/' + selectmonth + '/' + selectyear;
    
    // Enable the Select Another Button
    var selanother = document.getElementById("selectanotherdate");
    selanother.style.display='block';
}

function checkaddbasket(prodId){
    var ftxt = '';

    if (eval('document.addprod.AddProduct'+prodId+'.value')==''){
        ftxt += '\n- Please enter the number of items you wish to purchase.';
    }
            
    if (document.addprod.DeliveryDate.value==''){
        ftxt += '\n- Please select a Delivery Date.';
    }
    
    if (ftxt!==''){
		alert('One or more errors were found while submitting this form. The errors found are displayed below.\n' + ftxt + '\n\nPlease correct the above errors and try again.');
		return false;
	}
	else {
		return true;
	}
}

/* Checkout Final */
var bspecifydelivery = false;
function specifyDelivery(){
    var deliveryone = document.getElementById("deliveryone");
    var deliverytwo = document.getElementById("deliverytwo");
    
    if (deliveryone.style.display=='block'){
        deliveryone.style.display='none';
        deliverytwo.style.display='block';
        bspecifydelivery = true;
        
        document.ordersubmit.Country.value='United Kingdom';
    }    
    else {
        deliveryone.style.display='block';
        deliverytwo.style.display='none';
        bspecifydelivery = false;
        
        arrDelFields = new Array("Name","Company","Address1","Address2","Address3","City","County","Postcode")
        
        for (var i=0;i<arrDelFields.length;i++){
            eval('document.ordersubmit.' + arrDelFields[i] + '.value=""');
        }
    }
}

function checkfinalcheckout(){
    var ftxt = '';
    
    if (bspecifydelivery){
        if (document.ordersubmit.Name.value==''){
            ftxt += '\n- Please specify a Delivery Name.';
        }
        
        if (document.ordersubmit.Address1.value==''){
            ftxt += '\n- Please specify a Delivery Address 1.';
        }
        
        if (document.ordersubmit.City.value==''){
            ftxt += '\n- Please specify a Delivery City.';
        }
        
        if (document.ordersubmit.County.value==''){
            ftxt += '\n- Please specify a Delivery County.';
        }
        
        if (checkPostCode(document.ordersubmit.Postcode.value)==false){
            ftxt += '\n- Please specify a Delivery Postcode.';
        }
    }
    
    if (ftxt!==''){
		alert('One or more errors were found while submitting this form. The errors found are displayed below.\n' + ftxt + '\n\nPlease correct the above errors and try again.');
		return false;
	}
	else {
		return true;
	}
}
