function PreloadNav(strPrePath){
  
  nav_on = new Array();
  nav_off = new Array();

  var PFAD = "/xhtml/shared/img/nav/nav_";

  for(i = 1; i <= 6; i++){
    nav_on[i] = new Image();
    nav_on[i].src = PFAD + i +"_on.gif";
    nav_off[i] = new Image();
    nav_off[i].src = PFAD + i +"_off.gif";
  }

  var APFAD = "/xhtml/shared/img/";
  arrow_d_on = new Image();
  arrow_d_on.src = APFAD + "arrow_down_1_on.gif";
  arrow_d_off = new Image();
  arrow_d_off.src = APFAD + "arrow_down_1_off.gif";

  arrow_u_on = new Image();
  arrow_u_on.src = APFAD + "arrow_up_1_on.gif";
  arrow_u_off = new Image();
  arrow_u_off.src = APFAD + "arrow_up_1_off.gif";

  reset_on = new Image();
  reset_on.src = APFAD + "reset_on.gif";
  reset_off = new Image();
  reset_off.src = APFAD + "reset_off.gif";

}


////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////


function NavOnOff(IMG,TYP){
  	
  	if(TYP == 'on'){
    	document.images['nav_'+ IMG].src = nav_on[IMG].src;
  	}else if(TYP == 'off'){
    	document.images['nav_'+ IMG].src = nav_off[IMG].src;
  	}
  	
}

     
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
  

function ArrowOnOff(AIMG,DIREC,TYP){
    
    if(TYP == 'on'){
        if(DIREC == 'd'){
            document.images[AIMG].src = arrow_d_on.src;
        }else if(DIREC == 'r'){
            document.images[AIMG].src = reset_on.src;
        }else{
            document.images[AIMG].src = arrow_u_on.src;
        }
    }else if(TYP == 'off'){
        if(DIREC == 'd'){
            document.images[AIMG].src = arrow_d_off.src;
        }else if(DIREC == 'r'){
            document.images[AIMG].src = reset_off.src;
        }else{
            document.images[AIMG].src = arrow_u_off.src;
        }
    }
    
}
 

//////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////



function ShowHide(ID,WHAT){

  	if(WHAT == 'show'){
    	document.getElementById(ID).style.display = 'inline';
    	document.getElementById(ID+'_bttn_on').style.display = 'none';
    	document.getElementById(ID+'_bttn_off').style.display = 'inline';
  	}else if(WHAT == 'hide'){
    	document.getElementById(ID).style.display = 'none';
    	document.getElementById(ID+'_bttn_on').style.display = 'inline';
    	document.getElementById(ID+'_bttn_off').style.display = 'none';
  	}

} 


//////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////

 
function LoadHide(TABS){

  	for(i = 1; i <= TABS; i++){
    	document.getElementById('tab'+i).style.display = 'none';
  	} 
  	
}


//////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////


function openPopup(url){

    var strGeom = 'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,left=100,top=100';
    var strUrl = '/xhtml/shared/php/popup.inc.php?file='+ url;
   	/* var strUrl = 'http://www.hikelcom.de/kunden/linden-cafe/website/shared/php/popup_image.inc.php?lang=de&file='+ url; */
    window.open(strUrl, "popupWindow", strGeom);

}


//////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////

 
function PicBorderOnOff(OBJ, TYP){

    if(TYP == 'on'){
        document.getElementById("pic_"+OBJ).className = 'td_picgal_on';
    }else if(TYP == 'off'){
		document.getElementById("pic_"+OBJ).className = 'td_picgal_off';
    }
}


//////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////


function ActNorm(ID,TYPE){

    if(TYPE == 'on'){
        if(ID == 'senden'){
    		document.getElementById(ID).className = 'input_def input_send_act';
        }else if(ID == 'text'){
	    	document.getElementById(ID).className = 'input_def input_2_act';
        }else{
	    	document.getElementById(ID).className = 'input_def input_1_act';
        }
    }else{
        if(ID == 'senden'){
    		document.getElementById(ID).className = 'input_def input_send_off';
        }else if(ID == 'text'){
    		document.getElementById(ID).className = 'input_def input_2_off';
        }else{
	    	document.getElementById(ID).className = 'input_def input_1_off';
        }
    }
}

