 /*
 * 
 * E-Mail Vision Generic Join Webform Validation JavaScript - (c) 2003
 * 
 *
*/

	// Controls the invalid characters in a string
	function charCtrl (input, charSet, msg) {
		// Set whcih characters are allowed in the field
		for (i=0; i<input.value.length; i++){
			if (charSet.indexOf(input.value.charAt(i)) == -1) {
				input.focus();
				alert(msg);
				return false;
			}
		}
		return true;
	}

	// function to get parameters in the URL
	function getParams() {
		var idx = document.URL.indexOf('?');
		var params = new Array();
		if (idx != -1) {
			var pairs = document.URL.substring(idx+1, document.URL.length).split('&');
			for (var i=0; i<pairs.length; i++) {
				nameVal = pairs[i].split('=');
				params[nameVal[0]] = nameVal[1];
			}
		}
		return params;
	}
	params = getParams();

	// Script Pop Up Window
	function popupWindow(theURL,winName,features) {
		window.open(theURL,winName,features);
	}

	// This function retrieves the values of the DOB drop down lists and concatenate them into the 'DOB_FIELD' hidden field
	function makeDate(dob_m, dob_d, dob_y) {
		var emvForm = document.canonForm;
		if  ((emvForm.dob_m.options[emvForm.dob_m.selectedIndex].value != '')&&(emvForm.dob_d.options[emvForm.dob_d.selectedIndex].value != '')&&(emvForm.dob_y.options[emvForm.dob_y.selectedIndex].value != '') ) {
			var month = String(emvForm.dob_m.options[emvForm.dob_m.selectedIndex].value);
			var day = String(emvForm.dob_d.options[emvForm.dob_d.selectedIndex].value);
			var year = String(emvForm.dob_y.options[emvForm.dob_y.selectedIndex].value);
			var emvDob =	day + month + year;
			}
		else {
			var emvDob = '';
		}
		return emvDob;
	}
	
	// This function retrieves the values of the DOB drop down lists and concatenate them into the 'DOB_FIELD' hidden field
	function makeDate2(dop_m, dop_d, dop_y) {
		var emvForm = document.canonForm;
		if  ((emvForm.dop_m.options[emvForm.dop_m.selectedIndex].value != '')&&(emvForm.dop_d.options[emvForm.dop_d.selectedIndex].value != '')&&(emvForm.dop_y.options[emvForm.dop_y.selectedIndex].value != '') ) {
			var month = String(emvForm.dop_m.options[emvForm.dop_m.selectedIndex].value);
			var day = String(emvForm.dop_d.options[emvForm.dop_d.selectedIndex].value);
			var year = String(emvForm.dop_y.options[emvForm.dop_y.selectedIndex].value);
			var emvDob = day + month + year;
		} else {
			var emvDob = '';
		}
		return emvDob;
	}
	
	// This function retrieves the values of the DOB drop down lists and concatenate them into the 'DOB_FIELD' hidden field
	function makeDate3(dopa_m, dopa_d, dopa_y) {
		var emvForm = document.canonForm;
		if  ((emvForm.dopa_m.options[emvForm.dopa_m.selectedIndex].value != '')&&(emvForm.dopa_d.options[emvForm.dopa_d.selectedIndex].value != '')&&(emvForm.dopa_y.options[emvForm.dopa_y.selectedIndex].value != '') ) {
			var month = String(emvForm.dopa_m.options[emvForm.dopa_m.selectedIndex].value);
			var day = String(emvForm.dopa_d.options[emvForm.dopa_d.selectedIndex].value);
			var year = String(emvForm.dopa_y.options[emvForm.dopa_y.selectedIndex].value);
			var emvDob =	month + '/' + day + '/' + year;
		} else {
			var emvDob = '';
		}
		return emvDob;
	}

	// This function retrieves the values of the DOB drop down lists and concatenate them into the 'DOB_FIELD' hidden field
	function makeDate4(month, year) {
		//var emvForm = document.canonForm;
		if  ((month.options[month.selectedIndex].value != '')&&(year.options[year.selectedIndex].value != '')) {
			var theMonth = String(month.options[month.selectedIndex].value);
			var theYear = String(year.options[year.selectedIndex].value);
			var finalDate = theMonth + theYear;
		} else {
			var finalDate = '';
		}
		return finalDate;
	}

	// Text field validator
	function mandatoryText(text, msg) {
		if (text.value=="") {
			alert("Please enter your " + msg + ".");
			text.focus();
			return false;
		}
		return true;
	}
	
	// Drop Down Lists validator	
	function mandatoryCombo(dropdown, msg) {
		if (dropdown.options[0].selected) {
			alert("Please select your " + msg + ".");
			dropdown.focus();
			return false;
		}
		return true;
	}
	
	// Radio buttons arrays validator
	function mandatoryRadio(radioList, msg) {
		var radioValue = null;
		for (var i=0; i<radioList.length; i++) {
			if (radioList[i].checked) {
				radioValue = radioList[i].value;
				break;
			}
		}
		if (radioValue == null) {
			alert(msg);
			radioList[0].focus();
			return false;
		} else {
			return true;
		}
	}

	// this function prechecks the email format radio buttons based on the email address
	function aol(str) {
		var emvForm = document.canonForm;
		var add1 = "@aol.";
		var add2 = "@compuserve.co";
		var add3 = "@cs.co";
		str = str.toLowerCase();		
		if ( (str!="")&&((str.indexOf(add1)!= -1)||(str.indexOf(add2)!= -1)||(str.indexOf(add3) != -1)) ) {
			emvForm.MAIL_FORMAT_FIELD[2].checked=true;
			return;
		} else {
			emvForm.MAIL_FORMAT_FIELD[0].checked=true;
		}
	}
	
	function isEmail(emailAddress) {
		emailAddressValue=emailAddress.value.toLowerCase();
		// Below reside knows 2 letters country TLD and 3 letter gTLDs
		var countryTLDs=/^(ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|fi|fj|fk|fm|fo|fr|ga|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)$/;
		var gTLDs=/^(aero|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org)$/;
		var basicAddress=/^(.+)@(.+)$/;
		var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
		var validChars="\[^\\s" + specialChars + "\]";
		var validCharset = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'-_.";
		var quotedUser="(\"[^\"]*\")";
		var atom=validChars + '+';
		var word="(" + atom + "|" + quotedUser + ")";
		var validUser=new RegExp("^" + word + "(\\." + word + ")*$");
		var symDomain=new RegExp("^" + atom + "(\\." + atom +")*$");
		var matchArray=emailAddressValue.match(basicAddress);
		if (matchArray==null) {
			alert("Please ensure that you enter a correct email address.");
			emailAddress.focus();
			return false;
		}	else {
			var user=matchArray[1];
			var domain=matchArray[2];
			for (i=0; i<user.length; i++) {
				if(validCharset.indexOf(user.charAt(i))==-1) {				
					alert("Please ensure that you enter a correct email address.");
					emailAddress.focus();
					return false;
				}
			}
			for (i=0; i<domain.length; i++) {
				if(validCharset.indexOf(domain.charAt(i))==-1) {
					alert("Please ensure that you enter a correct email address.");
					emailAddress.focus();
					return false;
				}
			}
			if (user.match(validUser)==null) {
				alert("Please ensure that you enter a correct email address.");
				emailAddress.focus();
				return false;
			}
			var atomPat=new RegExp("^" + atom + "$");
			var domArr=domain.split(".");
			var len=domArr.length;
			for (i=0;i<len;i++) {
				if (domArr[i].search(atomPat)==-1) {
					alert("Please ensure that you enter a correct email address.");
					emailAddress.focus();
					return false;
				}
			}
			if ((domArr[domArr.length-1].length==2)&&(domArr[domArr.length-1].search(countryTLDs)==-1)) {
					alert("Please ensure that you enter a correct email address.");
					emailAddress.focus();
					return false;
			}
			if ((domArr[domArr.length-1].length>2)&&(domArr[domArr.length-1].search(gTLDs)==-1)) {
				alert("Please ensure that you enter a correct email address.");
				emailAddress.focus();
				return false;
			}
			if ((domArr[domArr.length-1].length<2)||(domArr[domArr.length-1].length>6)) {
				alert("Please ensure that you enter a correct email address.");
				emailAddress.focus();
				return false;
			}
			if (len<2) {
				alert("Please ensure that you enter a correct email address.");
				emailAddress.focus();
				return false;
			}
			return true;
		}
	}

