function soundOn()
	{
	top.window.name='SoundOn';
	return false;
	}

function soundOff()
	{
	top.window.name='SoundOff';
	return false;
	}

function startSoundcheck()
	{
	document.getElementById('on').style.textDecoration="none";
	document.getElementById('off').style.textDecoration="none";
	if (top.window.name=="SoundOn") 
		{
		document.getElementById('on').style.color="#661922";
		document.getElementById('off').style.color="#999999";
		}
	if (top.window.name=="SoundOff") 
		{
		document.getElementById('off').style.color="#661922";
		document.getElementById('on').style.color="#999999";
		}
	setTimeout("startSoundcheck()",100)
	}





//Funktionen in diesem Dokument werden fuer alle Seiten ausser der Startseite verwendet

function neu_pos(){
location.reload();
return false;
}
//beim Onresize die Seite richtig neu laden
if (!ieMac){          
window.onresize = neu_pos;
}


//die Floaterx (polaroids) zeigen bzw. verstecken
function zeige(nummer){
  if (isNav4) div=document["floater"+nummer];
  if (isIE) div=document.all["floater"+nummer].style;
  if ((ns6)||(opera)) div=document.getElementById("floater"+nummer).style;

  if (isNav4) div_img=document["floater1"].document.images["pol_"+nummer];
  if (isIE) div_img=document.images["pol_"+nummer];    
  if ((ns6)||(opera)) div_img=document.images["pol_"+nummer];
//beim ersten Klick auf das Bild soll sich das Bild gegen ein schwaecheres austauschen und floaterx(polaroid), beim Klick auf das schwaechere Bild soll der Floater verschwinden 

if (isNav4){
  if (div.visibility=="show"){
  div_img.src="../images/i_ra_tor1.jpg";
  div.visibility="hidden";
  }else{
  div.visibility="visible";
  div_img.src="../images/i_ra_tor1.jpg";  
  }
}  
var vis;
if (opera){
//bei opera schreibt man VISIBLE Gross, deswegen hier die Abfrage
  vis="VISIBLE";
  }else{
  vis="visible"
}

if ((isIE)||(ns6)||(opera)){
  if (div.visibility==vis){
  //div_img.src="../images/b_pic_na.gif";
  div.visibility="hidden";
  }else{
  //div_img.src="../images/b_pic_mo.gif";
  div.visibility="visible";    

  }
}

}
var diff_left;
//Layers in der Mitte postionieren
function position(){
  if ((isNS)||(opera)){
  w=window.innerWidth;
  h=window.innerHeight;
  }else{
  w=document.all.seite.offsetWidth;
  h=document.all.seite.offsetHeight;
  }
//neue Koordinate errechnen, dies ist hier Differenz, um welche alle Layers verschoben werden
diff_left=Math.ceil(((w-750)/2)); 
diff_top=Math.ceil(((h-440)/2)); 
if (opera){//bei opera faengt alles ein bisschen versetzt wegen der Banner oben
diff_top=Math.ceil(((h-440)/2)-60); 
}
  
  //alle Layers namens Ueberschriften  postionieren
  for (i=1;i<=11;i++){
    if (isNav4) div=document["ueberschrift"+i];
    if (isIE) div=document.all["ueberschrift"+i].style;
    if ((ns6)||(opera)) div=document.getElementById("ueberschrift"+i).style;  
  div.top=parseFloat(div.top)+diff_top;
  div.left=parseFloat(div.left)+diff_left;    
  }
  
 
 //bestimmte Ueberschriften-Layers sichtbar machen, erst nachdem sie positioniert wurden
  for (i=8;i<=11;i++){
    if (isNav4) div=document["ueberschrift"+i];
    if (isIE) div=document.all["ueberschrift"+i].style; 
    if ((ns6)||(opera)) div=document.getElementById("ueberschrift"+i).style;
  div.visibility = 'visible';
  }
  //Floaters positionieren        
  for (i=1;i<=5;i++){
    if (isNav4) div=document["floater"+i];  
    if (isIE) div=document.all["floater"+i].style;  
    if ((ns6)||(opera)) div=document.getElementById("floater"+i).style;  
  div.top=parseFloat(div.top)+diff_top;
  div.left=parseFloat(div.left)+diff_left;
  }

//Floater 1(Rechenschieber) sichtbar machen, nachdem er positioniert wurde
if (isNav4) div_fl=document["floater1"];
if (isIE) div_fl=document.all["floater1"].style;
if ((ns6)||(opera)) div_fl=document.getElementById("floater1").style;
div_fl.visibility = 'visible';
       
}

//Navigation 1 bedienen
var alt_div;
function zeige_nav(nr){
  //die Abdecker sichtbar machen
  for (i=6;i<=7;i++){
    if (isNav4) div=document["ueberschrift"+i];
    if (isIE) div=document.all["ueberschrift"+i].style;    
    if ((ns6)||(opera))div=document.getElementById("ueberschrift"+i).style;  
  div.visibility = 'visible';
  }
  if (alt_div){//zuerst das alte Layer unsichtbar machen
    if (isNav4) div=document["ueberschrift"+alt_div];
    if (isIE) div=document.all["ueberschrift"+alt_div].style;    
    if ((ns6)||(opera)) div=document.getElementById("ueberschrift"+alt_div).style;  
    div.visibility = 'hidden';
  }
//das aktuelle sichtbar machen
  if (isNav4) div=document["ueberschrift"+nr];
  if (isIE) div=document.all["ueberschrift"+nr].style;  
  if ((ns6)||(opera))div=document.getElementById("ueberschrift"+nr).style;  

div.visibility = 'visible';
alt_div=nr;//das alte merken
}

//die Abdecker unsichtbar machen
function weg(){
  for (i=6;i<=7;i++){
    if (isNav4) div=document["ueberschrift"+i];
    if (isIE) div=document.all["ueberschrift"+i].style;    
    if ((ns6)||(opera)) div=document.getElementById("ueberschrift"+i).style;  
  div.visibility = 'hidden';
  }
}

