
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function goCats( sLocation ){
	if (sLocation != '-1') { 
		window.location.href = sLocation;
	}
}

function GotoPage ( blnShowFeature, strCategory, strSubCategory, strPage ) {

	var strLoc, strFeat

	if ( blnShowFeature == true ) {
		strFeat = "&feat=show"
	} else {
		strFeat = ""
	}

	strLoc = "parent.location.href = 'cats.asp?sc=" + strSubCategory + "&page=" + strPage + "&c=" + strCategory + strFeat + "'";
	
	eval( strLoc );
	
}


function openSpread ( URL ) {
	window.open(URL,"spread","width=650,height=490,status=yes,scrollbars=yes,resizable=yes,menubar=no");
}

function Validate_ContactForm() {
	
	var f, errorMsg;
	f = document.form_contact;
	errorMsg = '';
	
	if (f.Name.value.length == 0 ) {
		errorMsg = '- Name must be completed.\n';
	}
	
	if (f.Email.value.length == 0 ) {
		errorMsg = errorMsg + '- E-mail address must be completed.\n';
	} else {
		if (f.Email.value.indexOf('@') == -1 || f.Email.value.indexOf('.') == -1 ) {
			errorMsg = errorMsg + '- A valid E-mail address is required.\n';
		}
	}
	
	if (f.Subject.value.length == 0 ) {
		errorMsg = errorMsg + '- Subject must be completed.\n';
	}
	
	if (f.Message.value.length == 0 ) {
		errorMsg = errorMsg + '- Message must be completed.\n';
	}		
	
	if ( errorMsg.length > 0 ) {
		errorMsg = 'The following errors were found:\n======================\n' + errorMsg;
		alert( errorMsg );
		return false;
	} else {
		return true;
	}

	
	return false;	
	
}


function Validate_Checkout_Step1() { //v3.0


	var f, errorMsg;
	f = document.form_checkout
	errorMsg = '';
	

	if (f.last_name.value.length == 0) {
		errorMsg = '- Surname field must be completed.\n';
	}

	if (f.first_name.value.length == 0) {
		errorMsg = errorMsg + '- Forename must be completed.\n';
	}	

	if (f.email.value.length == 0) {
		errorMsg = errorMsg + '- E-mail address must be completed.\n';
	} else {
		if (f.email.value.indexOf('@') == -1 || f.email.value.indexOf('.') == -1 ) {
			errorMsg = errorMsg + '- A valid E-mail address is required.\n';
		}
	}

	if (f.telno.value.length == 0) {
		errorMsg = errorMsg + '- Telephone number must be completed.\n';
	}	

	if (f.address1.value.length == 0) {
		errorMsg = errorMsg + '- Address 1 must be completed.\n';
	}		

	if (f.town.value.length == 0) {
		errorMsg = errorMsg + '- City must be completed.\n';
	}	

	if (f.postcode.value.length == 0) {
		errorMsg = errorMsg + '- Postcode must be completed.\n';
	}			

	if ( errorMsg.length > 0 ) {
		errorMsg = 'The following errors were found:\n======================\n' + errorMsg;
		alert( errorMsg );
		return false;
	} else {
		return true;
	}

	
	return false;


}


function Validate_Checkout_Step3() { //v3.0
	var f, errorMsg;
	f = document.carddetails
	errorMsg = '';
	

	//if (f.igate_ccnumber.value.length < 13 || f.igate_ccnumber.value.length > 18) {
	//	errorMsg = '- A valid Credit Card number must be supplied.\n';
	//}
	
	//if (f.igate_cctype.value  == 'switch' && f.igate_ccissueno.value.length == 0) {
	//	errorMsg = errorMsg + '- For Switch cards, the Issue number must be supplied.\n';
	//}		
	
	if (f.igate_acceptterms.checked == false) {
		errorMsg = errorMsg + ' - You must accept the Terms & Conditions of Sale.\n';
	}	

	if ( errorMsg.length > 0 ) {
		errorMsg = 'The following errors were found:\n======================\n' + errorMsg;
		alert( errorMsg );
		return false;
	} else {
		f.submit();
		return true;
	}
	return false;
}


function Validate_CorpAccForm() {
	
	var f, errorMsg;
	f = document.form_CorpAcc
	errorMsg = '';	
	
	if (f.password.value.length == 0) {
		errorMsg = errorMsg + '- Account number must be complete.\n';	
	}
	
	if (f.ponumber.value.length == 0) {
		errorMsg = errorMsg + '- A Purchase Order number is required.\n';	
	}	
	
	if ( errorMsg.length > 0 ) {
		errorMsg = 'The following errors were found:\n======================\n' + errorMsg;
		alert( errorMsg );
		return false;
	} else {
		f.submit();
	}	
	
}

function Validate_SearchForm() {
	var f, errorMsg;
	f = document.myForm;
	errorMsg = '';
	
	if (f.year.value.length != 0){
		if ( IsNumeric(f.year.value) == false ) {
			errorMsg = errorMsg + '- Invalid value for Year entered.\n';	
		}			
	}	
	
	if ( errorMsg.length > 0 ) {
		errorMsg = 'The following errors were found:\n======================\n' + errorMsg;
		alert( errorMsg );
		return false;
	} else {
		f.submit();
	}		
	
}

function Validate_TrackForm() {
	
	var f, errorMsg;
	f = document.track_form;
	errorMsg = '';
	
	if (f.name.value.length == 0 ) {
		errorMsg = errorMsg + '- Your Name must be completed.\n';	
	}
	
	if (f.email.value.length == 0 ) {
		errorMsg = errorMsg + '- Your Email address must be completed.\n';	
	} else {
		if (f.email.value.indexOf('@') == -1 || f.email.value.indexOf('.') == -1 ) {
			errorMsg = errorMsg + '- The Email address you have entered does not appear to be valid.\n';
		}
	}
					
	if ( errorMsg.length > 0 ) {
		errorMsg = 'The following errors were found:\n======================\n' + errorMsg;
		alert( errorMsg );
		return false;
	} else {
		f.submit();
	}		
	
}


function IsNumeric( strCheck ) { 
    var cnt = 0, c; 
    for ( cnt = 0; cnt < strCheck.length; cnt++  ) { 
      c = strCheck.charAt( cnt ); 
        if ( c < "0" || c > "9" ) { 
            return false; 
        } 
    } 
    return true; 
}
//-->