/*
 *
 * This function validates the form fields
 * Use the functions above to make the relevant
 * fields required
 *
*/

function p1() {
	var emvForm = document.canonForm;	
	if (emvForm.TANDCBOX.checked) { emvForm.BOXVALUE.value="1"; } else { emvForm.BOXVALUE.value="0"; }
	if (emvForm.TANDCBOX.checked) { emvForm.NOMAILY_Name.value="0"; } else { emvForm.NOMAILY_Name.value="0"; }

	if (!mandatoryRadio(emvForm.IMAGINE2_Name, "How would you prefer to receive your Imagine communication?")) {
		return;
	} else if (!mandatoryRadio(emvForm.CANON_OPTIN_Name, "Would you like to receive other communications from Canon about product updates and special offers?")) {
		return;
	} else if (!mandatoryRadio(emvForm.MAIL_OPTIN_Name, "Would you like to receive exciting product offers and services by email from other reputable organisations?")) {
		return;
	} else if (!emvForm.TANDCBOX.checked) {
		alert("You must click the box to confirm you have read the Privacy Statement.");
		emvForm.TANDCBOX.focus();
		return;
	} else {
		//alert(emvForm.BOXVALUE.value);
		emvForm.submit();
	}
}

function dateCtrl(myDate, field) { 
	// Enforce date later than sysdate 
	var cal = new Array(); 
	cal[0] = "January"; 
	cal[1] = "February"; 
	cal[2] = "March"; 
	cal[3] = "April"; 
	cal[4] = "May"; 
	cal[5] = "June"; 
	cal[6] = "July"; 
	cal[7] = "August"; 
	cal[8] = "September"; 
	cal[9] = "October"; 
	cal[10] = "November"; 
	cal[11] = "December"; 

	var sysDate = new Date(); 
	var effDateChar = myDate.value;
/*
	// Translates date entered by user into JS format 
	// DD lists passing MM/DD/YYYY
	var bufArray = effDateChar.split("/");
	var finalMonth;
	bufArray[0].indexOf("0") > 1 ? finalMonth = ((bufArray[0].substring(1,2))-1) : finalMonth = ((bufArray[0].substring(0,2))-1);  
	var effDateMonth = cal[finalMonth];
	var effDateDay = bufArray[1];
	var effDateYear = bufArray[2];
*/
	var tempMonth = effDateChar.substring(2,4);
	var effDateDay = effDateChar.substring(0,2);
	var effDateYear = effDateChar.substring(4,6);
	var finalMonth;
	tempMonth.indexOf("0") > 1 ? finalMonth = ((tempMonth.substring(1,2))-1) : finalMonth = ((tempMonth.substring(0,2))-1);  
	var effDateMonth = cal[finalMonth];
	
	//alert("Day " + effDateDay + " | Month " + effDateMonth + " | Year " + effDateYear);
	var effDateDate = new Date(effDateMonth + " " + effDateDay + ", 20" + effDateYear + " 00:00:01"); 
	//alert("Date OPf Purchase:" + effDateDate + "\nToday: " + sysDate);
	// compare the 2 dates 
	if (effDateDate > sysDate) {
		alert("The Date of Purchase can't be in the future."); 
		field.focus();
		return false; 
	} 
	return true; 
} 

function dateCtrl2(myDate, field) { 
	// Enforce date later than sysdate 
	var cal = new Array();
	cal[0] = "January";
	cal[1] = "February";
	cal[2] = "March";
	cal[3] = "April";
	cal[4] = "May";
	cal[5] = "June";
	cal[6] = "July";
	cal[7] = "August";
	cal[8] = "September";
	cal[9] = "October";
	cal[10] = "November";
	cal[11] = "December";
	var sysDate = new Date();
	var effDateChar = myDate.value;
	//alert(effDateChar);
/*
	// Translates date entered by user into JS format 
	// DD lists passing MM/DD/YYYY
	var bufArray = effDateChar.split("/");
	var finalMonth;
	bufArray[0].indexOf("0") > 1 ? finalMonth = ((bufArray[0].substring(1,2))-1) : finalMonth = ((bufArray[0].substring(0,2))-1);  
	var effDateMonth = cal[finalMonth];
	var effDateDay = bufArray[1];
	var effDateYear = bufArray[2];
*/
	var tempMonth = effDateChar.substring(0,2);
	var effDateDay = "01"; //effDateChar.substring(0,2);
	var effDateYear = effDateChar.substring(2,6);
	var finalMonth;
	tempMonth.indexOf("0") > 1 ? finalMonth = ((tempMonth.substring(1,2))-1) : finalMonth = ((tempMonth.substring(0,2))-1);  
	var effDateMonth = cal[finalMonth];
	
	//alert("Day " + effDateDay + " | Month " + effDateMonth + " | Year " + effDateYear);
	var effDateDate = new Date(effDateMonth + " " + effDateDay + ", " + effDateYear + " 00:00:01"); 
	//alert("Date Of Move:" + effDateDate + "\nToday: " + sysDate);
	// compare the 2 dates 
	if (effDateDate > sysDate) {
		alert("The date you moved can't be in the future."); 
		field.focus();
		return false;
	} 
	return true; 
}

function submitFormToPrivacy() {
	var emvForm = document.canonForm;	
	if (emvForm.TANDCBOX.checked) { 
		emvForm.BOXVALUE.value="1";
	} else  {
		emvForm.BOXVALUE.value="0";
	}
	emvForm.action="privacy";
	emvForm.method="POST";
	emvForm.target="_top";
	emvForm.submit();
}

var submitcount = 0;

