
DynInterface.initialize();
		
DDM = DropDownMenu.create("DDM");
DropDownMenu.adjustBarX = 0;
DropDownMenu.adjustBarY = 37;
DropDownMenu.adjustX = 5;
DropDownMenu.adjustY = -13;
DropDownMenu.width = 159;
DropDownMenu.firstLevelWidth = 123;
DropDownMenu.topHtml = '<div><img src="design/images/dropdown-top.gif" width="159" height="5" border="0" alt="" /></div><div class="DropDownMenuElement-inner" ><div class="DropDownMenuElement-inner-inner" >';
DropDownMenu.bottomHtml = '<div><img src="design/images/dropdown-bottom-inner.gif" width="159" height="5" border="0" alt="" /></div></div></div><div><img src="design/images/dropdown-bottom.gif" width="159" height="5" border="0" alt="" /></div>';

DynInterface.onload.addClient( function() {
	
	DDM.render(DDM.build(),DynLayer.create("navigation_container_div"));
	
});


DDM.elements[0] = DropDownMenuElement.create('forside',"Forside",'index.html');
DDM.elements[1] = DropDownMenuElement.create('firmaprofil',"Firmaprofil",'firmaprofil.html');
DDM.elements[2] = DropDownMenuElement.create('service',"Service",'service.html');
DDM.elements[2].elements[0] = DropDownMenuElement.create('service0',"Service",'service.html');
DDM.elements[2].elements[1] = DropDownMenuElement.create('service1',"Eftersyn",'service_eftersyn.html');
DDM.elements[2].elements[2] = DropDownMenuElement.create('service2',"Login",'/login/');
DDM.elements[3] = DropDownMenuElement.create('produkter',"Produkter",'produkter.html');
DDM.elements[3].elements[0] = DropDownMenuElement.create('produkter0',"Varmepumper",'produkter_varmepumper.html');
DDM.elements[3].elements[0].elements[0] = DropDownMenuElement.create('produkter0_0',"Luft/luft",'produkter_varmepumper_luft_luft.html');
DDM.elements[3].elements[0].elements[1] = DropDownMenuElement.create('produkter0_1',"Luft/vand",'produkter_varmepumper_luft_vand.html');
DDM.elements[3].elements[0].elements[2] = DropDownMenuElement.create('produkter0_2',"Jordvarme",'produkter_varmepumper_jordvarme.html');
DDM.elements[3].elements[1] = DropDownMenuElement.create('produkter1',"Komfortventilation",'produkter_komfortventilation.html');
DDM.elements[3].elements[1].elements[0] = DropDownMenuElement.create('produkter1_0',"Aircondition",'produkter_aircondition.html');
DDM.elements[3].elements[2] = DropDownMenuElement.create('produkter2',"Serverkøl",'produkter_serverkoel.html');
DDM.elements[3].elements[3] = DropDownMenuElement.create('produkter3',"Industrikøl",'produkter_industrikoel.html');
DDM.elements[3].elements[3].elements[0] = DropDownMenuElement.create('produkter3_0',"Ammoniak",'produkter_industrikoel_ammoniak.html');
DDM.elements[3].elements[3].elements[1] = DropDownMenuElement.create('produkter3_1',"Kulbrinte",'produkter_industrikoel_kulbrinte.html');
DDM.elements[3].elements[3].elements[2] = DropDownMenuElement.create('produkter3_2',"HFC køleanlæg",'produkter_industrikoel_hfc_koeleanlaeg.html');
DDM.elements[3].elements[3].elements[3] = DropDownMenuElement.create('produkter3_3',"Køl- og frostrum.",'produkter_industrikoel_koel_og_frostrum.html');
DDM.elements[3].elements[4] = DropDownMenuElement.create('produkter4',"Marineanlæg",'produkter_marineanlaeg.html');
DDM.elements[3].elements[5] = DropDownMenuElement.create('produkter5',"Specialanlæg",'produkter_specialanlaeg.html');
DDM.elements[4] = DropDownMenuElement.create('driftsoekonomi',"Driftsøkonomi",'driftsoekonomi_driftsoptimering.html');
DDM.elements[4].elements[0] = DropDownMenuElement.create('driftsoekonomi0',"Driftsoptimering",'driftsoekonomi_driftsoptimering.html');
DDM.elements[4].elements[1] = DropDownMenuElement.create('driftsoekonomi1',"Termografik",'driftsoekonomi_termografik.html');
DDM.elements[5] = DropDownMenuElement.create('kontakt',"Kontakt",'kontakt.html');

