
function fillCategory(){ 
 // this function is used to fill the category list on load
addOption(document.drop_list.Category, "Digital Cameras", "Digital Cameras", "");
addOption(document.drop_list.Category, "Printers", "Printers", "");
addOption(document.drop_list.Category, "Digital Video Cameras", "Digital Video Cameras", "");
}

function SelectSubCat(){
// ON selection of category this function will work

removeAllOptions(document.drop_list.SubCat);
removeAllOptions(document.drop_list.SubCat2);
//addOption(document.drop_list.SubCat, "", "Select Product Category", "");

if(document.drop_list.Category.value == 'Digital Cameras'){
addOption(document.drop_list.SubCat, "", "Select Product Category", "");
addOption(document.drop_list.SubCat,"EasyShare One", "EASYSHARE-ONE");
addOption(document.drop_list.SubCat,"C Cameras", "C Cameras");
addOption(document.drop_list.SubCat,"CX Cameras", "CX Cameras");
addOption(document.drop_list.SubCat,"DX Cameras", "DX Cameras");
addOption(document.drop_list.SubCat,"LS Cameras", "LS Cameras");
addOption(document.drop_list.SubCat,"M Cameras", "M Cameras");
addOption(document.drop_list.SubCat,"P Cameras", "P Cameras");
addOption(document.drop_list.SubCat,"V Cameras", "V Cameras");
addOption(document.drop_list.SubCat,"Z Cameras", "Z Cameras");
}
if(document.drop_list.Category.value == 'Printers'){
addOption(document.drop_list.SubCat, "", "Select Product Category", "");
addOption(document.drop_list.SubCat,"All-in-One Printers", "All-in-One Printers");
addOption(document.drop_list.SubCat,"Printer Docks", "Printer Docks");
}
if(document.drop_list.Category.value == 'Digital Video Cameras'){
addOption(document.drop_list.SubCat, "", "Select Product Category", "");
addOption(document.drop_list.SubCat,"Z-Series", "Z-Series");
}

if(document.drop_list.Category.value == 'Digital Frames'){
addOption(document.drop_list.SubCat, "", "Select Product Category", "");
addOption(document.drop_list.SubCat,"W-Series", "W-Series");
}

}
////////////////// 
function SelectSubCat2(){
// ON selection of category this function will work

removeAllOptions(document.drop_list.SubCat2);
addOption(document.drop_list.SubCat2, "", "Select A Product", "");

if(document.drop_list.SubCat.value == 'C Cameras'){
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/c875/index.jhtml", "C875");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/c763/index.jhtml", "C763");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/c743/index.jhtml", "C743");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/c663/index.jhtml", "C663");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/c653/index.jhtml", "C653");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/c643/index.jhtml", "C643");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/c613/index.jhtml", "C613");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/c533/index.jhtml", "C533");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/c433/index.jhtml", "C433");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/c360/index.jhtml", "C360");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/c340/index.jhtml", "C340");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/c330/index.jhtml", "C330");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/c300/index.jhtml", "C300");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/c195/index.jhtml", "C195");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/c190/index.jhtml", "C190");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/c183/index.jhtml", "C183");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/c182/index.jhtml", "C182");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/c143/index.jhtml", "C143");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/c142/index.jhtml", "C142");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/c122/index.jhtml", "C122");
}

if(document.drop_list.SubCat.value == 'CX Cameras'){
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/cx7530/index.jhtml", "CX7530");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/cx7430/index.jhtml", "CX7430");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/cx7330/index.jhtml", "CX7330");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/cx7300/index.jhtml", "CX7300");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/cx7220/index.jhtml", "CX7220");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/cx6330/index.jhtml", "CX6330");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/cx6230/index.jhtml", "CX6230");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/cx6200/index.jhtml", "CX6200");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/cx4230/index.jhtml", "CX4230");
}
if(document.drop_list.SubCat.value == 'DX Cameras'){
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/dx7630/index.jhtml", "DX7630");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/dx7590/index.jhtml", "DX7590");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/dx7440/index.jhtml", "DX7440");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/dx6490/index.jhtml", "DX6490");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/dx6440/index.jhtml", "DX6440");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/dx6340/index.jhtml", "DX6340");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/dx4530/index.jhtml", "DX4530");
}