function p2() {
	var emvForm = document.canonForm;
	var charSet = new String("0123456789()\/-");	
	if (!mandatoryCombo(emvForm.TITLE_FIELD, "Title")) {
		return;
	} else if (!mandatoryText(emvForm.FIRSTNAME_FIELD, "First Name")) {
		return;
	} else if (!mandatoryText(emvForm.LASTNAME_FIELD, "Surname")) {
		return;
	} else if (!mandatoryText(emvForm.POSTO_FIELD, "Postcode part 1")) {
		return;
	} else if (!mandatoryText(emvForm.POSTI_FIELD, "Postcode part 2")) {
		return;
	} else if (!mandatoryText(emvForm.ADDRESS1_FIELD, "Address line 1")) {
		return;
	} else if (!mandatoryText(emvForm.TOWN_FIELD, "Town")) {
		return;
	} else if (!charCtrl(emvForm.TELEPHONE_FIELD, charSet, "The Telephone number field only allows numbers,\nwithout any spaces or special characters.")) {
		return;
	} else if (!mandatoryText(emvForm.EMAIL_FIELD, "E-Mail Address")) {
		return;
	} else if (!(isEmail(emvForm.EMAIL_FIELD))) {
		return;
	} else if ( (emvForm.dop_d.value =="00")||((emvForm.dop_m.value =="00")||(emvForm.dop_y.value =="00")) ) {
		alert("Please select a day, a month and a year of your date of purchase.");	  
		return;
	/* 
	 * Validating the Date of purchase (3 drop down lists: dd + mm + yyyy)
	 * for leap years / non leap years.
	 *
	*/
	// checking that a day of purchase is selected	
		} else if ( (emvForm.dop_d.value =="00")&&((emvForm.dop_m.value =="00")&&(emvForm.dop_y.value =="00")) ) {
		alert("Please select a day, a month and a year of your Date of Birth.");	  
		return;
	} else if ((emvForm.dop_m.options[2].selected)&&(emvForm.dop_d.value > 29)) {
		alert("The month of February has:\n    - 28 days on non-leap years\n    - 29 days on leap years.");
		emvForm.dop_d.focus();
		return;
	} else if ((emvForm.dop_m.options[2].selected)&&(emvForm.dop_d.value == 29)) {
		if ((emvForm.dop_y.value % 4) != 0) {
			alert("The month of February has 28 days for the year selected (non-leap year).");
			emvForm.dop_d.focus();
			return;
		}
	} else if ( ((emvForm.dop_m.options[4].selected)||(emvForm.dop_m.options[6].selected)||(emvForm.dop_m.options[9].selected)||(emvForm.dop_m.options[11].selected))&&(emvForm.dop_d.options[31].selected)) {
			var finalMonth;
			var theMonth = document.emvForm.dop_m.options[document.emvForm.dop_m.selectedIndex].value;
			switch (theMonth) {
				case '04': finalMonth='The month of April';
				break;
				case '06': finalMonth='The month of June';
				break;
				case '09': finalMonth='The month of September';
				break;
				case '11': finalMonth='The month of November';
				break;
				default: finalMonth='The selected month';
			}
			alert(finalMonth + ' has only 30 days.');
			emvForm.dop_d.focus();
			return;
	/*
	 *   end dop validation
	 *
	*/ 
	} else if (!dateCtrl(emvForm.A2_FIELD, emvForm.dop_d)) {
		 return;
	} else if (!mandatoryCombo(emvForm.A3A_FIELD, "product category")) {
		 return;
	} else if (!mandatoryCombo(emvForm.A4_FIELD, "model number")) {
		 return;
	
	} else {
		if (submitcount == 0) {
			submitcount++;
			alert("Please double check that your email address is correct.");
			emvForm.EMAIL_FIELD.focus();
			return;
		} else {
			// lower casing and capitalising
			emvForm.FIRSTNAME_FIELD.value = (((emvForm.FIRSTNAME_FIELD.value.substring(0,1)).toUpperCase())+((emvForm.FIRSTNAME_FIELD.value.substring(1,64)).toLowerCase()) );
			emvForm.LASTNAME_FIELD.value = (((emvForm.LASTNAME_FIELD.value.substring(0,1)).toUpperCase())+((emvForm.LASTNAME_FIELD.value.substring(1,64)).toLowerCase()) );
			emvForm.EMAIL_FIELD.value = emvForm.EMAIL_FIELD.value.toLowerCase();
			//emvForm.responseok.value="http://as1.emv2.com/12116/p3?em=" + emvForm.EMAIL_FIELD.value.toLowerCase();
			emvForm.action="http://as1.emv2.com/D";
			emvForm.method="POST";
			emvForm.target="_top";
			//alert("Product: " + emvForm.A3A_FIELD.value + "\n" + "Model: " + emvForm.A4_FIELD.value + "\nCode: " + emvForm.A4_CODE_FIELD.value);
			/*
			if( (emvForm.A3A_FIELD.options[3].selected)&&
				((emvForm.A4_FIELD.options[1].selected)||
				 (emvForm.A4_FIELD.options[2].selected)||
				 (emvForm.A4_FIELD.options[3].selected)||
				 (emvForm.A4_FIELD.options[50].selected)) ) {
				emvForm.A3A_FIELD.value='02';
			}
			*/
			emvForm.submit();
		}
	}
}

function countChoices(obj) {
	var emvForm = document.canonForm;	
	max = 2;
	box1 = emvForm.fact1.checked;
	box2 = emvForm.fact2.checked;
	box3 = emvForm.fact3.checked;
	box4 = emvForm.fact4.checked;
	box5 = emvForm.fact5.checked;
	box6 = emvForm.fact6.checked;
	box7 = emvForm.fact7.checked;
	box8 = emvForm.fact8.checked;
	box9 = emvForm.fact9.checked;
	box10 = emvForm.fact10.checked;

	count = (box1 ? 1 : 0) + (box2 ? 1 : 0) + (box3 ? 1 : 0) + (box4 ? 1 : 0) + (box5 ? 1 : 0) + (box6 ? 1 : 0) + (box7 ? 1 : 0) + (box8 ? 1 : 0) + (box9 ? 1 : 0) + (box10 ? 1 : 0);

	if (count > max) {
		alert("You can only choose up to " + max + " factors! \nUncheck an option if you want to pick another.");
		obj.checked = false;
		return false;
	}
	else {
		return true;
	}
}

