
var ie4 = (document.all) ? true : false; 
var ns4 = (document.layers) ? true : false; 
var ns6 = (document.getElementById && !document.all) ? true : false; 
function hidelayer(lay) { 
if (ie4) {document.all[lay].style.visibility = "hidden";} 
if (ns4) {document.layers[lay].visibility = "hide";} 
if (ns6) {document.getElementById([lay]).style.display = "none";} 
} 
function showlayer(lay) {
 
if (ie4) {document.all[lay].style.visibility = "visible";} 
if (ns4) {document.layers[lay].visibility = "show";} 
if (ns6) {document.getElementById([lay]).style.display = "block";} 
} 
function bildertausch(bildsrc,stelle) {
var lay ='neuerText';  
if (ie4) { 
document.all[lay].innerHTML = text[stelle];
eb2.img['rahmen'].src = "../bilder/bilderphp/"+bildsrc; 
} 
if (ns4) {
var lay ='pic1';

document[lay].document.write('<table width="396" height="357" border="0" cellspacing="0" cellpadding="0"><tr><td width="83" height="50"  bgcolor="#999999"><img src="../bilder/blind.gif" alt="" width="83" height="8" border="0"></td><td width="230" height="50" bgcolor="#999999"><img src="../bilder/blind.gif" alt="" width="230" height="1" border="0"></td><td width="83" height="50" bgcolor="#999999"><img src="../bilder/blind.gif" alt="" width="1" height="50" border="0"></td></tr><tr><td width="83" height="230" bgcolor="#999999"><a href="#" onClick="if(document.all)this.blur();do_pic();return false;"><img src="../bilder/blind.gif" alt="" width="83" height="210" border="0"><img src="../bilder/schliessen2.gif" alt="" width="73" height="20" border="0" align="right"></a></td><td width="230" height="230" id="neuesbild" bgcolor="#999999"><img name="rahmen" id="newpics" src="../bilder/blind.gif" width="230"  border= "0" alt="" ></td><td width="83" height="230" bgcolor="#999999" ><a href="#" onClick="if(document.all)this.blur();do_pic();return false;"><img src="../bilder/blind.gif" alt="" width="83" height="210" border="0"><img src="../bilder/schliessen2.gif" alt="" width="73" height="20" border="0" align="left"></a></td></tr><tr><td width="83" height="80" bgcolor="#999999"><img src="../bilder/blind.gif" alt="" width="1" height="80" border="0"></td><td class="newtext" width="230" height="80" id="neuerText" bgcolor="#999999">'+text[stelle]+'&nbsp;</td><td width="83" height="80" bgcolor="#999999">&nbsp;</td></tr><tr><td width="83" height="17"><img src="../bilder/eckeL.gif" alt="" width="83" height="17" border="0"></td><td width="230" height="17" bgcolor="#999999"><img src="../bilder/blind.gif" alt="" width="230" height="17" border="0"></td><td width="83" height="17"><img src="../bilder/eckeR.gif" alt="" width="83" height="17" border="0"></td></tr></table>');
eval("document.layers['pic1'].document.images['rahmen'].src = '../bilder/bilderphp/"+bildsrc+"'");
document[lay].document.close();

} 
if (ns6) {
document.getElementById("newpics").src ="../bilder/bilderphp/"+bildsrc+"";
over = document.getElementById([lay]); 
range = document.createRange(); 
range.setStartBefore(over); 
domfrag = range.createContextualFragment(text[stelle]); 
while (over.hasChildNodes()) { 
over.removeChild(over.lastChild); 
} 
over.appendChild(domfrag); 
   } 
}  



function wechsel2(bilds,inhalt){


document.getElementById("neuesbild").innerHTML="<img width=\"230\" height=\"230\" src =\"../bilder/bilderphp/"+bilds+"\" >";

document.getElementById("neuerText").innerHTML= ""+ inhalt+"";

}