if(document.drop_list.SubCat.value == 'LS Cameras'){
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/ls753/index.jhtml", "LS753");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/ls743/index.jhtml", "LS743");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/ls633/index.jhtml", "LS633");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/ls443Features/index.jhtml", "LS443");
}
if(document.drop_list.SubCat.value == 'M Cameras'){
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/m1073/index.jhtml", "M1073 IS");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/m1063/index.jhtml", "M1063");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/m1033/index.jhtml", "M1033");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/m893/index.jhtml", "M893 IS");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/m883/index.jhtml", "M883");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/m873/index.jhtml", "M873");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/m863/index.jhtml", "M863");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/m853/index.jhtml", "M853");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/m763/index.jhtml", "M763");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/m753/index.jhtml", "M753");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/m580/index.jhtml", "M580");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/m575/index.jhtml", "M575");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/m550/index.jhtml", "M550");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/m530/index.jhtml", "M530");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/m381/index.jhtml", "M381");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/m341/index.jhtml", "M341");

}
if(document.drop_list.SubCat.value == 'P Cameras'){
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/p880/index.jhtml", "P880");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/p850/index.jhtml", "P850");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/p712/index.jhtml", "P712");
}
if(document.drop_list.SubCat.value == 'EasyShare One'){
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/easyshareOne/index.jhtml", "EASYSHARE-ONE");
}
if(document.drop_list.SubCat.value == 'V Cameras'){
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/v1273/index.jhtml", "V1273");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/v1253/index.jhtml", "V1253");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/v1233/index.jhtml", "V1233");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/v1073/index.jhtml", "V1073");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/v1003/index.jhtml", "V1003");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/v803/index.jhtml", "V803");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/v705/index.jhtml", "V705");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/v610/index.jhtml", "V610");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/v603/index.jhtml", "V603");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/v570/index.jhtml", "V570");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/v550/index.jhtml", "V550");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/v530/index.jhtml", "V530");
}
if(document.drop_list.SubCat.value == 'Z Cameras'){
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/z8612/index.jhtml", "Z8612 IS");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/z7590/index.jhtml", "Z7590");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/z1285/index.jhtml", "Z1285");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/z1275/index.jhtml", "Z1275");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/z1085/index.jhtml", "Z1085 IS");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/z1015/index.jhtml", "Z1015 IS");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/z1012/index.jhtml", "Z1012 IS");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/zd710/index.jhtml", "ZD710");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/z981/index.jhtml", "Z981");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/z885/index.jhtml", "Z885");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/z760/index.jhtml", "Z760");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/z740/index.jhtml", "Z740");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/z730/index.jhtml", "Z730");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/z712/index.jhtml", "Z712");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/z710/index.jhtml", "Z710");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/z700/index.jhtml", "Z700");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/z650/index.jhtml", "Z650");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/z612/index.jhtml", "Z612");
}

if(document.drop_list.SubCat.value == 'W-Series'){
removeAllOptions(document.drop_list.SubCat2);
addOption(document.drop_list.SubCat2, "", "Select A Topic", "");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/frames/index.jhtml", "Wireless Digital Frame Setup");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/wirelessframes/index.jhtml", "Using Your Wireless Digital Frame");
}
if(document.drop_list.SubCat.value == 'Printer Docks'){
removeAllOptions(document.drop_list.SubCat2);
addOption(document.drop_list.SubCat2, "", "Select A Topic", "");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/printers/g600/loadCartridge/index.jhtml", "Loading the Cartridge");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/printers/g600/cartridgeJam/index.jhtml", "Clearing a Cartridge Jam");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/printers/g600/loadPaper/index.jhtml", "Loading Paper");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/printers/g600/paperJam/index.jhtml", "Clearing a Paper Jam");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/printers/g600/stuckCartridge/index.jhtml", "Removing a Stuck Cartridge (G600)");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/printers/g610/stuckCartridge/index.jhtml", "Removing a Stuck Cartridge (G610)");
}
if(document.drop_list.SubCat.value == 'Z-Series'){
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/zi6/index.jhtml", "Zi6");
}
if(document.drop_list.SubCat.value == 'All-in-One Printers'){
removeAllOptions(document.drop_list.SubCat2);
addOption(document.drop_list.SubCat2, "", "Select A Topic", "");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/AiOPrinters/ESP/c310/index.html", "ESP C110/C310/C315 Installation");addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/AiOPrinters/ESP/AiOVideos/ESP9250/index.html", "ESP 9250 Installation");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/AiOPrinters/ESP/AiOVideos/ESP6150/index.jhtml", "ESP 6150 Installation");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/AiOPrinters/ESP/AiOVideos/ESP7250/index.jhtml", "ESP 7250 Installation");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/AiOPrinters/ESP/AiOVideos/ESP3/esp3_HowTo_Menu.html", "ESP 3 Installation");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/AiOPrinters/ESP/AiOVideos/ESP_5/esp5_HowTo_Menu.html", "ESP 5 Installation");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/AiOPrinters/ESP/AiOVideos/ESP_7/esp7_HowTo_Menu.html", "ESP 7 Installation");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/AiOPrinters/ESP/AiOVideos/ESP_9/esp9_HowTo_Menu.html", "ESP 9 Installation");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/AiOPrinters/ESP/AiOVideos/ESP3200/esp3200_HowTo_Menu.html", "ESP 3250 Installation");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/AiOPrinters/ESP/AiOVideos/ESP5200/esp5200_HowTo_Menu.html", "ESP 5200 Series Installation");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/AiOPrinters/ESP/ENG_KHC_MAIN_v22.htm", "Home Center Software Demo");
addOption(document.drop_list.SubCat2,"/global/en/service/tutorials/AiOPrinters/ESP/wireless/index.jhtml", "Setting Up Your Wireless ESP 7 or 9 Printer");
}


}

function removeAllOptions(selectbox)
{
	var i;
	for(i=selectbox.options.length-1;i>=0;i--)
	{
		//selectbox.options.remove(i);
		selectbox.remove(i);
	}
}


function addOption(selectbox, value, text )
{
	var optn = document.createElement("OPTION");
	optn.text = text;
	optn.value = value;

	selectbox.options.add(optn);

}

function launchTutorial(selectedDemo)
{
if (document.drop_list.SubCat.value == "All-in-One Printers"){
    newLocation = document.drop_list.SubCat2.value;
	window.open(newLocation, 'Tutorials', 'width=770,height=590,toolbar=no,scrollbars=yes');
	}
else{
	newLocation = document.drop_list.SubCat2.value;
	window.open(newLocation, 'Tutorials', 'width=668,height=574,toolbar=no,scrollbars=yes,resizeable=no');
}
}