function p3() {
	var emvForm = document.canonForm;
	var athome = "";
	var atoffice = "";
	var canonprod = "";
	
	<!-- USE_COMPACT_CAM_FIELD Home -->
	if (emvForm.USE_COMPACT_CAM.checked) { athome += "01"; }
	<!-- USE_COMPACT_CAM_FIELD Office -->
	if (emvForm.USE_COMPACT_CAM_OFF.checked) { atoffice += "01"; } 
	<!-- USE_COMPACT_CAM_FIELD Canon Prod -->
	if (emvForm.USE_COMPACT_CAM_CANON.checked) { canonprod += "01"; } 

	<!-- USE_DIGITAL_CAM_FIELD Home -->
	if (emvForm.USE_DIGITAL_CAM.checked) { athome += "02"; }
	<!-- USE_DIGITAL_CAM_OFF_FIELD Office -->
	if (emvForm.USE_DIGITAL_CAM_OFF.checked) { atoffice += "02"; } 
	<!-- USE_DIGITAL_CAM_CANON_FIELD Canon Prod -->
	if (emvForm.USE_DIGITAL_CAM_CANON.checked) { canonprod += "02"; } 

	<!-- USE_SLR_CAM_FIELD Home -->
	if (emvForm.USE_SLR_CAM.checked) { athome += "03"; } 
	<!-- USE_SLR_CAM_OFF_FIELD Office -->
	if (emvForm.USE_SLR_CAM_OFF.checked) { atoffice += "03"; } 
	<!-- USE_SLR_CAM_CANON_FIELD Canon Prod -->
	if (emvForm.USE_SLR_CAM_CANON.checked) { canonprod += "03"; } 


	<!-- USE_LENSES_FIELD Home -->
	if (emvForm.USE_LENSES.checked) { athome += "04"; } 
	<!-- USE_LENSES_OFF_FIELD Office -->
	if (emvForm.USE_LENSES_OFF.checked) { atoffice += "04"; } 
	<!-- USE_LENSES_CANON_FIELD Canon Prod -->
	if (emvForm.USE_LENSES_CANON.checked) { canonprod += "04"; } 

	<!-- USE_ANALOG_CAMCORD_FIELD Home -->
	if (emvForm.USE_ANALOG_CAMCORD.checked) { athome += "05"; } 
	 <!-- USE_ANALOG_CAMCORD_OFF_FIELD Office -->
	if (emvForm.USE_ANALOG_CAMCORD_OFF.checked) { atoffice += "05"; } 
	<!-- USE_ANALOG_CAMCORD_CANON_FIELD Canon Prod -->
	if (emvForm.USE_ANALOG_CAMCORD_CANON.checked) { canonprod += "05"; } 

	<!-- USE_DIG_CAMCORD_FIELD Home -->
	if (emvForm.USE_DIG_CAMCORD.checked) { athome += "06"; } 
	<!-- USE_DIG_CAMCORD_OFF_FIELD Office -->
	if (emvForm.USE_DIG_CAMCORD_OFF.checked) { atoffice += "06"; } 
	<!-- USE_DIG_CAMCORD_CANON_FIELD Canon Prod -->
	if (emvForm.USE_DIG_CAMCORD_CANON.checked) { canonprod += "06"; } 

	<!-- USE_ALLINONE_PRINT_FIELD Home -->
	if (emvForm.USE_ALLINONE_PRINT.checked) { athome += "07"; } 
	<!-- USE_ALLINONE_PRINT_OFF_FIELD Office -->
	if (emvForm.USE_ALLINONE_PRINT_OFF.checked) { atoffice += "07"; } 
	<!-- USE_ALLINONE_PRINT_CANON_FIELD Canon Prod -->
	if (emvForm.USE_ALLINONE_PRINT_CANON.checked) { canonprod += "07"; } 

	<!-- USE_JET_PRINT_FIELD Home -->
	if (emvForm.USE_JET_PRINT.checked) { athome += "08"; } 
	<!-- USE_JET_PRINT_OFF_FIELD Office -->
	if (emvForm.USE_JET_PRINT_OFF.checked) { atoffice += "08"; } 
	<!-- USE_JET_PRINT_CANON_FIELD Canon Prod -->
	if (emvForm.USE_JET_PRINT_CANON.checked) { canonprod += "08"; } 

	<!-- USE_LASER_PRINT_FIELD Home -->
	if (emvForm.USE_LASER_PRINT.checked) { athome += "09"; } 
	<!-- USE_LASER_PRINT_OFF_FIELD Office -->
	if (emvForm.USE_LASER_PRINT_OFF.checked) { atoffice += "09"; } 
	<!-- USE_LASER_PRINT_CANON_FIELD Canon Prod -->
	if (emvForm.USE_LASER_PRINT_CANON.checked) { canonprod += "09"; } 

	<!-- USE_FAX_FIELD Home -->
	if (emvForm.USE_FAX.checked) { athome += "10"; } 
	<!-- USE_FAX_OFF_FIELD Office -->
	if (emvForm.USE_FAX_OFF.checked) { atoffice += "10"; } 
	<!-- USE_FAX_CANON_FIELD Canon Prod -->
	if (emvForm.USE_FAX_CANON.checked) { canonprod += "10"; } 

	<!-- USE_SCANNER_FIELD Home -->
	if (emvForm.USE_SCANNER.checked) { athome += "11"; } 
	<!-- USE_SCANNER_OFF_FIELD Office -->
	if (emvForm.USE_SCANNER_OFF.checked) { atoffice += "11"; } 
	<!-- USE_SCANNER_CANON_FIELD Canon Prod -->
	if (emvForm.USE_SCANNER_CANON.checked) { canonprod += "11"; } 

	<!-- USE_PHOTOCOPIER_FIELD Home -->
	if (emvForm.USE_PHOTOCOPIER.checked) { athome += "12"; } 
	<!-- USE_PHOTOCOPIER_OFF_FIELD Office -->
	if (emvForm.USE_PHOTOCOPIER_OFF.checked) { atoffice += "12"; } 
	<!-- USE_PHOTOCOPIER_CANON_FIELD Canon Prod -->
	if (emvForm.USE_PHOTOCOPIER_CANON.checked) { canonprod += "12"; } 

	<!-- USE_PROJECTOR_FIELD Home -->
	if (emvForm.USE_PROJECTOR.checked) { athome += "13"; } 
	<!-- USE_PROJECTOR_OFF_FIELD Office -->
	if (emvForm.USE_PROJECTOR_OFF.checked) { atoffice += "13"; } 
	<!-- USE_PROJECTOR_CANON_FIELD Canon Prod -->
	if (emvForm.USE_PROJECTOR_CANON.checked) { canonprod += "13"; } 

	//<!-- USE_JET_PAPER_FIELD Home -->
	//if (emvForm.USE_JET_PAPER.checked) { athome += "14"; } 
	//<!-- USE_JET_PAPER_OFF_FIELD Office -->
	//if (emvForm.USE_JET_PAPER_OFF.checked) { atoffice += "14"; } 
	//<!-- USE_JET_PAPER_CANON_FIELD Canon Prod -->
	//if (emvForm.USE_JET_PAPER_CANON.checked) { canonprod += "14"; } 

	<!-- USE_BINOC_FIELD Home -->
	if (emvForm.USE_BINOC.checked) { athome += "15"; } 
	<!-- USE_BINOC_OFF_FIELD Office -->
	if (emvForm.USE_BINOC_OFF.checked) { atoffice += "15"; } 
	<!-- USE_BINOC_CANON_FIELD Canon Prod -->
	if (emvForm.USE_BINOC_CANON.checked) { canonprod += "15"; } 

	emvForm.A7A_FIELD.value = athome;
	emvForm.A7B_FIELD.value = atoffice;
	emvForm.A7C_FIELD.value = canonprod;
/*
	alert(emvForm.A7A_FIELD.value);
	alert(emvForm.A7B_FIELD.value);
	alert(emvForm.A7C_FIELD.value);
*/	
	emvForm.action="http://as1.emv2.com/D";
	emvForm.method="POST";
	emvForm.target="_top";
	emvForm.submit();
}

function untickAll() {
	var emvForm = document.canonForm;
	if (emvForm.DONT_HAVE.checked) {
		emvForm.USE_CC.checked=false;
		emvForm.USE_SC.checked=false;
		emvForm.USE_DEBIT.checked=false;
	}
}

