var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1001", "Komplett_20PCs", "/pi1/index.html", 1, "", 1, "");
addItem("1002", "AMD_20Systeme", "/pi1/pi14/index.html", 2, "", 1, "");
addItem("1009", "Intel_20Systeme", "/pi1/pi15/index.html", 2, "", 1, "");
addItem("10016", "MicroATX_20Systeme", "/pi1/pi16/index.html", 2, "", 1, "");
addItem("10044", "ATX_X2Geh_C3_A4use_20_X7_20Zubeh_C3_B6r", "/pi44/index.html", 1, "", 1, "");
addItem("10069", "Netzteile", "/pi44/pi69/index.html", 2, "", 1, "");
addItem("10070", "L_C3_BCfter", "/pi44/pi70/index.html", 2, "", 1, "");
addItem("10010", "Notebooks_20_X7_20Zubeh_C3_B6r", "/pi2/index.html", 1, "", 1, "");
addItem("1006", "Notebook_20Zubeh_C3_B6r", "/pi2/pi17/index.html", 2, "", 1, "");
addItem("10017", "CPUs_20AMD", "/pi3/index.html", 1, "", 1, "");
addItem("1007", "Sockel_20AM2_X4AM2_X1", "/pi3/pi18/index.html", 2, "", 1, "");
addItem("10014", "Sockel_20AM3_X4AM2_X1", "/pi3/pi20/index.html", 2, "", 1, "");
addItem("10018", "Sockel_20939", "/pi3/pi19/index.html", 2, "", 1, "");
addItem("10019", "CPUs_20Intel", "/pi13/index.html", 1, "", 1, "");
addItem("10015", "Sockel_20775", "/pi13/pi28/index.html", 2, "", 1, "");
addItem("1008", "Sockel_201156", "/pi13/pi27/index.html", 2, "", 1, "");
addItem("10034", "CPU_20K_C3_BChler", "/pi34/index.html", 1, "", 1, "");
addItem("10020", "Speicher_20_X4_20RAM", "/pi4/index.html", 1, "", 1, "");
addItem("10029", "DDR", "/pi4/pi29/index.html", 2, "", 1, "");
addItem("10030", "DDR2", "/pi4/pi30/index.html", 2, "", 1, "");
addItem("10072", "DDR3", "/pi4/pi72/index.html", 2, "", 1, "");
addItem("10031", "S0_X2Dimm_20(Notebooks)", "/pi4/pi31/index.html", 2, "", 1, "");
addItem("10022", "Festplatten", "/pi6/index.html", 1, "", 1, "");
addItem("10036", "SATA2", "/pi6/pi36/index.html", 2, "", 1, "");
addItem("10037", "IDE", "/pi6/pi37/index.html", 2, "", 1, "");
addItem("10035", "Externe_20USB_20Festplatten", "/pi6/pi35/index.html", 2, "", 1, "");
addItem("10021", "Grafikkarten", "/pi5/index.html", 1, "", 1, "");
addItem("10032", "PCI_X2Express", "/pi5/pi32/index.html", 2, "", 1, "");
addItem("10033", "AGP", "/pi5/pi33/index.html", 2, "", 1, "");
addItem("10023", "Mainboards", "/pi7/index.html", 1, "", 1, "");
addItem("1003", "AMD", "/pi7/pi21/index.html", 2, "", 1, "");
addItem("10012", "Sockel_20AM2_X4AM2_X1", "/pi7/pi21/pi23/index.html", 3, "", 1, "");
addItem("10038", "Sockel_20AM3", "/pi7/pi21/pi38/index.html", 3, "", 1, "");
addItem("1004", "Sockel_20939", "/pi7/pi21/pi22/index.html", 3, "", 1, "");
addItem("10039", "Sockel_20A", "/pi7/pi21/pi39/index.html", 3, "", 1, "");
addItem("10011", "Intel", "/pi7/pi24/index.html", 2, "", 1, "");
addItem("1005", "Sockel_20775", "/pi7/pi24/pi25/index.html", 3, "", 1, "");
addItem("10013", "Sockel_201366", "/pi7/pi24/pi26/index.html", 3, "", 1, "");
addItem("10040", "Sockel_201156", "/pi7/pi24/pi40/index.html", 3, "", 1, "");
addItem("10025", "Optische_20Laufwerke", "/pi9/index.html", 1, "", 1, "");
addItem("10042", "SATA2", "/pi9/pi42/index.html", 2, "", 1, "");
addItem("10041", "IDE", "/pi9/pi41/index.html", 2, "", 1, "");
addItem("10068", "USB_20Sticks_20_X4_20SD_X2Cards", "/pi68/index.html", 1, "", 1, "");
addItem("10024", "TFTs", "/pi8/index.html", 1, "", 1, "");
addItem("10026", "Netzwerk_20Produkte", "/pi10/index.html", 1, "", 1, "");
addItem("10027", "Eingabeger_C3_A4te", "/pi11/index.html", 1, "", 1, "");
addItem("10028", "Drucker", "/pi12/index.html", 1, "", 1, "");
addItem("10043", "Multimedia", "/pi43/index.html", 1, "", 1, "");
addItem("10045", "Software", "/pi45/index.html", 1, "", 1, "");
addItem("10046", "Microsoft", "/pi45/pi46/index.html", 2, "", 1, "");
addItem("10051", "Office", "/pi45/pi46/pi51/index.html", 3, "", 1, "");
addItem("10048", "Windows_20XP", "/pi45/pi46/pi48/index.html", 3, "", 1, "");
addItem("10049", "Windows_20Vista", "/pi45/pi46/pi49/index.html", 3, "", 1, "");
addItem("10050", "Windows_207", "/pi45/pi46/pi50/index.html", 3, "", 1, "");
addItem("10047", "Symantec", "/pi45/pi47/index.html", 2, "", 1, "");
addItem("10052", "Diverse_20Kabel", "/pi52/index.html", 1, "", 1, "");
addItem("10053", "Netzwerkkabel", "/pi52/pi53/index.html", 2, "", 1, "");
addItem("10054", "IDE_X4SATA_X4Floppy", "/pi52/pi54/index.html", 2, "", 1, "");
addItem("10055", "Firewire_X4HDMI_X4VGA", "/pi52/pi55/index.html", 2, "", 1, "");
addItem("10056", "USB_X2Kabel", "/pi52/pi56/index.html", 2, "", 1, "");
addItem("10057", "CD_X4DVD_20Rohlinge", "/pi57/index.html", 1, "", 1, "");
addItem("10058", "Tintenpatronen", "/pi58/index.html", 1, "", 1, "");
addItem("10062", "Canon", "/pi58/pi62/index.html", 2, "", 1, "");
addItem("10065", "ohne_20Chip", "/pi58/pi62/pi65/index.html", 3, "", 1, "");
addItem("10066", "mit_20Chip", "/pi58/pi62/pi66/index.html", 3, "", 1, "");
addItem("10067", "HP", "/pi58/pi67/index.html", 2, "", 1, "");
addItem("10063", "Lexmark", "/pi58/pi63/index.html", 2, "", 1, "");
addItem("10064", "Epson_X4Brother", "/pi58/pi64/index.html", 2, "", 1, "");
addItem("10059", "Diverses_20Zubeh_C3_B6r", "/pi59/index.html", 1, "", 1, "");
addItem("10060", "KVM", "/pi59/pi60/index.html", 2, "", 1, "");
addItem("10061", "Controller_20Karten", "/pi59/pi61/index.html", 2, "", 1, "");
addItem("10071", "gebrauchtes", "/pi71/index.html", 1, "", 1, "");
};

var m_sSelectedOptionValue = '0';
function printCatnavDropdown(){
	document.write('<select id="catdropdown" style="width:100%"></select>');
	SMShop.base.addMember("CatnavDropdown");
};

function CatnavDropdown_windowOnLoad(args){
	var oItems = g_oPopupMenu.selectItems(0, true);
	var selCatDropDown = $('catdropdown'),oOption = null, sDepth = '';

	if(m_sSelectedOptionValue == '0'){
		oOption = selCatDropDown[selCatDropDown.length] = new Option();
		with(oOption){
			selected='selected';
			text='<Warengruppen>';
			value = '0';
		}
	};

	oItems.each(function(oItem) {
		sDepth = ''; for(var i=1;i<parseInt(oItem.depth);i++) sDepth += '-';
		oOption = selCatDropDown[selCatDropDown.length] = new Option();
		with(oOption){
			if(oItem.id == m_sSelectedOptionValue) selected = 'selected';
			text = sDepth + ' ' + oItem.caption;
			value = oItem.id;
		}}
	);

	selCatDropDown.onchange = function(){
		var oItem = g_oPopupMenu.selectSingleItem(this.value);
		
		location.href = SMOMAbsoluteRootURL + oItem.url;
		
	};
};