DDM.elements[2].onshow = function() { document.getElementById('topmenu_service_img').src = 'design/images/topmenu/service-over.gif'; };
DDM.elements[2].onhide = function() { document.getElementById('topmenu_service_img').src = 'design/images/topmenu/service.gif'; };
DDM.elements[3].onshow = function() { document.getElementById('topmenu_produkter_img').src = 'design/images/topmenu/produkter-over.gif'; };
DDM.elements[3].onhide = function() { document.getElementById('topmenu_produkter_img').src = 'design/images/topmenu/produkter.gif'; };
DDM.elements[4].onshow = function() { document.getElementById('topmenu_driftsoekonomi_img').src = 'design/images/topmenu/driftsoekonomi-over.gif'; };
DDM.elements[4].onhide = function() { document.getElementById('topmenu_driftsoekonomi_img').src = 'design/images/topmenu/driftsoekonomi.gif'; };

function writeTopNavigation(menuId) {
	
	document.write("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" class=\"menu\" >");
	document.write("	<tr>");
	document.write("		<td><img src=\"design/images/topmenu-spacer-left.gif\" width=\"3\" height=\"52\" alt=\"\" border=\"0\" /></td>");
	document.write("		<td><a href=\"index.html\" ><img id=\"topmenu_forside_img\" src=\"design/images/topmenu/forside" + ( menuId == 'forside' ? '-over' : '' ) + ".gif\" onmouseover=\"this.src = 'design/images/topmenu/forside-over.gif'; DropDownMenu.showById('forside',DDM);\" onmouseout=\"this.src = 'design/images/topmenu/forside" + ( menuId == 'forside' ? '-over' : '' ) + ".gif'; DropDownMenu.hide();\" width=\"121\" height=\"52\" alt=\"\" border=\"0\" /></a></td>");
	document.write("		<td><img src=\"design/images/topmenu-spacer.gif\" width=\"2\" height=\"52\" alt=\"\" border=\"0\" /></td>");
	document.write("		<td><a href=\"firmaprofil.html\" ><img id=\"topmenu_firmaprofil_img\" src=\"design/images/topmenu/firma-profil" + ( menuId == 'firmaprofil' ? '-over' : '' ) + ".gif\" onmouseover=\"this.src = 'design/images/topmenu/firma-profil-over.gif'; DropDownMenu.showById('firmaprofil',DDM);\" onmouseout=\"this.src = 'design/images/topmenu/firma-profil" + ( menuId == 'firmaprofil' ? '-over' : '' ) + ".gif'; DropDownMenu.hide();\" width=\"121\" height=\"52\" alt=\"\" border=\"0\" /></a></td>");
	document.write("		<td><img src=\"design/images/topmenu-spacer.gif\" width=\"2\" height=\"52\" alt=\"\" border=\"0\" /></td>");
	document.write("		<td><a href=\"service.html\" ><img id=\"topmenu_service_img\" src=\"design/images/topmenu/service" + ( menuId == 'service' ? '-over' : '' ) + ".gif\" onmouseover=\"this.src = 'design/images/topmenu/service-over.gif'; DropDownMenu.showById('service',DDM);\" onmouseout=\"DropDownMenu.hide();\" width=\"121\" height=\"52\" alt=\"\" border=\"0\" /></a></td>");
	document.write("		<td><img src=\"design/images/topmenu-spacer.gif\" width=\"2\" height=\"52\" alt=\"\" border=\"0\" /></td>");
	document.write("		<td><a href=\"produkter.html\" ><img id=\"topmenu_produkter_img\" src=\"design/images/topmenu/produkter" + ( menuId == 'produkter' ? '-over' : '' ) + ".gif\" onmouseover=\"this.src = 'design/images/topmenu/produkter-over.gif'; DropDownMenu.showById('produkter',DDM);\" onmouseout=\"DropDownMenu.hide();\" width=\"121\" height=\"52\" alt=\"\" border=\"0\" /></a></td>");
	document.write("		<td><img src=\"design/images/topmenu-spacer.gif\" width=\"2\" height=\"52\" alt=\"\" border=\"0\" /></td>");
	document.write("		<td><a href=\"driftsoekonomi_driftsoptimering.html\" ><img id=\"topmenu_driftsoekonomi_img\" src=\"design/images/topmenu/driftsoekonomi" + ( menuId == 'driftsoekonomi' ? '-over' : '' ) + ".gif\" onmouseover=\"this.src = 'design/images/topmenu/driftsoekonomi-over.gif'; DropDownMenu.showById('driftsoekonomi',DDM);\" onmouseout=\"DropDownMenu.hide();\" width=\"121\" height=\"52\" alt=\"\" border=\"0\" /></a></td>");
	document.write("		<td><img src=\"design/images/topmenu-spacer.gif\" width=\"2\" height=\"52\" alt=\"\" border=\"0\" /></td>");
	document.write("		<td><a href=\"kontakt.html\" ><img id=\"topmenu_kontakt_img\" src=\"design/images/topmenu/kontakt" + ( menuId == 'kontakt' ? '-over' : '' ) + ".gif\" onmouseover=\"this.src = 'design/images/topmenu/kontakt-over.gif'; DropDownMenu.showById('kontakt',DDM);\" onmouseout=\"this.src = 'design/images/topmenu/kontakt" + ( menuId == 'kontakt' ? '-over' : '' ) + ".gif'; DropDownMenu.hide();\" width=\"121\" height=\"52\" alt=\"\" border=\"0\" /></a></td>");
	document.write("		<td><img src=\"design/images/topmenu-spacer-right.gif\" width=\"2\" height=\"52\" alt=\"\" border=\"0\" /></td>");
	document.write("	</tr>");
	document.write("</table>");
	document.write("<div id=\"navigation_container_div\" style=\"position: absolute; left: 2px;\" ></div>");
	
	if ( menuId == 'service'        ) DDM.elements[2].onhide = function() { document.getElementById('topmenu_service_img').src = 'design/images/topmenu/service-selected.gif'; };
	if ( menuId == 'produkter'      ) DDM.elements[3].onhide = function() { document.getElementById('topmenu_produkter_img').src = 'design/images/topmenu/produkter-selected.gif'; };
	if ( menuId == 'driftsoekonomi' ) DDM.elements[4].onhide = function() { document.getElementById('topmenu_driftsoekonomi_img').src = 'design/images/topmenu/driftsoekonomi-selected.gif'; };
}