function untickDont() {
	var emvForm = document.canonForm;
	if ((emvForm.USE_CC.checked)||(emvForm.USE_SC.checked)||(emvForm.USE_DEBIT.checked)) {
		emvForm.DONT_HAVE.checked=false;
		//alert("Please uncheck 'Don't have' to make an other choice"); 
	}
}

function p4() {
	var emvForm = document.canonForm;
	
	//checks the date of birth
	 if ( (emvForm.dob_d.value =="00")||((emvForm.dob_m.value =="00")||(emvForm.dob_y.value =="00")) ) {
		alert("Please select a day, a month and a year of your date of birth.");	  
		return;
	/* 
	 * Validating the Date of purchase (3 drop down lists: dd + mm + yyyy)
	 * for leap years / non leap years.
	 *
	*/
	// checking that a day of purchase is selected	
		} else if ( (emvForm.dob_d.value =="00")&&((emvForm.dob_m.value =="00")&&(emvForm.dob_y.value =="00")) ) {
		alert("Please select a day, a month and a year of your date of birth.");	  
		return;
	} else if ((emvForm.dob_m.options[2].selected)&&(emvForm.dob_d.value > 29)) {
		alert("The month of February has:\n    - 28 days on non-leap years\n    - 29 days on leap years.");
		emvForm.dob_d.focus();
		return;
	} else if ((emvForm.dob_m.options[2].selected)&&(emvForm.dob_d.value == 29)) {
		if ((emvForm.dob_y.value % 4) != 0) {
			alert("The month of February has 28 days for the year selected (non-leap year).");
			emvForm.dob_d.focus();
			return;
		}
	} else if ( ((emvForm.dob_m.options[4].selected)||(emvForm.dob_m.options[6].selected)||(emvForm.dob_m.options[9].selected)||(emvForm.dob_m.options[11].selected))&&(emvForm.dob_d.options[31].selected)) {
			var finalMonth;
			var theMonth = document.emvForm.dob_m.options[document.emvForm.dob_m.selectedIndex].value;
			switch (theMonth) {
				case '04': finalMonth='The month of April';
				break;
				case '06': finalMonth='The month of June';
				break;
				case '09': finalMonth='The month of September';
				break;
				case '11': finalMonth='The month of November';
				break;
				default: finalMonth='The selected month';
			}
			alert(finalMonth + ' has only 30 days.');
			emvForm.dob_d.focus();
			return;
	/*
	 *   end dob validation
	 *
	*/ 
	
	}else if (!dateCtrl2(emvForm.dom, emvForm.dom_m)) {
		return;
	}
	
	//If the NO Children checkbox is selected a value of 1 is given else a value of 0
	if (emvForm.C1C.checked) { emvForm.C1C_FIELD.value = "1"; } else {emvForm.C1C_FIELD.value = "0";}
	
	var interest = "";	
	if (emvForm.INT1.checked) { interest += "01"; }
	if (emvForm.INT2.checked) { interest += "02"; }
	if (emvForm.INT3.checked) { interest += "03"; }
	if (emvForm.INT4.checked) { interest += "04"; }
	if (emvForm.INT5.checked) { interest += "05"; }
	if (emvForm.INT6.checked) { interest += "06"; }
	if (emvForm.INT7.checked) { interest += "07"; }
	if (emvForm.INT8.checked) { interest += "08"; }
	if (emvForm.INT9.checked) { interest += "09"; }
	if (emvForm.INT10.checked) { interest += "10"; }
	if (emvForm.INT11.checked) { interest += "11"; }
	if (emvForm.INT12.checked) { interest += "12"; }
	if (emvForm.INT13.checked) { interest += "13"; }
	if (emvForm.INT14.checked) { interest += "14"; }
	if (emvForm.INT15.checked) { interest += "15"; }
	if (emvForm.INT16.checked) { interest += "16"; }

	var shopgoods = "";
	if (emvForm.SHOP_GS_MAIL[0].checked) {  shopgoods += "1"; }
	if (emvForm.SHOP_GS_MAIL[1].checked) {  shopgoods += "3"; }
	if (emvForm.SHOP_GS_INTER[0].checked) {  shopgoods += "2"; }
	if (emvForm.SHOP_GS_INTER[1].checked) {  shopgoods += "4"; }
	
	
	var reguse = "";
	if (emvForm.USE_CC.checked) {  reguse += "5"; }
	if (emvForm.USE_DEBIT.checked) {  reguse += "6"; }
	if (emvForm.USE_SC.checked) {  reguse += "7"; }
	if (emvForm.DONT_HAVE.checked) {  reguse += "8"; }
	
	/* 
	 * Validating the Date of birth (3 drop down lists: dd + mm + yyyy)
	 * for leap years / non leap years.
	 *
	*/
	
	// checking that a day of birth is selected	
	if ( (emvForm.dob_d.options[0].selected==true)&&((emvForm.dob_m.options[0].selected==false)||(emvForm.dob_y.options[0].selected==false)) ) {
		alert("Please select a day, a month and a year of birth.");	  
		return;
	}
	// month of February (non-leap years)
	if ((emvForm.dob_m.options[2].selected)&&(emvForm.dob_d.value > 29)) {
		alert("The month of February has:\n    - 28 days on non-leap years\n    - 29 days on leap years.");
		emvForm.dob_d.focus();
		return;
	}
	// month of February (leap years)
	if ((emvForm.dob_m.options[2].selected)&&(emvForm.dob_d.value == 29)) {
		if ((emvForm.dob_y.value % 4) != 0) {
			alert("The month of February has 28 days for the year selected (non-leap year).");
			emvForm.dob_d.focus();
			return;
		}
	}
	// 30 days months
	if ( ((emvForm.dob_m.options[4].selected)||(emvForm.dob_m.options[6].selected)||(emvForm.dob_m.options[9].selected)||(emvForm.dob_m.options[11].selected))&&(emvForm.dob_d.options[31].selected)) {
		var finalMonth;
		var theMonth = document.emvForm.dob_m.options[document.emvForm.dob_m.selectedIndex].value;
		switch (theMonth) {
			case '04': finalMonth='The month of April';
			break;
			case '06': finalMonth='The month of June';
			break;
			case '09': finalMonth='The month of September';
			break;
			case '11': finalMonth='The month of November';
			break;
			default: finalMonth='The selected month';
		}
		alert(finalMonth + ' has only 30 days.');
		emvForm.dob_d.focus();
		return;
	}
	/*
	 *   end DOB validation
	 *
	*/ 
	else {
		emvForm.C4A_FIELD.value = ((emvForm.dom.value).substring(0,2)) + ((emvForm.dom.value).substring(4,6));
		emvForm.C5_FIELD.value = interest;
		emvForm.C6_FIELD.value = shopgoods;
		emvForm.C7_FIELD.value = reguse;
		/*
		alert(emvForm.C5_FIELD.value);
		alert(emvForm.C6_FIELD.value);
		alert(emvForm.C7_FIELD.value);
		*/
		emvForm.action="http://as1.emv2.com/D";
		emvForm.method="POST";
		emvForm.target="_top";
		emvForm.submit();
	}
}

// onChange="fillModelsDropDown(this.form.MODEL_NUMBER_FIELD, canonModels[this.form.PROD_PURCH_FIELD.selectedIndex]);"
// var month = String(emvForm.dob_m.options[emvForm.dob_m.selectedIndex].value);

