var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1001", "Inicio", "/http://iontophoresis-device.com/point/?r=8", 1, "", 1, "");
addItem("1004", "Iontoforesis", "/informacion/iontoforesis.html", 1, "", 1, "");
addItem("1003", "Idromed_20DC_X2Pulso", "/iontoforesis/contra-sudoracion/index.html", 2, "", 1, "");
addItem("1006", "Idromed_20DC", "/iontoforesis/contra-sudor/index.html", 2, "", 1, "");
addItem("1007", "FAQ", "/informacion/index.html", 1, "", 1, "");
addItem("1002", "Impuestos_20y_20tasas_20al_20cliente_X3", "/informacion/custom-dutys-fees/index.html", 2, "", 1, "");
addItem("1005", "Entrega", "/informacion/entrega/index.html", 2, "", 1, "");
addItem("1008", "Env_C3_ADo_20diferenciado", "/informacion/envo-diferenciado/index.html", 2, "", 1, "");
addItem("1009", "Garant_C3_ADa", "/informacion/garantia/index.html", 2, "", 1, "");
addItem("10011", "Reembolso", "/informacion/reembolso/index.html", 2, "", 1, "");
addItem("10013", "Tratamiento_20con_20Iontoforesis", "/iontoforesis/iontoforesis.html", 2, "", 1, "");
addItem("10014", "Plazos_20de_20entrega", "/informacion/plazos-de-entrega/index.html", 2, "", 1, "");
addItem("10016", "Tasas_20de_20_C3_A9xito", "/informacion/tasas-de-exito/index.html", 2, "", 1, "");
addItem("10017", "_C2_BFCual_20es_20el_20mejor_20dispositivo_20para_20un_20resultado_20_C3_B3ptimo?", "/iontoforesis/cual-es-el-mejor-dispositivo.html", 2, "", 1, "");
addItem("10018", "Foro_20Iontoforesis", "/http://iontophoresis-device.com/sudoracion", 2, "", 1, "_blank");
addItem("10010", "Psoriasis", "/psoriasis/dermalight-80.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;
		
	};
};