var tpos= new Array();
var tdir= new Array();
var mpos= new Array();
var mdir= new Array();
var delay =17;
var delayb =3;
var anz_menu = 6;
var anz_pic = 5;
var stopmenu = 79;
var tempo = -12;
var Anz_ebenen = 1;
b = new Array();
for(x=0 ;x < anz_menu;x ++){
b[x] = new Image();
b[x].src ="bilder/nav"+(x+1)+".gif";}

function init(){
 
for (i=1 ; i<= anz_menu ; i++){
    tpos[i] = -209;
    tdir[i] = tempo;
     mpos[i] = -325;
    mdir[i] = -32;
    eb1= new dObj("mousebottom");

    eb2= new dObj("pic1");

    ebene = new Array;

    ebene[1] =eb1;
	
}
}
function do_navi(menu){
tdir[menu]=-tdir[menu];
	if(tpos[menu]<=-209 || tpos[menu]>=stopmenu)
		beweg_menu(menu);
   
	
}

 
function do_menu(menu) 
 
{for(i=1;i<= anz_menu;i++){
   
	if(menu != i && tpos[i]>-209)
	{
		tdir[i]=tempo;
		if(tpos[i]>=stopmenu)
         
			beweg_menu(i);}}
	

	tdir[menu]=-tdir[menu];
	if(tpos[menu]<=-209 || tpos[menu]>=stopmenu)
		beweg_menu(menu);
}

function beweg_menu(menuzahl)
{
	tpos[menuzahl]+=tdir[menuzahl];
    var uthema = "menu"+menuzahl;
    
	if(document.layers)	document.layers[uthema].top = tpos[menuzahl];
	if(document.all) document.all[uthema].style.top = tpos[menuzahl];
	if(document.documentElement) document.getElementById(uthema).style.top = tpos[menuzahl];
	if(tpos[menuzahl]>-209 && tpos[menuzahl]<stopmenu)
	
		setTimeout("beweg_menu("+menuzahl+")", delayb);
}




var anz_pic = 5;
neu = new Array();
for(x=0 ;x < anz_pic;x ++)
{
neu[x] = new Image();
neu[x].src ="bilder/button"+(x+1)+".gif";    
 }
 
 function do_pic(pic){ 
 
for(i=1;i<= anz_pic;i++){
   
	if(pic != i && mpos[i]>-325)
	{
		mdir[i]=-32;
		if(mpos[i]>=78)
         
			beweg_pic(i);
	}
}
	mdir[pic]=-mdir[pic];
	if(mpos[pic]<=-325 || mpos[pic]>=78)
		beweg_pic(pic);
}

function beweg_pic(piczahl)
{
	mpos[piczahl]+=mdir[piczahl];
    var pthema = "pic"+piczahl;
    
	if(document.layers)	document.layers[pthema].top = mpos[piczahl];
	if(document.all) document.all[pthema].style.top = mpos[piczahl];
	if(document.documentElement) document.getElementById(pthema).style.top = mpos[piczahl];
	if(mpos[piczahl]>-325 && mpos[piczahl]<78)
	
		setTimeout("beweg_pic("+piczahl+")", delay);
}
    

function blende(ort){
for(i=1;i<=Anz_ebenen;i++){

  ebene[i].verstecke();
        }

  if(ort != ""){

  ort.zeige();

   } 
   }
 
var flag_fertig = '0';

var flag_over = '0';

function bilder_laden() {

if (document.images) {

 var pfad = arguments['0'];

  for (var i=1; i<arguments.length; i++) {

   if (arguments[i] == 'schluss') flag_fertig = "1";
   
    else {
    
     eval(arguments[i]+' = new Image()')

     eval(arguments[i]+'.src = pfad+"'+arguments[i]+'.gif";') } } } }
 
bilder_laden('bilder/','nav1','nav2','nav3','nav4','nav5','lesen','uebersicht','kontakt','mail','lognew','aktuell','obenorange','blind','linieblaugraud','lauftleiste','schluss');

function wechsel(){

 if (document.images) {

      if (document.layers){   
      document.layers[arguments[2]].document[arguments[0]].src = eval(arguments[1]).src;
      
      }
      else
      {
		document[arguments[0]].src = eval(arguments[1]).src;
		}
    }
}
 		
 		
	                        
