
				function modelOrOEMChangeChange() { 
					var levelBox5 = document.getElementById('levelBox5');
					var levelBox4 = document.getElementById('levelBox4');
					
					levelBox5.disabled = '';
					levelBox4.disabled = '';
					
					if (levelBox5.selectedIndex != 0) {
						
						levelBox4.disabled = 'disabled';
						
					} else 	if (levelBox4.selectedIndex != 0) {
						
						levelBox5.disabled = 'disabled';
						
					}
				}
				
				function functionSelector(sourceSelectId, lvl){
					
//					document.getElementById('levelBox3').disabled = '';
					
					elementValue = document.getElementById(sourceSelectId);
					if ( document.getElementById(sourceSelectId).selectedIndex == 0 ){
						tlvl = elementValue.id.split('levelBox')[1];
						if ( tlvl == null ){
							// clearChilds(1);	
						}else{
							// clearChilds(tlvl);
						}		
						return;
					}
					var sel = document.getElementById("selectBoxDevice");
					deviceName = "";
					if ( sel.value.indexOf("Laptop Computers") != -1){
						if ( lvl == 1){
							reloadBrands();
						} else if ( lvl == 2){
							reloadSeries();
						} else if ( lvl == 3){
							reloadModelPart();
						}
						return 0;
					}else if ( sel.value.indexOf("Camera") != -1 ){
						deviceName = "camera";
					}else if ( sel.value.indexOf("Camcorder") != -1 ){
						deviceName = "camcoder";
					}
					
					elementValue = elementValue.options[elementValue.selectedIndex];
					elementValue = elementValue.innerHTML;
					if ( elementValue.indexOf("Camcoder") != -1) elementValue = "Camcorder";
					callRemoteInjection(deviceName,elementValue,parseInt(lvl)+1);
				}
				
				function reloadCamera(){
					
				}
				
				function injectOptions(sel, strbuffer){
					if (typeof(sel) == "string") sel = document.getElementById(sel);
					if (sel == "null") return;
					sel.options.length=1;
					// sel.disabled="";
					
					// clearChilds(sel.id.split('levelBox')[1]);
					var strbuffer = strbuffer.split(':!!:');
					var til = strbuffer.length-1;
					for ( var i=0;i<til;i++){
						var str = strbuffer[i].split('::');
						var opt = document.createElement('option');
						opval = str[1].split('> ');
						opval = opval[opval.length-1];
						opval = opval.split(' Batteries')[0];
						opval = opval.split(' Series')[0];
						
						opt.innerHTML = opval;
						opt.value = str[0];
						sel.appendChild(opt);
					}

					try {
						var levelBox3 = document.getElementById('levelBox3');

						if ((levelBox3.options[2].innerHTML.indexOf('OEM Part Number') != -1) ||
					    		(levelBox3.options[1].innerHTML.indexOf('OEM Part Number') != -1) ||
								(levelBox3.options[2].innerHTML.indexOf('Model Numbers') != -1) ||
					    		(levelBox3.options[1].innerHTML.indexOf('Model Numbers') != -1)) {

					    	levelBox3.options.length = 1;    

					    	functionSelector('levelBox2', '4')
					
							document.getElementById("levelBox3").disabled = 'disabled';
							
							document.getElementById("levelBox5").disabled = '';
							document.getElementById("levelBox4").disabled = '';
						}
					} catch (e) { }
				}
				
				function clearChilds(parentLvl){
					while((parentLvl++)<6){
						var sel = document.getElementById('levelBox'+parentLvl);
						if ( sel != null) sel.length = 1;
					}
				}
				
				function callRemoteInjection(deviceName,elementName,lvl){
					var scrypt = document.createElement('script');

					scrypt.type="text/javascript";
					scrypt.src ="http://www.suitecommerceapps.com/cutratebatteries/gcc.jsp?";
					scrypt.src += "deviceName="+deviceName+"&elementName="+elementName+"&lvl="+lvl;
					//The remote call will invoke the injectOptions function
					document.body.appendChild(scrypt);
				}
				
				//------------------ OSCAR --------------------
				
				function reloadBrands() {
					//Cleaning the comboBox
					clearChilds(1);
					//Creating the object that handles the file src execution
					var scriptFile = document.createElement('script');
					scriptFile.setAttribute('type','text/javascript');
					
					//Getting the parent select.
					var parentSelectedValue = document.getElementById("selectBoxDevice").value;
				
					//Getting the parent selected name
					var deviceSelect = document.getElementById("selectBoxDevice");
					var deviceSelectedName = deviceSelect.options[deviceSelect.selectedIndex].innerHTML
					
					//Making the URL for the source script
					scriptFile.setAttribute('src','http://www.suitecommerceapps.com/cutratebatteries/getChilds.jsp?node=0&select=levelBox2&brandName=null');
					//Cleaning the comboBox
					document.getElementById("levelBox2").options.length=1;
					var op = document.createElement('option');
					op.value="x";
					op.innerHTML="Select an option";
//					document.getElementById("levelBox2").appendChild(op);
					document.getElementsByTagName("head")[0].appendChild(scriptFile);
				}
				
				function partNumberChange() {
					document.getElementById("model").selectedIndex = 0;
				}
				
				function modelChange() {
					document.getElementById("partnumber").selectedIndex = 0;
				}
				
				//This funcitons loads all the series of a selected brand category
				function reloadSeries() {
					//Cleaning the comboBox
					clearChilds(2);
					
					//Creating the object that handles the file src execution
					var scriptFile = document.createElement('script');
					scriptFile.setAttribute('type','text/javascript');
					
					//Getting the parent select.
					var parentSelectedValue = document.getElementById("levelBox2").value.split('-')[0];
				
					//Getting the parent selected name
					var brandSelect = document.getElementById("levelBox2");
					var brandSelectedName = brandSelect.options[brandSelect.selectedIndex].innerHTML
					
					//Making the URL for the source script
					var src = 'http://www.suitecommerceapps.com/cutratebatteries/getChilds.jsp?node='+parentSelectedValue+'&select=levelBox3&brandName='+brandSelectedName;
					scriptFile.setAttribute('src', src);
					var op = document.createElement('option');
					op.value="x";
					op.innerHTML="Select an option";
//					document.getElementById('levelBox3').appendChild(op);
					document.getElementsByTagName("head")[0].appendChild(scriptFile);
				}

				//This funcitons loads all the series of a selected brand category
				function reloadModelPart() {
					//Cleaning the comboBox
					clearChilds(3);
					
					//Creating the object that handles the file src execution
					var scriptFile = document.createElement('script');
					scriptFile.setAttribute('type','text/javascript');
					
					//Getting the parent select.
					var parentSelectedValue = document.getElementById("levelBox3").value.split('-')[0];
			
					//Getting the brand selected name
					var brandSelect = document.getElementById("levelBox2");
					var brandSelectedName = brandSelect.options[brandSelect.selectedIndex].innerHTML
					
					//Getting the serie selected name
					var serieSelect = document.getElementById("levelBox3");
					var serieSelectName = serieSelect.options[serieSelect.selectedIndex].innerHTML
					
					//Making the URL for the source script
					var src = 'http://www.suitecommerceapps.com/cutratebatteries/getModelPartChilds.jsp?node=' + parentSelectedValue + '&selectModel=levelBox5&selectPart=levelBox4&&brandN='
								+ brandSelectedName + '&serieN=' + serieSelectName;
					
					scriptFile.setAttribute('src', src);
					var op = document.createElement('option');
					op.value="x";
					op.innerHTML="Select an option";
//					document.getElementById('levelBox4').appendChild(op);
					
					var op = document.createElement('option');
					op.value="x";
					op.innerHTML="Select an option";
//					document.getElementById('levelBox5').appendChild(op);
					
					document.getElementsByTagName("head")[0].appendChild(scriptFile);
				}

				function goSearchFast() {
					if (! processLevel(5)) { 
				    	if (! processLevel(4)) { 
				        	if (! processLevel(3)) { 
				            	if (! processLevel(2)) {
				                	alert("You must set more steps");
				                 }
							}
						}
					}
				}
				function processLevel(level) {
					if (document.getElementById("levelBox" + level).selectedIndex > 0) {
				    	var categoryId = document.getElementById("levelBox" + level).value;
						if (categoryId.indexOf('-') != -1) { 
							categoryId = categoryId.substring(categoryId.indexOf('-')+1, categoryId.length);
						}
				        document.location = "http://shopping.netsuite.com/s.nl/c.838480/n.2/sc.15/category."+categoryId+"/.f";
				        return true;
					}
					return false;
				}
				function loadEnd() {
					document.getElementById("model").options[0].text = "Choose a Model";
					document.getElementById("partnumber").options[0].text = "Choose a Part Number";
				}

				//------------------ --------------------
				if (document.URL.indexOf('https') != -1) {
					document.getElementById("findItFastDiv").style.display = 'none';
				}
		// JavaScript Document