function PreloadNav(LPATH){

    nav_on = new Array();
  	nav_off = new Array();

    PATH = LPATH+ "shared/img/nav/nav_";

  	for(i = 1; i <= 6; i++){
    	nav_on[i] = new Image();
    	nav_on[i].src = PATH+ i +"_on.gif";
    	nav_off[i] = new Image();
    	nav_off[i].src = PATH+ i +"_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 ActNorm(ID,TYPE){

    if(TYPE == 'on'){
    	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 == 'text'){
	    	document.getElementById(ID).className = 'input_def input_2';
        }else{
	    	document.getElementById(ID).className = 'input_def input_1';
        }
    }
}


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


function BlurPulldown(TYPE){

	if(TYPE == 1){
    	document.forms["angebote"].objekt_gebaeudeflaeche.focus();
		document.forms["angebote"].objekt_gebaeudeflaeche.blur();
    }

}


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


function ShowBig(PIC, TEXT){

    var W = X;
    var H = screen.height - 180;
    var TEMPHEIGHT = Y;

    if(H > TEMPHEIGHT){
        H = TEMPHEIGHT;
    }

    var LEFT = (screen.width / 2) - (W / 2);
    var TOP = (screen.height / 2) - (H / 2) - 50;

    var CODE = '<?xml version="1.0" encoding="iso-8859-1"?>'+
    		   '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'+
               '<html xmlns="http://www.w3.org/1999/xhtml">'+
               '<head><title>Detailansicht</title>'+
               '<meta http-equiv="cache-control" content="no-cache" />'+
               '<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />'+
               '<body style="padding: 0px; margin: 0px; text-align: center;"><img onclick="window.close()" src="'+ PIC +'" border="0" alt="Zum Schliessen auf das Bild klicken" title="Zum Schliessen auf das Bild klicken" />'+
               '</td></tr></table></body></html>';

   var GEOM = 'width='+ W +',height='+ H +',left='+LEFT+',top='+TOP+',location=no,menubar=yes,resizeable=no,scrollbars=no,status=no,toolbar=no';
   BIGPIC = window.open('',"BigPicWindow",GEOM);
   BIGPIC.document.open();
   BIGPIC.document.write(CODE);
   BIGPIC.document.close();

}


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


function popupWindow(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';
    window.open(url,"popupWindow",strGeom);
}