function genModelsDropDown(dropdown, modelNameArray, modelCodeArray) {
	dropdown.length = 0;
	for(i=0; modelNameArray.length>i; i++) {
	  var x = modelNameArray[i];
	  var y = modelCodeArray[i];
	  
	  var indexOfNameComma = x.indexOf(',');
	  var indexOfCodeComma = y.indexOf(',');
	  
	  var modelName = x.substring(indexOfNameComma+1);
	  var codeName = y.substring(indexOfCodeComma+1);
	  
	  var modelCode = x.substring(0,indexOfNameComma);
	  var codeCode = y.substring(0,indexOfCodeComma);
	  // new Option(display, dbvalue);
	  dropdown[i] = new Option(modelName, codeName);
	  //alert('db: ' + codeName + '\ndisplay: ' + modelName);
	  dropdown[0].selected = true;
	}
}

function changeModelsDropDown(dropdown, modelNameArray) {
	dropdown.length = 0;
	for(i=0; modelNameArray.length>i; i++) {
	  var x = modelNameArray[i];
	  
	  var indexOfNameComma = x.indexOf(',');
	  var modelName = x.substring(indexOfNameComma+1);
	  var modelCode = x.substring(0,indexOfNameComma);
	  
	  // new Option(display, dbvalue);
	  dropdown[i] = new Option(modelName, modelName);
	  //alert('db: ' + codeName + '\ndisplay: ' + modelName);
	  dropdown[0].selected = true;
	}
}

// function to assign a value to the MODEL_CODE field
function assignModelsCodes(index, modelCodeArray, hiddenCode) {
	var x = modelCodeArray[index];
	//var arrayToString = modelCodeArray.toString();
	var indexOfCodeComma = x.indexOf(",");
	//alert(indexOfCodeComma);
	var codeName = x.substring(indexOfCodeComma);
	
	// generating the options for the drop down
	hiddenCode.value = codeName;
	//alert('Code: ' + hiddenCode.value);
}

// Below is the list of products to update
canonProducts = new Array('Please select your product category','Compact Cameras (35mm/APS)','Digital Camera','SLR Camera','Lenses/Speedlites','Analogue Camcorder','Digital Camcorder','All-in-one (Printer Fax Scanner & Copier)','Bubble Jet / Ink Jet Printer','Laser Printer','Fax Machine','Scanner','Personal Photocopier','Multimedia LCD Projector','Speciality Bubble Jet Printer Papers','Binoculars');
canonProductsCodes = new Array('00','01','02','03','04','05','06','07','08','09','10','11','12','13','14','15');

canonModels = new Array();
canonCodes = new Array();

// Initialization
canonModels[0] = new Array('');
canonCodes[0] = new Array('');

// COMPACT CAMERAS
canonModels[1] = new Array('Select your Compact camera','Sure Shot A1','Sure Shot A1 Crab Kit','Sure Shot A1QD','Sure Shot AF7','Sure Shot AF7QD','Sure Shot AF7 Snowy Owl Kit','Sure Shot AF7S','Sure Shot AF7SQD','Sure Shot AF10','Sure Shot BF10KIT','Sure Shot BFQD','Sure Shot CLASSIC 120','Sure Shot CAPCLASSIC 120','Sure Shot 60 Zoom','Sure Shot 60 Zoom QD','Sure Shot 60 Zoom Kingfisher Kit','Sure Shot 65 Zoom  ','Sure Shot 65 Zoom QD','Sure Shot 70 Zoom','Sure Shot 70 Zoom QD','Sure Shot 70 Zoom Hummingbird Kit','Sure Shot 76 Zoom','Sure Shot 85 Zoom','Sure Shot 85 Zoom QD','Sure Shot 105 Zoom','Sure Shot 105 Zoom Peacock Kit','Sure Shot 105 Zoom QD','Sure Shot 105S Zoom','Sure Shot 105S Zoom QD','Sure Shot 130u','Sure Shot 130u Photo Kit','Sure Shot 150uDate','Sure Shot Snappy LXII','Sure Shot Snappy LXIIQD','Sure Shot Snappy LXII Sunflower Kit','Sure Shot Snappy QT','Sure Shot Snappy QT Kit','Sure Shot Z65W','Sure Shot Z70W','Sure Shot Z70W Caption','Sure Shot Z70W Lynx Kit','Sure Shot Z90W','Sure Shot CAPZ90W','Sure Shot Z135','Sure Shot 120 Rose Kit','Sure Shot Z90W Photo Kit','Sure Shot 80u','Sure Shot 80uKIT','Sure Shot 90uKIT','Sure Shot 115uKIT','Sure Shot 105u','Sure Shot 115uQD','Sure Shot 85N Cheetah Kit2','Sure Shot 65 Zoom Photokit','Sure Shot A1 Turtle Kit','Sure Shot AF7 Photo Kit','Sure Shot BF Photo Kit','Sure Shot Z50 Camkit','Sure Shot Z65 Camkit','Sure Shot Z70 Camkit2','Sure Shot Z155','Sure Shot Z155 Photokit','IXUS Collection Kit','IXUS Z65 Kit','IXUS Z70','IXUS III','IXUS III Photokit','IXUS L-1','IXUS L-1B','IXUS L-1S','IXUS ARANCIA','IXUS M-1','IXUS SUMMER','IXUS X-1','IXUS Z50','IXUS Z65','IXUS Z90','IXUS IICamkit2','IXUS L1BCamkit2','IXUS L1SCamkit2','IXUS M1Camkit','IXUS X1Camkit','Sureshot Z180u Date');
canonCodes[1] = new Array('999999','10001','10002','10003','10004','10005','10006','10007','10008','10079','100084','10009','10010','10011','10012','10013','10014','10015','10016','10017','10018','10019','10020','10021','10022','10023','10024','10025','10026','10027','10028','10029','10085','10030','10031','10032','10033','10034','10035','10036','10037','10038','10039','10040','10041','10042','10043','10080','10081','10082','10083','10087','10088','10044','10045','10046','10047','10048','10049','10050','10051','10052','10053','10054','10055','10056','10058','10059','10060','10061','10062','10063','10064','10065','10066','10067','10068','10070','10071','10072','10073','10074','10075','10086');
// DIGITAL CAMERAS
canonModels[2] = new Array('Select your Digital camera','CP200','CP220','CP300','CP330','CP400','CP500','Selphy DS700','CP10','CP10KIT','CP100','IXUS','IXUSV','IXUSv2','IXUSv3','IXUS300','IXUS330','IXUS400','IXUS430','IXUS500','IXUS i','IXUS II','IXUS IIs','Powershot 30T','Powershot A5','Powershot A5 Zoom','Powershot A10','Powershot A20','Powershot A30','Powershot A40','Powershot A50','Powershot A60','Powershot A70','Powershot A75','Powershot A80','Powershot A85','Powershot A100','Powershot A200','Powershot A300','Powershot A310','Powershot G1','Powershot G2','Powershot G2 Black','Powershot G3','Powershot G5','Powershot G5Kit','Powershot Pro 70','Powershot Pro 90','Powershot Pro 1','Powershot S1','Powershot S1IS','Powershot S10','Powershot S20','Powershot S30','Powershot S40','Powershot S45','Powershot S50','Powershot S50kit','Powershot S60','Powershot G6','Powershot S70','Powershot A95','Powershot A400','IXUS30','IXUS40','IXUSi5');
canonCodes[2] = new Array('999999','20001','20059','20002','20060','20069','20070','20072','20003','20004','20005','20006','20007','20008','20009','20010','20011','20012','20052','20053','20047','20049','20054','20018','20019','20020','20021','20022','20023','20024','20025','20026','20027','20055','20048','20061','20028','20029','20030','20056','20031','20032','20033','20034','20035','20050','20036','20037','20057','20058','20071','20038','20039','20040','20041','20042','20043','20051','20062','20063','20064','20065','20073','20067','20068');

