var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1001", "AVG_20Home_20Security", "/avg-home-security/index.html", 1, "", 1, "");
addItem("1002", "AVG_20Anti_X2Virus_20Home", "/avg-home-security/avg-antivirus-home/index.html", 2, "", 1, "");
addItem("1003", "AVG_20Internet_20Security_20Home", "/avg-home-security/avg-internet-security-home/index.html", 2, "", 1, "");
addItem("1004", "AVG_20Business_20Security", "/avg-business-security/index.html", 1, "", 1, "");
addItem("1008", "AVG_20Anti_X2Virus_20Business", "/avg-business-security/avg-anti-virus-business/index.html", 2, "", 1, "");
addItem("1009", "AVG_20Internet_20Security_20Business", "/avg-business-security/avg-internet-security-business/index.html", 2, "", 1, "");
addItem("10015", "AVG_20File_20Server", "/avg-business-security/avg-file-server/avg-file-server-edition.html", 2, "", 1, "");
addItem("10016", "AVG_20e_X2Mail_20Server", "/avg-business-security/avg-e-mail-server/index.html", 2, "", 1, "");
addItem("1005", "AVG_20Free", "/avg-free-antivirus/index.html", 1, "", 1, "_top");
addItem("10013", "Free_20Antivirus_20Privat", "/avg-free-antivirus/free-antivirus-privat/index.html", 2, "", 1, "");
addItem("10014", "AVG_20Free_20Small_20Business_20Edition", "/avg-free-antivirus/avg-free-small-business-edition/index.html", 2, "", 1, "");
addItem("1006", "Weitere_20Antivirus_X2Hersteller", "/antivirus-software-hersteller/index.html", 1, "", 1, "");
addItem("10010", "ESET", "/antivirus-software-hersteller/eset/index.html", 2, "", 1, "_top");
addItem("10011", "Lavasoft", "/antivirus-software-hersteller/lavasoft-adaware/index.html", 2, "", 1, "_top");
addItem("10012", "F_X2Secure", "/avg-01.html", 2, "", 1, "_top");
addItem("1007", "Download", "/download/index.html", 1, "", 1, "_top");
};

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;
		
	};
};