
var fenster_b=0;
var wahr=false;  
var numm=0;
var dom = document.getElementById?1:0;
var menu1;
var anfang, ende;
var erreicht=true;
//Variable f&uuml;r Sichtbarkeit des Untermen&uuml;s
var is_sichtbar="hidden";


function setze_innerhalb(setze, id_name){
	wechsle_index(setze,id_name);
}

function wechsle_index(innerhalb, id_name){

	//gib_position();
	if(innerhalb){
	
	document.getElementById(id_name).style.zIndex = -1;
	}else{
		
		document.getElementById(id_name).style.zIndex = 1;
	}

}

Normal0 = new Image();
Normal0.src = "img/kurz.gif";
Normal1 = new Image();
Normal1.src = "img/farbverlauf.gif";
Normal2 = new Image();
Normal2.src = "menue_lang/home_ss.gif";     /* erste Standard-Grafik */
Highlight2 = new Image();
Highlight2.src = "menue_lang/home_sr.gif"; /* erste Highlight-Grafik */
Active2 = new Image();
Active2.src = "menue_lang/home_rr.gif";

normalbild1 = new Image();
normalbild1.src = "img/pfeil_s.gif";
markiertbild1 = new Image();
markiertbild1.src = "img/pfeil_r.gif";

linkpfeil = new Image();
linkpfeil.src = "img/_pfeil_s.gif";
linkpfeilrot = new Image();
linkpfeilrot.src = "img/_pfeil_r.gif";
linkpfeiltief = new Image();
linkpfeiltief.src = "img/_pfeil_r_t.gif";

function bild_wechsel(bildid,bildnr){
//alert(bildid.src);
			window.document.images[bildnr].src = bildid.src;	
}

function linieweg(verweis)// Funktion Rahmen weg
{
verweis.blur();
}
 

function menueZurueck(){
/*{

	Bildwechsel(12, Normal10);
	Bildwechsel(13, Normal11);	
	Bildwechsel(14, Normal12);
	Bildwechsel(15, Normal13);
	Bildwechsel(16, Normal14);
	Bildwechsel(17, Normal15);
	}*/
}

function unterMenuWechsel(Bildnr, Bildobjekt){
  if(nummer != Bildnr)
  window.document.images[Bildnr].src = Bildobjekt.src;
}

function unterMenuAktiv(Bildnr, Bildobjekt){

nummer = Bildnr;
for(k=2; k<10; k++){
  resetB(k);
  }
  
  resetU(Bildnr);
  window.document.images[Bildnr].src = Bildobjekt.src;
}
//Funktion wird vom Haupt und vom Untermen&uuml; aufgerufen
function zeigeMenue(darauf, id_nr) {
//alert(id_nr);
	if(darauf){
	  if (document.getElementById){
	    document.getElementById(id_nr).style.visibility = "visible";

		}
	}else{
	  		  if (document.getElementById){
		    document.getElementById(id_nr).style.visibility = "hidden";
		}
	}
}



hoverobjects = new Object();
hoverTimers = new Object();
var auf = false;

	function Bildwechsel(id_, sichtbar, Bildnr, Bildobjekt,gif_id,textarea){
	Textfeld(sichtbar,textarea);
		//browserabfrage muss noch eingebaut werden
objekt_=document.getElementById(gif_id);
		if(browser == "Microsoft Internet Explorer"){
		//alert(objekt_.style.width);	
			if(sichtbar=="visible"){
			document.getElementById(id_).style.visibility = sichtbar;					
			faden(gif_id,100,50,5);

			}else{
			document.getElementById(id_).style.visibility = sichtbar;		
			faden(gif_id,20,50,5);
			}
		}else{
		document.getElementById(id_).style.visibility = sichtbar;
		window.document.images[Bildnr].src = Bildobjekt.src;	
		}
		}
		
		
function faden(object,destOp,wartezeit,delta)
{

	if (!document.all)
		return
    if (object != "[object]"){  
        setTimeout("faden("+object+","+destOp+","+wartezeit+","+delta+")",0);
        return;
	 }
	//document.write("<b>Hallo <\/b>");
	//alert(object.sourceIndex);
    clearTimeout(hoverTimers[object.sourceIndex]);   
    diff = destOp-object.filters.alpha.opacity;
    direction = 1;
    if (object.filters.alpha.opacity > destOp){
        direction = -1;
    }
    delta=Math.min(direction*diff,delta);
    object.filters.alpha.opacity+=direction*delta;

    if (object.filters.alpha.opacity != destOp){
        hoverobjects[object.sourceIndex]=object;
        hoverTimers[object.sourceIndex]=setTimeout("faden(hoverobjects["+object.sourceIndex+"],"+destOp+","+wartezeit+","+delta+")",wartezeit);
    }

}

function hover(pfeil_id,sichtbar, object, destOp, wartezeit, delta,text_id,textarea){
	Textfeld(sichtbar,textarea);
if(destOp<100){
document.getElementById(pfeil_id).style.visibility = sichtbar;
document.getElementById(text_id).style.color = "#000000";
}else{
//alert(text_id);
document.getElementById(pfeil_id).style.visibility = sichtbar;
document.getElementById(text_id).style.color = "#ff0000";
}
faden(object,destOp,wartezeit,delta);
}

function index_unten(id_name){

if(document.all.quadrat.id == id_name){
//alert(id_name);
	document.getElementById("quadrat").style.zIndex="-1";
	}
	//auf = true;
	//if(auf){}

}
function index_oben(id_name){


if(document.all.deck.id ==id_name){
//alert("x");
	  document.getElementById("quadrat").style.zIndex="2";
}
}


function Textfeld(sichtbar,textarea){

 document.getElementById(textarea).style.visibility = sichtbar;
}

	function Dimensionen(){
		
		var browser = navigator.appName;
		document.write("<style type='text/css'>");
			if(browser != "Microsoft Internet Explorer")
			{
			document.write("#rahmen {position: absolute;top : 5px;left : 60px;width : 888px;height : 582px;	border : thin 5px red;border:solid 1px Gray;z-index:1;}");
			}else{
			document.write("#rahmen {position: absolute;top : 5px;left : 60px;width : 887px;height : 583px;	border : thin 5px red;border:solid 1px Gray;z-index:1;}");
			}
		document.write("</style>");	
}

