function PreloadNav(){

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

  	var PFAD = "../shared/img/nav/";

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

    subnav_on = new Image();
    subnav_on.src = PFAD +"subnav_arrow_on.gif";
    subnav_off = new Image();
    subnav_off.src = PFAD +"subnav_arrow_off.gif";

  	var PFAD2 = "../shared/img/";

    print_on = new Image();
    print_on.src = PFAD2 +"bttn_print_on.gif";
    print_off = new Image();
    print_off.src = PFAD2 +"bttn_print_off.gif";

    top_on = new Image();
    top_on.src = PFAD2 +"bttn_top_on.gif";
    top_off = new Image();
    top_off.src = PFAD2 +"bttn_top_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 TpOnOff(IMG,TYP){

    if(TYP == 'on'){
        document.images[IMG].src = eval(IMG +'_on.src');
  	}else if(TYP == 'off'){
    	document.images[IMG].src = eval(IMG +'_off.src');
  	}
}


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


function SubNavOnOff(IMG,TYP){
  if(TYP == 'on'){
    document.images['subnav_'+ IMG].src = subnav_on.src;
    document.getElementById('td_sub_'+ IMG).style.backgroundColor = "#333385";
  }else if(TYP == 'off'){
    document.images['subnav_'+ IMG].src = subnav_off.src;
    document.getElementById('td_sub_'+ IMG).style.backgroundColor = "rgb(0,0,102)";
  }
}


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


function ActNorm(ID,TYPE){

    if(TYPE == 'on'){
    	if(ID == 'text'){
	    	document.getElementById(ID).className = 'input_def input_2_act';
        }else if(ID == 'senden'){
	    	document.getElementById(ID).className = 'input_def input_1_act_b';
        }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 DoCheck(BOX){

	document.forms[0].elements[BOX].click();
}



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



function BlurPulldown(){

	document.forms[0].realname.focus();
	document.forms[0].realname.blur();
}



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


function ShowBig(PIC,X,Y){

    var W = X + 20;
    var H = Y + 60;

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

    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>Bildvergrößerung | Karosserie- und Fahrzeugbau Dirk Höhne</title>'+
               '<meta http-equiv="cache-control" content="no-cache" />'+
               '<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />'+
               '<link rel="stylesheet" type="text/css" href="../shared/css/styles.css" />'+
               '<body class="text_1" style="text-align : right; background-color : rgb(229,229,229);">'+
               '<img class="pic_border_1" src="'+ PIC +'" width="'+ X +'" height="'+ Y +'" border="0" alt="" /><br />'+
               '<br />&nbsp;&nbsp;<a href="javascript:self.close()">Fenster schliessen</a>&nbsp;&nbsp;|&nbsp;&nbsp;&copy; 2006 Karosserie- und Fahrzeugbau D. Höhne&nbsp;&nbsp;'+
               '</body></html>';

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

}

