var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("10043", "ACCESSOIRES", "/accessoires/index.html", 1, "ico093.gif", 1, "");
addItem("10079", "AFFINAGE_20HAARFARBEN", "/accessoires/affinage-stargazer/index.html", 2, "", 1, "");
addItem("100123", "ARMSTULPEN", "/accessoires/armstulpen/index.html", 2, "", 1, "");
addItem("10086", "AUFBUEGLER_X4PATCHES", "/accessoires/aufbueglerpatches/index.html", 2, "", 1, "");
addItem("100130", "BAD_20_X7_20WC", "/accessoires/badematten/index.html", 2, "", 1, "");
addItem("1008", "BETT_20_X7_20DEKO", "/accessoires/bettwaesche/index.html", 2, "", 1, "");
addItem("100114", "GUERTEL_X4GUERTELSCHNALLEN", "/accessoires/guertel-guertelschnallen/index.html", 2, "", 1, "");
addItem("10070", "NIETENGUERTEL", "/accessoires/spikes-nieten/index.html", 2, "", 1, "");
addItem("100121", "NIGHTMARE_20BEFORE_20CHRISTMAS", "/accessoires/nightmare-before-christmas/index.html", 2, "", 1, "");
addItem("10025", "TASCHEN_X4BAGS", "/accessoires/bags/index.html", 2, "", 1, "");
addItem("100104", "UV_20GUERTEL_X4ARMBAENDER", "/accessoires/uv-guertel-armbaender/index.html", 2, "", 1, "");
addItem("100109", "FOOTWEAR_X4SCHUHE", "/shoesschuhe/index.html", 1, "ico093.gif", 1, "");
addItem("1002", "BORAS", "/shoesschuhe/boras/index.html", 2, "", 1, "");
addItem("10055", "MAD_20FISH", "/shoesschuhe/mad-fish/index.html", 2, "", 1, "");
addItem("10045", "GUTSCHEIN", "/geschenkgutscheine/index.html", 1, "ico093.gif", 1, "");
addItem("100147", "KIDS", "/kids-kinder/index.html", 1, "ico093.gif", 1, "");
addItem("1001", "NEW", "/new/index.html", 1, "ico093.gif", 1, "");
addItem("10024", "ACCESSOIRES", "/new/netz-armstulpen/index.html", 2, "", 1, "");
addItem("10064", "MEN", "/men/index.html", 1, "", 1, "");
addItem("10046", "HOSEN_X4TROUSERS", "/men/hosen-trousers-clubwear-streetwear/index.html", 2, "", 1, "");
addItem("1005", "CRIMINAL_20DAMAGE", "/men/hosen-trousers-clubwear-streetwear/criminal-damage/index.html", 3, "", 1, "");
addItem("100143", "DEAD_20THREADS", "/men/hosen-trousers-clubwear-streetwear/dead-threads-bondage-hosen/index.html", 3, "", 1, "");
addItem("100136", "LIVING_20DEAD_20SOULS", "/men/hosen-trousers-clubwear-streetwear/living-dead-souls/index.html", 3, "", 1, "");
addItem("10099", "JACKEN_X4ZIP_20HOODIES", "/men/jacken/index.html", 2, "", 1, "");
addItem("10075", "T_X2SHIRTS_20_X1_20LONGSLEEVES", "/men/t-shirt/index.html", 2, "", 1, "");
addItem("100146", "AEROSOL_20_X1_20IRON_20FIST", "/men/t-shirt/iron-fist/index.html", 3, "", 1, "");
addItem("100134", "CYBERDOG", "/men/t-shirt/cyberdog/index.html", 3, "", 1, "");
addItem("10016", "SKULL_20_X1_20TRIBAL", "/men/t-shirt/skull-tribal-tattoo/index.html", 3, "", 1, "");
addItem("10078", "SPECIAL_20OFFER", "/men/t-shirt/godly/index.html", 3, "", 1, "");
addItem("100142", "TATTOO", "/men/t-shirt/tattoo/index.html", 3, "", 1, "");
addItem("100145", "TECHNO_20HARDSTYLE", "/men/techno-hardstyle-t-shirts/index.html", 2, "", 1, "");
addItem("100112", "UNDERWEAR", "/men/underwear/index.html", 2, "", 1, "");
addItem("10096", "UNISEX", "/bondage-schlag-hosen/index.html", 1, "ico093.gif", 1, "");
addItem("10076", "WOMEN", "/women/index.html", 1, "ico093.gif", 1, "");
addItem("100100", "JACKEN", "/women/jacken/index.html", 2, "", 1, "");
addItem("10092", "R_C3_96CKE_20_X4_20SKIRTS", "/women/roecke-skirts/index.html", 2, "", 1, "");
addItem("10012", "R_C3_96HRENJEANS", "/women/roehrenjeans/index.html", 2, "", 1, "");
addItem("100115", "SCHLAGHOSEN", "/women/schlaghosen/index.html", 2, "", 1, "");
addItem("10026", "TECHNO_20CLUBWEAR", "/women/battery-organic/index.html", 2, "", 1, "");
addItem("10053", "SPACE_20TRIBE", "/women/battery-organic/space-tribe/index.html", 3, "", 1, "");
addItem("100141", "CYBERDOG", "/women/battery-organic/cyberdog/index.html", 3, "", 1, "");
addItem("10063", "T_X2SHIRTS_20_X1_20TOPS", "/women/longsleeve-t-shirts-tops/index.html", 2, "", 1, "");
addItem("10085", "VIVE_20MARIA_20_X1_20PUSSY_20DELUXE", "/women/vive-maria-pussy-deluxe-fashion/index.html", 2, "", 1, "");
addItem("10058", "T_X2SHIRTS_20_X1_20TOPS", "/women/vive-maria-pussy-deluxe-fashion/t-shirts-tops/index.html", 3, "", 1, "");
addItem("10090", "PANTIES", "/women/vive-maria-pussy-deluxe-fashion/panties-hipster-slips/index.html", 3, "", 1, "");
addItem("10015", "SETS", "/women/vive-maria-pussy-deluxe-fashion/sets/index.html", 3, "", 1, "");
addItem("10034", "SPECIAL_20OFFER_X4ANGEBOTE", "/women/vive-maria-pussy-deluxe-fashion/special-offer/index.html", 3, "", 1, "");
addItem("100118", "WOMEN_X2UNDERGROUND", "/underground-style/index.html", 1, "ico093.gif", 1, "");
addItem("10087", "BONDAGE_20HOSEN", "/underground-style/bondagehose-bondage/index.html", 2, "", 1, "");
addItem("100140", "CORSAGEN", "/underground-style/corsagen/index.html", 2, "", 1, "");
addItem("100131", "R_C3_96HRENHOSEN", "/underground-style/roehren-hosen-jeans/index.html", 2, "", 1, "");
addItem("10029", "HELL_20BUNNY_20_X1_20MERCY", "/underground-style/hell-bunny-mercy/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;
		
	};
};