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_changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName.options[objName.selectedIndex].value);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}

function MM_changeProp2(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}

function close_herstellerdiv() { //v6.0
	
	theProp='style.display';
	theValue='none';
	
  for (i=0;i<5;i++) {
		objName='origin' + i;	
	
		var obj = MM_findObj(objName);
  	 if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
 	   if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  	}
	}
}

function close_modelldiv() { //v6.0
	
	theProp='style.display';
	theValue='none';
	
  for (i=0;i<400;i++) {
		objName='hersteller' + i;	
	
		var obj = MM_findObj(objName);
  	 if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
 	   if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  	}
	}
}

function close_typdiv() { //v6.0
	
	theProp='style.display';
	theValue='none';
	
  for (i=0;i<400;i++) {
		objName='typ' + i;	
	
		var obj = MM_findObj(objName);
  	 if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
 	   if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  	}
	}
}

function close_imagediv() { //v6.0
	
	theProp='style.display';
	theValue='none';
	
  for (i=0;i<400;i++) {
		objName='imageoutercontainer' + i;	
	
		var obj = MM_findObj(objName);
  	 if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
 	   if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  	}
	}
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function Checkdigits(Element, AnzZeichen)
  {
  var FehlerMeldung = "Fehler beim Ausf\xFCllen des Formulars\n\n"
  var FeldLaenge = Element.value.length
  var OK = FeldLaenge >= AnzZeichen

  if (!OK)
    {
    var Text = FehlerMeldung + "Das Feld muss " + AnzZeichen
    Text += " Ziffern enthalten.\nSie haben " + FeldLaenge + " Zeichen eingegeben"
    alert(Text)
    }
  return OK
  }

function NurZiffern(Feld)
  {
  PruefeZeichen(Feld, "0123456789", "Fehler beim Ausf\xFCllen des Formulars")
  }
	
function NurZiffernundBuchstaben(Feld)
  {
  PruefeZeichen(Feld, "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", "Fehler beim Ausf\xFCllen des Formulars")
  }	

function PruefeZeichen(Feld, ZugelasseneZeichen, FehlerMeldung)
  {
  for (var Pos = 0; Pos < Feld.value.length; Pos++)
    {
    if (ZugelasseneZeichen.indexOf(Feld.value.charAt(Pos)) == -1)
      {
      FehlerMeldung += "\n\nIhre Eingabe enth\xE4lt das Zeichen '"
      FehlerMeldung += Feld.value.charAt(Pos)
      FehlerMeldung += "'. Sie d\xFCrfen nur diese Zeichen verwenden:\n"
      FehlerMeldung += ZugelasseneZeichen
      if (ZugelasseneZeichen.indexOf(" ") == -1)
        {
        FehlerMeldung += "\nLeerzeichen sind nicht erlaubt"
        }
      else
        {
        FehlerMeldung += "\nund das Leerzeichen"
        }
      alert(FehlerMeldung)
      Feld.focus()
      return;
      }
    }
  }
  
/* Tooltips */

tooltipid=null;

function showtooltip(id) {
	tooltipid = document.getElementById(id);
	tooltipid.style.display = "block"
}

document.onmousemove = updatetooltip;

function updatetooltip(e) {
	posx=0; posy=0;
 if (!e) e=window.event;
 if (e.pageX && e.pageY) {
  posx=e.pageX;
  posy=e.pageY;
 } else
 if (e.clientX && e.clientY) {
  if (document.compatMode && document.compatMode=="CSS1Compat") {
   posx=e.clientX + document.documentElement.scrollLeft;
   posy=e.clientY + document.documentElement.scrollTop;
  } else {
   posx=e.clientX + document.body.scrollLeft;
   posy=e.clientY + document.body.scrollTop;
  }
 }
 if (posx > 600) {
	 	posx=posx-440;
		posy=posy-40;
		}

	if (tooltipid != null) {
		tooltipid.style.left = (posx + 20) + "px";
		tooltipid.style.top 	= (posy + 20) + "px";
	}
}

function hidetooltip() {
	tooltipid.style.display = "none";
}  




