/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="index.php?page=unternehmen" onmouseout="MM_swapImgRestore();navi_out()" onmouseover="MM_swapImage(\'unternehmen\',\'\',\'img/subnavi/unternehmen_aktiv.gif\',1);navi1()" onFocus="if(this.blur)this.blur()"><img src="img/subnavi/unternehmen_inaktiv.gif" alt="unternehmen" name="unternehmen" width="142" height="22" border="0" id="unternehmen" /></a>'
menu1[1]='<a href="index.php?page=team" onmouseout="MM_swapImgRestore();navi_out()" onmouseover="MM_swapImage(\'team\',\'\',\'img/subnavi/team_aktiv.gif\',1);navi1()" onFocus="if(this.blur)this.blur()"><img src="img/subnavi/team_inaktiv.gif" alt="Team" name="team" width="142" height="21" border="0" id="team" /></a>'

//Contents for menu 2, and so on
var menu2=new Array() 
menu2[0]='<a href="index.php?page=beratung" onmouseout="MM_swapImgRestore();navi_out()" onmouseover="MM_swapImage(\'beratung\',\'\',\'img/subnavi/beratung_aktiv.gif\',1);navi2()" onFocus="if(this.blur)this.blur()"><img src="img/subnavi/beratung_inaktiv.gif" alt="Beratung" name="beratung" width="142" height="22" border="0" id="beratung" /></a>'
menu2[1]='<a href="index.php?page=entwicklung" onmouseout="MM_swapImgRestore();navi_out()" onmouseover="MM_swapImage(\'entwicklung\',\'\',\'img/subnavi/entwicklung_aktiv.gif\',1);navi2()" onFocus="if(this.blur)this.blur()"><img src="img/subnavi/entwicklung_inaktiv.gif" alt="Entwicklung" name="entwicklung" width="142" height="21" border="0" id="entwicklung" /></a>'
menu2[2]='<a href="index.php?page=umsetzung" onmouseout="MM_swapImgRestore();navi_out()" onmouseover="MM_swapImage(\'umsetzung\',\'\',\'img/subnavi/umsetzung_aktiv.gif\',1);navi2()" onFocus="if(this.blur)this.blur()"><img src="img/subnavi/umsetzung_inaktiv.gif" alt="Umsetzung" name="umsetzung" width="142" height="21" border="0" id="umsetzung" /></a>'

//Contents for menu 3
var menu3=new Array()
menu3[0]='<a href="index.php?page=stardardprodukte" onmouseout="MM_swapImgRestore();navi_out()" onmouseover="MM_swapImage(\'stardardprodukte\',\'\',\'img/subnavi/stardardprodukte_aktiv.gif\',1);navi3()" onFocus="if(this.blur)this.blur()"><img src="img/subnavi/stardardprodukte_inaktiv.gif" alt="Stardardprodukte" name="stardardprodukte" width="142" height="22" border="0" id="stardardprodukte" /></a>'
menu3[1]='<a href="index.php?page=officeversand" onmouseout="MM_swapImgRestore();navi_out()" onmouseover="MM_swapImage(\'officeversand\',\'\',\'img/subnavi/officeversand_aktiv.gif\',1);navi3()" onFocus="if(this.blur)this.blur()"><img src="img/subnavi/officeversand_inaktiv.gif" alt="Officeversand" name="officeversand" width="142" height="21" border="0" id="officeversand" /></a>'
menu3[2]='<a href="index.php?page=praesentkartonagen" onmouseout="MM_swapImgRestore();navi_out()" onmouseover="MM_swapImage(\'praesentkartonagen\',\'\',\'img/subnavi/praesentkartonagen_aktiv.gif\',1);navi3()" onFocus="if(this.blur)this.blur()"><img src="img/subnavi/praesentkartonagen_inaktiv.gif" alt="Praesentkartonagen" name="praesentkartonagen" width="142" height="21" border="0" id="praesentkartonagen" /></a>'
menu3[3]='<a href="index.php?page=massgefertigt" onmouseout="MM_swapImgRestore();navi_out()" onmouseover="MM_swapImage(\'massgefertigt\',\'\',\'img/subnavi/massgefertigt_aktiv.gif\',1);navi3()" onFocus="if(this.blur)this.blur()"><img src="img/subnavi/massgefertigt_inaktiv.gif" alt="Massgefertigt" name="massgefertigt" width="142" height="21" border="0" id="massgefertigt" /></a>'
menu3[4]='<a href="index.php?page=katalog" onmouseout="MM_swapImgRestore();navi_out()" onmouseover="MM_swapImage(\'sonderposten\',\'\',\'img/subnavi/sonderposten_aktiv.gif\',1);navi3()" onFocus="if(this.blur)this.blur()"><img src="img/subnavi/sonderposten_inaktiv.gif" alt="Sonderposten" name="sonderposten" width="142" height="21" border="0" id="sonderposten" /></a>'