// SLR CAMERAS
canonModels[3] = new Array('Select your SLR camera','EOS1D','EOS1DS','EOS1D MarkII','EOS10D','EOS 300D Body','EOS 300D 18-55 Lens','EOS 300D Twin Kit','EOS1X Body Only','EOS1X&24-85 lens','EOS1X&25-85USM lens','EOS1X7 Body Only','EOS1X7 22-55 lens','EOS1NRS & Drive Booster Pk','EOSIV Body only','EOSIV Drive','EOSIV Body and Drive Booster Pk','EOS3 Body only','EOS5 Body only','EOS5QD Body only','EOS30E Body only','EOS30E QD Body only','EOS30E Kit','EOS30E & 28-90USM Lens','EOS30V KIT','EOS30V BO','EOS33V KIT','EOS33 Body only','EOS55 (Silver)','EOS55 (Black)','EOS55 (Silver) Twin','EOS55 (Black) Twin','EOS300 Body only','EOS300 Body only S','EOS300QD Body only S','EOS300 Deluxe Black','EOS300 Deluxe White','EOS300 Twin Lens Kit ','EOS300 & 35-80 Lens','EOS300 & 28-80 Lens','EOS300 & 28-90 Lens','EOS300V BO S','EOS300V QDBO S','EOS300V 28-90','EOS300V 28-90U','EOS300V 28-105U Twin','EOS3000 & 35-80 Lens','EOS3000QD Body only S','EOS3000N Body only','EOS3000N & 28-90 Lens','EOS3000N Twin Kit','EOS3000V Body','EOS3000V 28-90 Lens','EOS3000V Twin Kit','EOSD60','EOS 20D','EOS 300X Body Only','EOS 300X 28-90Kit','EOS 300X 28-90 Twin Kit','EOS 300D Double Zoom Lens Kit','EOS1DSMarkII');
canonCodes[3] = new Array('999999','30001','30002','30052','30003','30049','30050','30051','30004','30005','30006','30007','30008','30009','30010','30011','30012','30013','30014','30015','30016','30017','30018','30019','30053','30055','30054','30020','30021','30022','30023','30024','30025','30026','30027','30028','30029','30030','30031','30032','30033','30034','30035','30036','30037','30038','30039','30040','30041','30042','30043','30046','30047','30048','30045','30056','30056','30057','30058','30059','30061');

// LENSES
canonModels[4] = new Array('Select your Lenses/Speedlites','EF24-7028L','EF1528','EF1428L','EF163528LU','EF2028U','EF2414LU','EF2428','EF2818U','EF2828','EF3514LU','EF3520','EF5010L','EF5014U','EF5018','EF8512L','EF8518U','EF10020','EF13520LU','EF13528','EF20018L','EF20028LU/2','EF30028LUIS','EF30040LUIS','EF40028LUIS','EF400F40DOISUSM','EF40056LU','EF50040LUIS','EF60040LUIS','EF60040L','TSE2435L','TSE4528','TSE9028','EF173528LU','EF1740F4LUSM','EF203535U','EF225540U','EF247028L','EF248535U','EF287028L','EF28803556/2','EF288035U/5','EF28904056S','EF28904056U','EF281053545U/2','EF281054056U','EF281353556UIS','EF282003556','EF282003556U','EF28904056/2','EF28904056U/2','EF28-300DO','EF283003556LUIS','EF358040/3','EF5520045U','EF7020028L','EF7020040LU','EF70-300IS L USM','EF703004556DOUIS','EF7530056/3','EF7530040U/3','EF75300UIS','EF8020045/2','EF903004556','EF903004556U','EF10030045U','EF10030056L','EF100400LUIS','EF3535035LU','2XEF','14XEF','EFM5025','EFM10028U','EFM18035LU','MPE6528','EFCON','MACCON','EF12','EF25','200E','480EG','220EX','420EX','550EX','MR14EX','MT24EX','EFS1785456ISU','EFS10223545U','580EX');
canonCodes[4] = new Array('999999','40001','40002','40003','40004','40005','40006','40007','40008','40009','40010','40011','40012','40013','40014','40015','40016','40017','40018','40019','40020','40021','40022','40023','40074','40024','40025','40026','40027','40028','40029','40030','40031','40032','40075','40033','40034','40076','40035','40036','40037','40038','40039','40040','40041','40042','40043','40044','40045','40046','40047','40077','40089','40048','40049','40050','40051','40078','40090','40052','40053','40054','40055','40056','40057','40058','40059','40060','40061','40062','40063','40066','40067','40068','40069','40070','40071','40072','40073','40079','40080','40081','40082','40083','40084','40085','40087','40088','40086');

// ANALOGUE CAMCORDERS
canonModels[5] = new Array('Select your Analogue camcorder','G10Hi','G20Hi','G30Hi','G35Hi','G45Hi','G1000','G2000','V30Hi','V35Hi','V40Hi','V50Hi','V60Hi','V65Hi','V75Hi','V400','V500');
canonCodes[5] = new Array('999999','50001','50002','50003','50004','50005','50006','50007','50008','50009','50010','50011','50012','50013','50014','50015','50016');

// DIGITAL CAMCORDERS
canonModels[6] = new Array('Select your Digital camcorder','MV3','MV3MC','MV3i','MV3i Kit','MV3i MC','MV3i MCKIT','MV4','MV4i','MV4iMC','MV5','MV5i','MV5iMC','MV6iMC','MV30','MV30i','MV200','MV300','MV300i','MV300i Kit','MV400','MV400i','MV400i Promo','MV450','MV450i Promo','MV500','MV500i','MV550i','MV600','MV600i','MV650i','MV700','MV700i','MV730i','MV750i','MVX1i','MVX2i','MVX3i','MVX10i','MVX100i','MVX150i','MVX200','MVX200i','MVX250i','MV530i','MV630i','MVX20i','MVX25i','MVX30i','MVX35i','XL1','XL1Kit','XL1S','XM1','XM2','XL2');
canonCodes[6] = new Array('999999','60001','60002','60003','60004','60005','60006','60007','60008','60009','60010','60011','60012','60042','60013','60014','60015','60016','60017','60018','60019','60020','60021','60022','60023','60024','60025','60026','60027','60028','60029','60043','60044','60045','60046','60030','60031','60040','60041','60047','60032','60048','60049','60050','60033','60034','60052','60053','60054','60055','60035','60036','60037','60038','60039','60051');

