var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("100226", "Restposten_20(191)", "/restposten/index.html", 1, "", 1, "");
addItem("1006", "Dessous", "/dessous/index.html", 1, "", 1, "");
addItem("10084", "Dessous_20Neuheiten_20(183)", "/dessous/neu/index.html", 2, "", 1, "");
addItem("10037", "Anais_20Lingerie_20(68)", "/dessous/anais-lingerie/index.html", 2, "", 1, "");
addItem("10038", "Beauty_20Night_20Fashion_20(67)", "/dessous/beauty-night/index.html", 2, "", 1, "");
addItem("10039", "LivCo_20Fashion_20Corsetti_20(102)", "/dessous/livia-fashion-corsetti/index.html", 2, "", 1, "");
addItem("10040", "Passion_20(73)", "/dessous/passion/index.html", 2, "", 1, "");
addItem("10041", "Obsessive_20(79)", "/dessous/obsessive/index.html", 2, "", 1, "");
addItem("10024", "Edel_20dessous_20ROZA_20(18)", "/dessous/edel-dessous-roza/index.html", 2, "", 1, "");
addItem("100363", "Red_20Corner_20(72)", "/dessous/red-corner/index.html", 2, "", 1, "");
addItem("10042", "Konrad_20dessous_20(35)", "/dessous/konrad-dessous/index.html", 2, "", 1, "");
addItem("10044", "Sensualle_20(10)", "/dessous/sensualle/index.html", 2, "", 1, "");
addItem("10046", "Leg_20Avenue_20(27)", "/dessous/leg-avenue/index.html", 2, "", 1, "");
addItem("10047", "Gracya_20dessous_20(49)", "/dessous/gracya-dessous/index.html", 2, "", 1, "");
addItem("10048", "Chilirose_20(54)", "/dessous/chilirose/index.html", 2, "", 1, "");
addItem("10064", "Provocative_20(31)", "/dessous/provocative/index.html", 2, "", 1, "");
addItem("10082", "Electric_20Lingerie_20(8)", "/dessous/electric-lingerie/index2.html", 2, "", 1, "");
addItem("10083", "Veneziana_20(15)", "/dessous/veneziana/index.html", 2, "", 1, "");
addItem("1001", "Dessous_20Sets_20(377)", "/parking/dessous/dessous-sets/index.html", 2, "", 1, "");
addItem("1002", "Corsagen_20(224)", "/parking/dessous/corsagen/index.html", 2, "", 1, "");
addItem("1003", "Negligees_20(225)", "/parking/dessous/negligees/index.html", 2, "", 1, "");
addItem("1004", "Straps_20Sets_20(159)", "/parking/dessous/straps-sets/index.html", 2, "", 1, "");
addItem("1005", "Catsuits_20(79)", "/parking/dessous/catsuits/index.html", 2, "", 1, "");
addItem("1007", "Babydolls_20(117)", "/dessous/babydolls/index.html", 2, "", 1, "");
addItem("1008", "Bodys_20(67)", "/parking/dessous/bodys/index.html", 2, "", 1, "");
addItem("1009", "Strings_20und_20Slips_20(185)", "/parking/dessous/strings-und-slips/index.html", 2, "", 1, "");
addItem("10010", "BH_20s_20(38)", "/parking/dessous/bh-s/index.html", 2, "", 1, "");
addItem("10011", "Strapse_20(152)", "/parking/dessous/strapse/index.html", 2, "", 1, "");
addItem("10022", "Slips_20_X1_20Strings_20F_C3_BCr_20Ihn_20(259)", "/parking/dessous/fuer-ihn/index.html", 2, "", 1, "");
addItem("100361", "Boxer_20f_C3_BCr_20Ihn_20(206)", "/dessous/boxer-fuer-ihn/index.html", 2, "", 1, "");
addItem("100360", "Shirts_20f_C3_BCr_20Ihn_20(97)", "/dessous/shirts-fuer-ihn/index.html", 2, "", 1, "");
addItem("100103", "Accessoires_20(39)", "/dessous/accessoires/index.html", 2, "", 1, "");
addItem("10012", "Kost_C3_BCme_20(133)", "/kostueme/index.html", 1, "", 1, "");
addItem("10013", "Bikinis_20(42)", "/bikinis/index.html", 1, "", 1, "");
addItem("10015", "Partymode_20(200)", "/partymode/index.html", 1, "", 1, "");
addItem("100376", "Partymode_20f_C3_BCr_20Ihn_20(30)", "/partymode-fuer-ihn/index.html", 1, "", 1, "");
addItem("10016", "Abendkleider_20(52)", "/abendkleider/index.html", 1, "", 1, "");
addItem("10017", "Schmuck_20(29)", "/schmuck/index.html", 1, "", 1, "");
addItem("10019", "Sex_20Toys", "/sex-toys/index.html", 1, "", 1, "");
addItem("10020", "Vibratoren_20(369)", "/parking/sex-toys/vibratoren-und-dildos/index.html", 2, "", 1, "");
addItem("10023", "Dildos_20(78)", "/parking/sex-toys/dildos/index.html", 2, "", 1, "");
addItem("10025", "Toy_20Pakete_20(26)", "/parking/sex-toys/toy-pakete/index.html", 2, "", 1, "");
addItem("10027", "Liebeskugeln_20(62)", "/parking/sex-toys/liebeskugeln/index.html", 2, "", 1, "");
addItem("100352", "Anal_20(111)", "/sex-toys/anal/index.html", 2, "", 1, "");
addItem("10026", "Sex_20Spiele_20(42)", "/parking/sex-toys/sex-spiele/index.html", 2, "", 1, "");
addItem("10085", "Ringe_20und_20H_C3_BCllen_20(160)", "/sex-toys/ringe-und-huellen/index.html", 2, "", 1, "");
addItem("10021", "Sonstiges_20(115)", "/parking/sex-toys/sonstiges/index.html", 2, "", 1, "");
addItem("100353", "Manschetten_20(6)", "/sex-toys/manschetten/index.html", 2, "", 1, "");
addItem("100354", "Pumpen_20(43)", "/sex-toys/pumpen/index.html", 2, "", 1, "");
addItem("100355", "Bondage_20(19)", "/sex-toys/bondage/index.html", 2, "", 1, "");
addItem("100357", "Vibro_X2Eier_20(17)", "/sex-toys/vibro-eier/index.html", 2, "", 1, "");
addItem("100364", "Tenga_20(23)", "/sex-toys/tenga/index.html", 2, "", 1, "");
addItem("100377", "Liebespuppen_20(40)", "/sex-toys/liebespuppen/index.html", 2, "", 1, "");
addItem("100378", "Vaginas_20(62)", "/sex-toys/vaginas/index.html", 2, "", 1, "");
addItem("100380", "Ketten_20und_20mehr_20(18)", "/sex-toys/ketten-und-mehr/index.html", 2, "", 1, "");
addItem("100381", "Elektro_20Sex_20(4)", "/sex-toys/elektro-sex/index.html", 2, "", 1, "");
addItem("100382", "Sextreme_20(5)", "/sex-toys/sextreme/index.html", 2, "", 1, "");
addItem("100383", "Bad_20Kitty_20(3)", "/sex-toys/bad-kitty/index.html", 2, "", 1, "");
addItem("10045", "Gothic_20und_20Punk_20Style_20(16)", "/gothic-style/index.html", 1, "", 1, "");
addItem("10049", "Oktoberfest_20(6)", "/oktoberfest/index.html", 1, "", 1, "");
addItem("10050", "Halloween_20(17)", "/halloween/index.html", 1, "", 1, "");
addItem("100356", "Fun_20_X7_20Party_20(80)", "/fun-party/index.html", 1, "", 1, "");
addItem("100358", "Party_20Gags_20(47)", "/party-gags/index.html", 1, "", 1, "");
addItem("100359", "High_20Heels_20(181)", "/high-heels2/index.html", 1, "", 1, "");
addItem("100362", "Kondome_20(105)", "/kondome/index.html", 1, "", 1, "");
addItem("100365", "Fetish_20Collection", "/fetisch-collection/index.html", 1, "", 1, "");
addItem("100366", "Accessoires_20(62)", "/fetisch-collection/accessoires/index.html", 2, "", 1, "");
addItem("100367", "Lack_20f_C3_BCr_20Sie_20(255)", "/fetisch-collection/lack-fuer-sie/index.html", 2, "", 1, "");
addItem("100368", "Leder_20f_C3_BCr_20Sie_20(4)", "/fetisch-collection/leder-fuer-sie/index.html", 2, "", 1, "");
addItem("100369", "Peitschen_20(20)", "/fetisch-collection/peitschen/index.html", 2, "", 1, "");
addItem("100370", "Fesseln_20(16)", "/fetisch-collection/fesseln/index.html", 2, "", 1, "");
addItem("100371", "Zado_20f_C3_BCr_20Ihn_20(38)", "/fetisch-collection/zado-fuer-ihn/index.html", 2, "", 1, "");
addItem("100372", "Zado_20f_C3_BCr_20Sie_20(124)", "/fetisch-collection/zado-fuer-sie/index.html", 2, "", 1, "");
addItem("100373", "Zado_20Masken_20und_20mehr_20(13)", "/fetisch-collection/zado-masken-und-mehr/index.html", 2, "", 1, "");
addItem("100374", "Latex_20(252)", "/fetisch-collection/latex/index.html", 2, "", 1, "");
addItem("100375", "Black_20Level_20f_C3_BCr_20Ihn_20(105)", "/fetisch-collection/black-level-fuer-ihn/index.html", 2, "", 1, "");
addItem("100379", "Close2you_20(13)", "/close2you/index.html", 1, "", 1, "");
addItem("100384", "Drogerie", "/drogerie/index.html", 1, "", 1, "");
addItem("100385", "Top_20Seller_20(13)", "/drogerie/top-seller/index.html", 2, "", 1, "");
addItem("100386", "Pr_C3_A4parate_20(27)", "/drogerie/praeparate/index.html", 2, "", 1, "");
addItem("100387", "Pflegemittel_20(16)", "/drogerie/pflegemittel/index.html", 2, "", 1, "");
addItem("100388", "Gleitmittel_20(136)", "/drogerie/gleitmittel/index.html", 2, "", 1, "");
addItem("100389", "Sonstiges_20(42)", "/drogerie/sonstiges/index.html", 2, "", 1, "");
addItem("100390", "Massage_20_C3_96le_20(34)", "/drogerie/massage-oele/index.html", 2, "", 1, "");
addItem("100391", "pjur_20(23)", "/drogerie/pjur/index.html", 2, "", 1, "");
addItem("100392", "Magoon_20(31)", "/drogerie/magoon/index.html", 2, "", 1, "");
addItem("100393", "P6_20(9)", "/drogerie/p6/index.html", 2, "", 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;
		
	};
};