//Contents for menu 4
var menu4=new Array()
menu4[0]='<a href="index.php?page=anschrift" onmouseout="MM_swapImgRestore();navi_out()" onmouseover="MM_swapImage(\'anschrift\',\'\',\'img/subnavi/anschrift_aktiv.gif\',1);navi4()" onFocus="if(this.blur)this.blur()"><img src="img/subnavi/anschrift_inaktiv.gif" alt="Anschrift" name="anschrift" width="142" height="22" border="0" id="anschrift" /></a>'
menu4[1]='<a href="index.php?page=anfahrt" onmouseout="MM_swapImgRestore();navi_out()" onmouseover="MM_swapImage(\'anfahrt\',\'\',\'img/subnavi/anfahrt_aktiv.gif\',1);navi4()" onFocus="if(this.blur)this.blur()"><img src="img/subnavi/anfahrt_inaktiv.gif" alt="Anfahrt" name="anfahrt" width="142" height="21" border="0" id="anfahrt" /></a>'
menu4[2]='<a href="index.php?page=impressum" onmouseout="MM_swapImgRestore();navi_out()" onmouseover="MM_swapImage(\'impressum\',\'\',\'img/subnavi/impressum_aktiv.gif\',1);navi4()" onFocus="if(this.blur)this.blur()"><img src="img/subnavi/impressum_inaktiv.gif" alt="Impressum" name="impressum" width="142" height="21" border="0" id="impressum" /></a>'
menu4[3]='<a href="index.php?page=agb" onmouseout="MM_swapImgRestore();navi_out()" onmouseover="MM_swapImage(\'agb\',\'\',\'img/subnavi/agb_aktiv.gif\',1);navi4()" onFocus="if(this.blur)this.blur()"><img src="img/subnavi/agb_inaktiv.gif" alt="AGBs" name="agb" width="142" height="21" border="0" id="agb" /></a>'
		
var menuwidth='142px' //default menu width
var menubgcolor='transparent'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)

dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

// Hauptnavi active-inactive
function Werteliste(querystring) {
  if(querystring == '') return;
  var wertestring = decodeURI(querystring);
  wertestring = wertestring.slice(1);
  var paare = wertestring.split("&");
  for (var i=0; i < paare.length; i++) {
    var name = paare[i].substring(0, paare[i].indexOf("="));
    var wert = paare[i].substring(paare[i].indexOf("=")+1, paare[i].length);
    this[name] = wert;
  }
}

var liste = new Werteliste(window.location.search);

for( eigenschaft in liste ) {
  //alert(eigenschaft+": "+liste[eigenschaft]);
  var page = liste[eigenschaft];
}

