function init2()
	{
	document.onmousemove = hilfemove;
	}

var hilfeobjekt = null;
var hilfex = 0;
var hilfey = 0;
var posx = 0;
var posy = 0;
var verschiebungx=15;
var verschiebungy=15;
function hilfemove(ereignis)
	{
	posx = document.all ? window.event.clientX : ereignis.pageX;
	posy = document.all ? (window.event.clientY+document.body.scrollTop) : ereignis.pageY;
	if(hilfeobjekt != null)
		{
		hilfeobjekt.style.left = (posx + verschiebungx) + "px";
		hilfeobjekt.style.top = (posy + verschiebungy) + "px";
		}
	}


function findObj(n, d) {
         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=findObj(n,d.layers[i].document);
         if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function getElem(p1,p2,p3) {
 var Elem;
 if(DOM) {
   if(p1.toLowerCase()=="id") {
     if (typeof document.getElementById(p2) == "object")
     Elem = document.getElementById(p2);
     else Elem = void(0);
     return(Elem);
   }
   else if(p1.toLowerCase()=="name") {
     if (typeof document.getElementsByName(p2) == "object")
     Elem = document.getElementsByName(p2)[p3];
     else Elem = void(0);
     return(Elem);
   }
   else if(p1.toLowerCase()=="tagname") {
     if (typeof document.getElementsByTagName(p2) == "object" || (OP && typeof document.getElementsByTagName(p2) == "function"))
     Elem = document.getElementsByTagName(p2)[p3];
     else Elem = void(0);
     return(Elem);
   }
   else return void(0);
 }
 else if(MS) {
   if(p1.toLowerCase()=="id") {
     if (typeof document.all[p2] == "object")
     Elem = document.all[p2];
     else Elem = void(0);
     return(Elem);
   }
   else if(p1.toLowerCase()=="tagname") {
     if (typeof document.all.tags(p2) == "object")
     Elem = document.all.tags(p2)[p3];
     else Elem = void(0);
     return(Elem);
   }
   else if(p1.toLowerCase()=="name") {
     if (typeof document[p2] == "object")
     Elem = document[p2];
     else Elem = void(0);
     return(Elem);
   }
   else return void(0);
 }
 else if(NS) {
   if(p1.toLowerCase()=="id" || p1.toLowerCase()=="name") {
   if (typeof document[p2] == "object")
     Elem = document[p2];
     else Elem = void(0);
     return(Elem);
   }
   else if(p1.toLowerCase()=="index") {
    if (typeof document.layers[p2] == "object")
     Elem = document.layers[p2];
    else Elem = void(0);
     return(Elem);
   }
   else return void(0);
 }
}
var speicher_sichtbarkeit1 = new Array();
var speicher_sichtbarkeit2 = new Array();
var speicher_markierung = new Array();

function uebermenu_markieren(menu)
	{
	var picpuffer=findObj("pic_"+menu);
	picpuffer.src=bulletbild_offen;
	}
function uebermenu_markieren_zuruecksetzen(menu)
	{
	var picpuffer=findObj("pic_"+menu);
	picpuffer.src=bulletbild_geschlossen;
	}

function untermenu_einblenden(untermenu)
	{
	var menupuffer=findObj(untermenu);
	if(!speicher_sichtbarkeit1[untermenu])speicher_sichtbarkeit1[untermenu]=menupuffer.style.visibility;
	if(!speicher_sichtbarkeit2[untermenu])speicher_sichtbarkeit2[untermenu]=menupuffer.style.display;
	menupuffer.style.visibility="visible";
	menupuffer.style.display="block";
	menupuffer.style.zIndex=menupuffer.style.zIndex+5;
	}
function untermenu_zuruecksetzen(untermenu)
	{
	var menupuffer=findObj(untermenu);
	menupuffer.style.visibility=speicher_sichtbarkeit1[untermenu];
	menupuffer.style.display=speicher_sichtbarkeit2[untermenu];
	menupuffer.style.zIndex=menupuffer.style.zIndex-5;
	speicher_sichtbarkeit1[untermenu]=null;
	speicher_sichtbarkeit2[untermenu]=null;
	}
	
function option_hinzufuegen(feld,name,wert)
	{
	eintrag = new Option(name,wert, false, false);
	feld.options[feld.length] = eintrag;
	}
function selectliste_loeschen(feld)
	{
	for(i=feld.length;i>0;i--)feld.options[feld.length-1]=null;
	}

	
	
	
function pfinder_herstellerliste_laden(feld,kat_id,ausgewaehlt)
	{
	selectliste_loeschen(feld);
	vorauswahl=0;
	zaehl=0;
	option_hinzufuegen(feld,optiontext_hersteller2,"");
		for(i in hl)
			{
			zaehl++;
			option_hinzufuegen(feld,hl[i],i);
			if(ausgewaehlt==i)vorauswahl=zaehl;
			}
	if(ausgewaehlt)feld.options[vorauswahl].selected=true;
	else feld.options[0].selected=true;
	}
function pfinder_druckerliste_laden(feld,typ_id,hersteller_id,ausgewaehlt)
	{
	selectliste_loeschen(feld);
	vorauswahl=0;
	zaehl=0;
	if(hersteller_id)
		{
		option_hinzufuegen(feld,optiontext_modell1,"");
		for(i in hml[hersteller_id])
			{
				zaehl++;
				option_hinzufuegen(feld,ml[hml[hersteller_id][i]],hml[hersteller_id][i]);
				if(ausgewaehlt==hml[hersteller_id][i])vorauswahl=zaehl;
			}
		}
	else
		{
		option_hinzufuegen(feld,optiontext_modell2,"");
		for(i in ml)
			{
				zaehl++;
				option_hinzufuegen(feld,ml[i],i);
				if(ausgewaehlt==i)vorauswahl=zaehl;
			}
		}
	if(ausgewaehlt)feld.options[vorauswahl].selected=true;
	else feld.options[0].selected=true;
	}

/*function pfinder_herstellerliste_laden(feld,kat_id,ausgewaehlt)
	{
	selectliste_loeschen(feld);
	vorauswahl=0;
	zaehl=0;
	if(kat_id)
		{
		option_hinzufuegen(feld,optiontext_hersteller1,"");
		for(i in thl[kat_id])
			{
			zaehl++;
			option_hinzufuegen(feld,hl[thl[kat_id][i]],thl[kat_id][i]);
			if(ausgewaehlt==thl[kat_id][i])vorauswahl=zaehl;
			}
		}
	else
		{
		option_hinzufuegen(feld,optiontext_hersteller2,"");
		for(i in hl)
			{
			zaehl++;
			option_hinzufuegen(feld,hl[i],i);
			if(ausgewaehlt==i)vorauswahl=zaehl;
			}
		}
	if(ausgewaehlt)feld.options[vorauswahl].selected=true;
	else feld.options[0].selected=true;
	}
function pfinder_druckerliste_laden(feld,typ_id,hersteller_id,ausgewaehlt)
	{
	selectliste_loeschen(feld);
	vorauswahl=0;
	zaehl=0;
	if(hersteller_id)
		{
		option_hinzufuegen(feld,optiontext_modell1,"");
		for(i in hml[hersteller_id])
			{
			typcheck=0;
			for(j in tml[typ_id])
				{
				if(hml[hersteller_id][i]==tml[typ_id][j])typcheck=1;
				}
			if(typcheck==1||!typ_id)
				{
				zaehl++;
				option_hinzufuegen(feld,ml[hml[hersteller_id][i]],hml[hersteller_id][i]);
				if(ausgewaehlt==hml[hersteller_id][i])vorauswahl=zaehl;
				}
			}
		}
	else
		{
		option_hinzufuegen(feld,optiontext_modell2,"");
		for(i in ml)
			{
			typcheck=0;
			for(j in tml[typ_id])
				{
				if(i==tml[typ_id][j])typcheck=1;
				}
			if(typcheck==1||!typ_id)
				{
				zaehl++;
				option_hinzufuegen(feld,ml[i],i);
				if(ausgewaehlt==i)vorauswahl=zaehl;
				}
			}
		}
	if(ausgewaehlt)feld.options[vorauswahl].selected=true;
	else feld.options[0].selected=true;
	}
function pfinder_geraetekategorieliste_laden(feld,ausgewaehlt)
	{
	selectliste_loeschen(feld);
	vorauswahl=0;
	zaehl=0;
	option_hinzufuegen(feld,optiontext_typen,"");
	for(i in tl)
		{
		zaehl++;
		option_hinzufuegen(feld,tl[i],i);
		if(ausgewaehlt==i)vorauswahl=zaehl;
		}
	feld.options[vorauswahl].selected=true;
	}*/

function hilfebox_einblenden(meldung,breite,vx,vy)
	{
	if(vx=='rechts')verschiebungx=15;
	if(vx=='mitte')verschiebungx=-breite/2;
	if(vx=='links')verschiebungx=-breite;
	if(vy>0)verschiebungy=vy;
	else verschiebungy=15;
	hilfeobjekt=findObj('hilfebox');
	if(hilfeobjekt != null)
		{
		hilfeobjekt.innerHTML=meldung;
		hilfeobjekt.style.width=breite+"px";
		hilfeobjekt.style.visibility="visible";
		}
	}

function hilfebox_ausblenden(){
	if(hilfeobjekt != null)
		{
		hilfeobjekt.innerHTML="&nbsp;";
		hilfeobjekt.style.visibility="hidden";
		hilfeobjekt.style.width="1px";
		hilfeobjekt.style.left="-500px";
		hilfeobjekt.style.top="-500px";
		}
	hilfeobjekt=null;
	}