<!--
function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function ShowFlashHeader(hasRightVersion, source)
{
   if(hasRightVersion) {  // if we've detected an acceptable version
		var oeTags = '<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
		+ 'WIDTH="181" HEIGHT="181" id="flashHeader" '
		+ 'CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0">'
		+ '<PARAM NAME="MOVIE" VALUE="'+ source +'">'
		+ '<PARAM NAME="PLAY" VALUE="true">'
		+ '<PARAM NAME="LOOP" VALUE="true">'
		+ '<PARAM NAME="QUALITY" VALUE="high">'
		+ '<PARAM NAME="MENU" VALUE="false">'
		+ '<PARAM NAME="BGCOLOR" VALUE="#ffffff">'
		+ '<EMBED SRC="'+ source +'"'
		+ 'WIDTH="181" HEIGHT="181"'
		+ 'PLAY="true"'
		+ 'LOOP="true"'
		+ 'QUALITY="high"'
		+ 'MENU="false"'
		+ 'BGCOLOR="ffffff"'
		+ 'TYPE="application/x-shockwave-flash"'
		+ 'PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" name="flashHeader" swLiveConnect=true>'
		+ '<\/EMBED>'
		+ '<\/OBJECT>';
		
		document.write(oeTags);   // embed the flash movie
   } else {  // flash is too old or we can't detect the plugin
     
	 var imgAltText = new Array();
	 imgAltText['www'] = 'FUCHS Fördertechnik AG';
	 
     var alternateContent = '<img src="Bilder/bild_1.jpg" alt="" width="181" height="181" />';      
	 document.write(alternateContent);  // insert non-flash content
	 
   }
}

var DEBUG = true;	// display Debug Messages? true | false

// die ID des zur Seite gehörenden Menüs
// wird durch body onload="init(n)" übergeben
var pageMenu = false;

var openMenu = false;
var closing = false;
var currentMenu = false;

var openInterval = false;
var closeInterval = false;
var closeTimer = false;


function init(menuid)
{
	pageMenu = menuid;
	
	var menuitems = document.getElementById("navi").getElementsByTagName("ul");
	
	for(var i = 0; i < menuitems.length; i++)
	{
		if(i != menuid -1)
		{
			menuitems[i].style.display = "none";
			document.getElementById("main_" + (i + 1)).style.backgroundImage = 'url(Bilder/nav_hg.gif)';
		}
	}
}

function showhidemenu(menuid)
{
	
	
	currentMenu = menuid;
	
	if(menuid == pageMenu)
	{
		return false;
	}
	
	if(openMenu == menuid)
	{
		closeMe();
		return false;
	}
	init(pageMenu);
	
	if(menuid != 99)
	{
		var cntLi = document.getElementById("sub_" + menuid).getElementsByTagName("li").length;
		var liHeight = (cntLi * 16); /*(4 - cntLi); - ((cntLi % 2 == 0) ? 5 : 10); */
	
		if(!is_ie6)
		{
			var n = document.getElementById("sub_" + menuid).getElementsByTagName("li");
			for(i = 0; i < n.length; i++)
			{
				n[i].style.paddingLeft = "10px";
			}
		}
	}
	else
	{
		liHeight = 110;
	}
	document.getElementById("sub_" + menuid).style.height = "1px";
	document.getElementById("sub_" + menuid).style.overflow = "hidden";
	document.getElementById("sub_" + menuid).style.display = "block";
	document.getElementById("main_" + menuid).style.backgroundImage = 'url(Bilder/nav_hg_o.gif)';
	this.menuid = menuid;
	this.maxh = liHeight;
	openInterval = window.setInterval("moveMe()", 70);
}

function moveMe()
{
	if(closeTimer)
	{
		window.clearTimeout(closeTimer);
	}
	var el = parseInt(document.getElementById("sub_" + this.menuid).style.height);	

	var diff = Math.round((this.maxh - el) / 2);

	if(el < this.maxh - 2)
	{
		document.getElementById("sub_" + this.menuid).style.height = el + diff + "px";
	}
	else
	{
		document.getElementById("sub_" + this.menuid).style.height = this.maxh + "px";
		window.clearInterval(openInterval);
		openInterval = false;
		openMenu = currentMenu;
		closeTimer = window.setTimeout("closeMe()", 10000);
	}
}

function closeMe()
{	
	closing = true;

	if(openMenu)
	{
		var el = parseInt(document.getElementById("sub_" + openMenu).style.height);	
	}
	else
	{
		init(pageMenu);
		return false;
	}

	var diff = Math.round((el) / 2);

	if(el > 2)
	{
		document.getElementById("sub_" + openMenu).style.height = el - diff + "px";
		if(closeInterval == false)
		{
			closeInterval = window.setInterval("closeMe()", 70);
		}
	}
	else
	{
		document.getElementById("main_" + openMenu).style.backgroundImage = 'url(Bilder/nav_hg.gif)';
		document.getElementById("sub_" + openMenu).style.height = 0;
		document.getElementById("sub_" + openMenu).style.display = "none";
		window.clearInterval(closeInterval);
		closeInterval = false;
		if(closeTimer)
		{
			window.clearTimeout(closeTimer);
			closeTimer = false;
		}
		closing = false;
		if(openMenu == currentMenu)
		{
			openMenu = false;
		}
	}
}


function stopTimeout(menuid)
{
	window.clearTimeout(closeTimer);
}

function startTimeout(menuid)
{
	closeTimer = window.setTimeout("closeMe()", 10000);
}

//-->