function navi1() {
document.getElementById('m11').className='ueber_uns_active_link';
}
function navi2() {
document.getElementById('m21').className='leistungen_active_link';
}
function navi3() {
document.getElementById('m31').className='produkte_active_link';
}
function navi4() {
document.getElementById('m41').className='kontakt_active_link';
}
function navi_out() {
	// ueber_uns
if ("unternehmen" == page) {
    document.getElementById('m11').className='ueber_uns_active_link';
	document.getElementById('m21').className='leistungen_link';
	document.getElementById('m31').className='produkte_link';
	document.getElementById('m41').className='kontakt_link';
  } 
else if ("team" == page) {
    document.getElementById('m11').className='ueber_uns_active_link';
	document.getElementById('m21').className='leistungen_link';
	document.getElementById('m31').className='produkte_link';
	document.getElementById('m41').className='kontakt_link';
  } 
 	// leistungen
else if ("beratung" == page) {
    document.getElementById('m11').className='ueber_uns_link';
	document.getElementById('m21').className='leistungen_active_link';
	document.getElementById('m31').className='produkte_link';
	document.getElementById('m41').className='kontakt_link';
  } 
else if ("entwicklung" == page) {
    document.getElementById('m11').className='ueber_uns_link';
	document.getElementById('m21').className='leistungen_active_link';
	document.getElementById('m31').className='produkte_link';
	document.getElementById('m41').className='kontakt_link';
  } 
else if ("umsetzung" == page) {
    document.getElementById('m11').className='ueber_uns_link';
	document.getElementById('m21').className='leistungen_active_link';
	document.getElementById('m31').className='produkte_link';
	document.getElementById('m41').className='kontakt_link';
  } 
  // Produkte
else if ("stardardprodukte" == page) {
    document.getElementById('m11').className='ueber_uns_link';
	document.getElementById('m21').className='leistungen_link';
	document.getElementById('m31').className='produkte_active_link';
	document.getElementById('m41').className='kontakt_link';
  } 
else if ("officeversand" == page) {
    document.getElementById('m11').className='ueber_uns_link';
	document.getElementById('m21').className='leistungen_link';
	document.getElementById('m31').className='produkte_active_link';
	document.getElementById('m41').className='kontakt_link';
  } 
else if ("praesentkartonagen" == page) {
    document.getElementById('m11').className='ueber_uns_link';
	document.getElementById('m21').className='leistungen_link';
	document.getElementById('m31').className='produkte_active_link';
	document.getElementById('m41').className='kontakt_link';
  } 
else if ("massgefertigt" == page) {
    document.getElementById('m11').className='ueber_uns_link';
	document.getElementById('m21').className='leistungen_link';
	document.getElementById('m31').className='produkte_active_link';
	document.getElementById('m41').className='kontakt_link';
  } 
else if ("sonderposten" == page) {
    document.getElementById('m11').className='ueber_uns_link';
	document.getElementById('m21').className='leistungen_link';
	document.getElementById('m31').className='produkte_active_link';
	document.getElementById('m41').className='kontakt_link';
  } 
  // Kontakt 
else if ("anschrift" == page) {
    document.getElementById('m11').className='ueber_uns_link';
	document.getElementById('m21').className='leistungen_link';
	document.getElementById('m31').className='produkte_link';
	document.getElementById('m41').className='kontakt_active_link';
  } 
else if ("anfahrt" == page) {
    document.getElementById('m11').className='ueber_uns_link';
	document.getElementById('m21').className='leistungen_link';
	document.getElementById('m31').className='produkte_link';
	document.getElementById('m41').className='kontakt_active_link';
  } 
else if ("impressum" == page) {
    document.getElementById('m11').className='ueber_uns_link';
	document.getElementById('m21').className='leistungen_link';
	document.getElementById('m31').className='produkte_link';
	document.getElementById('m41').className='kontakt_active_link';
  } 
else if ("agb" == page) {
    document.getElementById('m11').className='ueber_uns_link';
	document.getElementById('m21').className='leistungen_link';
	document.getElementById('m31').className='produkte_link';
	document.getElementById('m41').className='kontakt_active_link';
  } 
 else {
    document.getElementById('m11').className='ueber_uns_link';
	document.getElementById('m21').className='leistungen_link';
	document.getElementById('m31').className='produkte_link';
	document.getElementById('m41').className='kontakt_link';
}}