// ALL-IN-ONE
canonModels[7] = new Array('Select your All-in-one','MP360','MP370','MP390','PIXMA MP750','PIXMA MP780','MF5630','MF5650','MPC20HK','MPC50HK','MPC70','MPC75','MPC80','MPC100','MPL60BASIC','MPL60WAR','MPL90','MPL90WAR','MPC190','MPC200Photo','MPC400','MPC600F','MP700Photo','MP730Photo','PC1210D','PC1230D','PC1270D');
canonCodes[7] = new Array('999999','70010','70011','70022','70025','70026','70023','70024','70016','70017','70012','70013','70014','70015','70020','70021','70018','70019','70001','70002','70003','70004','70005','70006','70007','70008','70009');

// BUBBLE JET PRINTERS
canonModels[8] = new Array('Select your Bubble Jet printer','BJC-50','BJC-55','BJC-85','BJC-85 Scan','BJC-1000','BJC-2000','BJC-2100','BJC-3000','BJC-4400Photo','BJC-4650','BJC-5000','BJC-5100','BJC-5500','BJC-6000','BJC-6100','BJC-6200','BJC-6500','BJC-7100','BJC-8200 Photo','i70','i80','i250','i320','i350','i450','i455','i470D','i475D','i550','i560','i850','i865','i905D','i950','i965','i990','i6500','i9100','i9950','PIXMA iP1500','PIXMA iP2000','PIXMA iP3000','PIXMA iP4000','PIXMA iP4000R','S100','S200','S200X','S300','S330 Photo','S400','S450','S500','S520','S530D','S600','S630','S750','S800','S820','S820D','S830D','S900','S4500','S6300','S9000','PIXMA iP5000','PIXMA iP6000D','PIXMA iP8500');
canonCodes[8] = new Array('999999','80001','80002','80003','80004','80005','80006','80007','80008','80009','80010','80011','80012','80013','80014','80015','80016','80017','80018','80019','80020','80059','80056','80021','80057','80022','80050','80023','80051','80024','80052','80025','80053','80054','80026','80055','80058','80027','80028','80060','80061','80062','80063','80064','80068','80029','80030','80031','80032','80033','80034','80035','80036','80037','80038','80039','80040','80041','80042','80043','80044','80045','80046','80047','80048','80049','80065','80066','80067');

// LASER PRINTERS
canonModels[9] = new Array('Select your Laser printer','LBP 660','LBP 800','LBP 800NET','LBP 810','LBP 1120','LBP 1210','LBP 1760','LBP 2460','LBP 3200','LBP 3260','GP 160','CLBP460PS','CLBP400');
canonCodes[9] = new Array('999999','90001','90002','90003','90004','90005','90006','90007','90008','90013','90009','90010','90011','90012');

// FAX MACHINE
canonModels[10] = new Array('Select your Fax machine','B110','B120','B140','B150','B155','B160','B155 HK','B180','B180C','B210C','B230C','B230CHK','B820','B840','EB10','EB15','FL1000C','L30CM','L200','L200WAR','L220','L240','L250','L250WAR','L260i','L260iWAR','L280','L290','L295','FL300WAR','L350C','L350CWAR','L360','L380','L400','L800C','L800CWAR','L900C','L900CWAR','L1000CWAR','L2000','L2000IP','FAXT21HK','FAXT31HK');
canonCodes[10] = new Array('999999','100001','100002','100003','100004','100005','100006','100007','100008','100009','100010','100011','100030','100043','100044','100012','100013','100014','100034','100015','100016','100031','100017','100032','100018','100019','100020','100021','100022','100033','100023','100024','100025','100026','100042','100035','100036','100027','100037','100028','100029','100038','100039','100040','100041');

// SCANNERS
canonModels[11] = new Array('Select your Scanner','CanoScan 300','CanoScan 600','CanoScan 3000F','CanoScan 3200F','CanoScan 4200F','CanoScan 5000F','CanoScan 5200F','CanoScan 8000F','Canoscan 8400F','CanoScan 9000F','CanoScan 9900F','Canoscan 9950F','CanoScan FB310','CanoScan FB320P','Canoscan FB330P','CanoScan FB620P','CanoScan FB620U','CanoScan FB610','CanoScan FB630U','CanoScan FB630Ui','CanoScan FB630P','CanoScan 1200S','CanoScan 1200S FAU','CanoScan 1250U2FSE','CanoScan FB1210U','CanoScan FB1210FAU','CanoScan FB1210UFAU','CanoScan LiDE20','CanoScan LiDE30','CanoScan LiDE35','CanoScan LiDE50','CanoScan LiDE80','CanoScan N640P','CanoScan N640Pex','CanoScan N650U','CanoScan N656U','CanoScan N670U','CanoScan N676U','CanoScan N1220U','CanoScan N1240U','CanoScan D646U','CanoScan D1250U2','CanoScan D1250U2F','CanoScan D2400U','CanoScan D2400UF','CanoScan D2400UFAU','CanoScan D660U','CanoScan D1230U','CanoScanD1230UF','CanoScan N340P','CanoScan FS2710','CanoScan FS4000US','CanoScan DR4580U');
canonCodes[11] = new Array('999999','110001','110002','110003','110047','110055','110004','110052','110005','110053','110006','110007','11054','110008','110009','110010','110011','110012','110013','110014','110015','110016','110017','110018','110050','110019','110020','110021','110022','110023','110051','110024','110048','110025','110026','110027','110028','110029','110030','110031','110032','110033','110034','110035','110036','110037','110038','110039','110040','110049','110042','110044','110045','110046');

// PERSONAL PHOTOCOPIERS
canonModels[12] = new Array('Select your Personal photocopier','FC100','FC120','FC200','FC204','FC204S','FC220','FC224','FC224S','FC336','PCD320','PCD340','PC760','PC780','PC890');
canonCodes[12] = new Array('999999','120016','120017','120001','120002','120003','120004','120005','120006','120007','120008','120009','120010','120011','120012');

// MULTIMEDIA LCD PROJECTOR
canonModels[13] = new Array('Select your LCD Projector','LV5100E','LV5210','LV5220','LV5300','LV5500','LV7105','LV7210','LV7215','LV7220','LV7225','LV5220','LV7300','LV7320','LV7325','LV7500','LV7525','LV7555','PR-2005','LV-S1','LV-S2','LV-S3','LV-X4','LV-X1','LV-X2','LV-7340','LV-7345','LV-7545','XEED SX 50');
canonCodes[13] = new Array('999999','130001','130002','130020','130025','130003','130004','130005','130021','130022','130026','130027','130006','130007','130008','130009','130010','130023','130011','130012','130017','130018','130024','130013','130019','130014','130015','130028');

// SPECIALITY BUBBLE JET PRINTER PAPERS
canonModels[14] = new Array('');
canonCodes[14] = new Array('999999');

// BINOCULARS
canonModels[15] = new Array('Select your Binoculars','5x17 FC','7x17 FC','8x22','8x22 A','8x23 A','8x23 AWP','8x25 IS','8x32 A','8x32 WP','10x25A','10x30 IS','12x36 IS','12x36 IS II','15x45 IS','15x45 ISAW','15x50 ISAW','18x50 ISAW');
canonCodes[15] = new Array('999999','150001','150002','150003','150004','150005','150006','150007','150008','150009','150010','150011','150012','150017','150013','150014','150015','150016');