function writeLeftNavigation(menuId, menuItemId) {
	
	if (!menuId || menuId == null || menuId == '') return;
	var menu = Tree.getElementById(menuId);
	if (menu == null || menu.elements.length == 0) return;
	
	document.write("<div class=\"leftmenu\" >");
	document.write("	<div class=\"leftmenu-top\" ></div>");
	document.write("	<div class=\"leftmenu-body\" >");
	document.write("		<div class=\"leftmenu-body-inner\" >");
	
	for (var i = 0; i < menu.elements.length; i++) {
		document.write("			<div class=\"leftmenu-item\" >");
		document.write("				<div class=\"level-1 text\" ><a class=\"level-1" + ( menuItemId == menu.elements[i].id ? ' selected' : '' ) + "\" href=\"" + menu.elements[i].url + "\" >" + menu.elements[i].text + "</a></div>");
		document.write("			</div>");
		var childIsSelected = false;
		for (var j = 0; j < menu.elements[i].elements.length; j++) {
			if (menuItemId == menu.elements[i].elements[j].id) childIsSelected = true;
		}
		if (menuItemId == menu.elements[i].id || childIsSelected) {
			for (var j = 0; j < menu.elements[i].elements.length; j++) {
				document.write("			<div class=\"leftmenu-item\" >");
				document.write("				<div class=\"level-2 text\" ><a class=\"level-2" + ( menuItemId == menu.elements[i].elements[j].id ? ' selected' : '' ) + "\" href=\"" + menu.elements[i].elements[j].url + "\" >" + menu.elements[i].elements[j].text + "</a></div>");
				document.write("			</div>");
			}
		}
	}
	
	document.write("		</div>");
	document.write("	</div>");
	document.write("	<div class=\"leftmenu-bottom\" ></div>");
	document.write("</div>");
}

function mail(a1,a2,a3) { location.href = "mailto:" + a1 + "@" + a2 + "." + a3; }