<!-- Hide from old browsers

//
//  head navigaton
//
//  Author             : Mueller, Andre mailto:andre.mueller[at]himmel-blau.com
//  Craeted            : 2002.03.26
//  Revision Author    : 2012.01.03
//  Revision Date      :
//




	
<!--     
     
var site_document_id =""; //** will be set in function pageload
var site_path_images_nav = ""; //** will be set in function pageload with call of function site_image_references_get
var site_path_images = ""; //** will be set in function pageload with call of function site_image_references_get
var site_path_base = ""; //** will be set in function pageload with call of function site_image_references_get
var site_image_reference_name = "head_triscom_logo";  //** this image name has to correspond at least with one image name in header in order to identify ID introduced by GoLive to image names
var site_image_reference_prefix = ""; //** will be set at the same time as site_path_images_nav

var nav_main = new Array();

nav_main[0] = "01";
nav_main[1] = "02";
nav_main[2] = "03";
nav_main[3] = "04";
nav_main[9] = "00";

var nav_main_ref = new Array();

nav_main_ref[0] = "portrait";
nav_main_ref[1] = "kontakt";
nav_main_ref[2] = "leistungen";
nav_main_ref[3] = "regietitel";
nav_main_ref[9] = "";

var nav_sub = new Array ();

nav_sub['000'] = "00";
nav_sub['001'] = "";
nav_sub['010'] = "";
nav_sub['011'] = "";
nav_sub['020'] = "";
nav_sub['021'] = "";
nav_sub['030'] = "";
nav_sub['031'] = "";

nav_sub['100'] = "";
nav_sub['101'] = "";
nav_sub['110'] = "00";
nav_sub['111'] = "";
nav_sub['120'] = "01";
nav_sub['121'] = "";
nav_sub['130'] = "";
nav_sub['131'] = "";

nav_sub['200'] = "";
nav_sub['201'] = "";
nav_sub['210'] = "";
nav_sub['211'] = "";
nav_sub['220'] = "00";
nav_sub['221'] = "";
nav_sub['230'] = "";
nav_sub['231'] = "";

nav_sub['300'] = "00";
nav_sub['301'] = "";
nav_sub['310'] = "03";
nav_sub['311'] = "";
nav_sub['320'] = "05";
nav_sub['321'] = "";
nav_sub['330'] = "06";
nav_sub['331'] = "";

nav_sub['900'] = "";
nav_sub['901'] = "";
nav_sub['910'] = "";
nav_sub['911'] = "";
nav_sub['920'] = "";
nav_sub['921'] = "";
nav_sub['930'] = "";
nav_sub['931'] = "";



   pageLoaded = false;
   onload = pageload ;  

function pageload(){
      if (!pageLoaded) {
      pageLoaded=true;
      site_document_id = site_document_id_get() ;
      site_image_references_get();
      nav_main_actual_id = site_document_id.substr (0,2);
      navigation_update(site_document_id.substr (0,2));
      return; 
      }           
  }


function site_document_id_get (){
      var document_url = document.URL
      var document_name = document_url.substr(document_url.lastIndexOf("/")+1 );
      var document_id = document_name.substring(0, document_name.lastIndexOf(".html"))
	return(document_id);
}

function site_image_references_get(){
	var image_name="";
        image_number = document.images.length;
		for (count=0; count < image_number ; count++){          //** GoLive prefixes image names with an ID for components, the following code finds this prefix
	     	if (document.images[count].name!=null){
	            image_name=document.images[count].name;
	     		image_name_position = image_name.lastIndexOf(site_image_reference_name);
	     		if (image_name_position>-1){
	     			site_image_reference_prefix = image_name.substr(0,image_name_position);
	     			site_path_images_nav = document.images[count].src.substr(0,document.images[count].src.lastIndexOf("/")+1);
	     			site_path_images = site_path_images_nav.substr(0,site_path_images_nav.lastIndexOf("/head")+1);
	     			site_path_base = site_path_images_nav.substr (0,site_path_images_nav.lastIndexOf("/resources")+1);
	     		}
	     	}
		}
		return;	
}

Array.prototype.findInArray = function (value){
	for (prop in this){
  		if  (this[prop]==value){  return(prop);} 
 	 }
 	 return ("");
}

function navigation_update (id){
	nav_main_slot = nav_main.findInArray(id);
	nav_main_slot_document = nav_main.findInArray(site_document_id.substr (0,2));
    
       for(count = 0 ; count < 4; count++ ) {
              nav_image=site_image_reference_prefix+"nav_"+"0"+count.toString();
              if ((count == nav_main_slot) || (count == nav_main_slot_document)) {
              	image_state = "on";
              }
              else{
              	image_state = "off";
			 }
			 image_source = site_path_images_nav+"head_nav_"+nav_main[count]+"."+image_state+".gif";
             if (document[nav_image]){
			 	document[nav_image].src = image_source;
			 }
			 else{
			    document[nav_image]= new Image();
			    document[nav_image].src = image_source;
			 }
       }
       
       var count_col = 0;
       var count_row = 0;
	for (count = 0 ; count <8 ; count++){ 
	       nav_sub_image=site_image_reference_prefix+"nav_sub_"+count_col.toString()+count_row.toString();
	       nav_sub_slot = nav_main_slot.toString()+count_col.toString()+count_row.toString();
	       nav_sub_value = nav_sub[nav_sub_slot];
	       if (nav_sub_value==""){
	      		 image_source = site_path_images+"layout/spacer.gif";
	      	}	 
	       else {
	            if (site_document_id ==(id+"."+nav_sub_value) ){
	         	   image_state  = "on";
	            }
	            else{
	       	   		image_state  = "off";
	       		}
	       	 image_source  = site_path_images_nav+"head_nav_"+id+"."+nav_sub_value+"."+image_state+".gif";
	       	 
	       }
             if (document[nav_sub_image]){
			 	document[nav_sub_image].src = image_source;
			 }
			 else{
			    document[nav_sub_image]= new Image();
			    document[nav_sub_image].src = image_source;
			 }
		count_row++;
		if (count_row == 2) {
			count_col++ ; count_row = 0;
		}
	}	
	return;
}

 var nav_sub_state_value = "";
 var nav_state_value = "";
 var nav_main_actual_id = ""; 

function navigation_set(id) {

      new_location = null;
    
      if (id==""){  
       	   new_location_path_section = nav_main_ref[nav_main.findInArray(nav_main_actual_id)];
           new_location  = site_path_base+new_location_path_section+"/";
       }
       else if (id.length==2){
            new_location_id_sub = nav_sub[nav_main.findInArray(nav_main_actual_id).toString()+id]
            if (new_location_id_sub !=""){
        		new_location_id = nav_main_actual_id+"."+new_location_id_sub;
        		new_location_path_section = nav_main_ref[nav_main.findInArray(nav_main_actual_id)];
        		new_location  = site_path_base+new_location_path_section+"/"+new_location_id+".html";
        	}
       }
       else if (id=="home"){
       		new_location  = site_path_base;
       }
       else if (id=="back"){
       		new_location  = document.referrer;
       }
       else if (id=="top"){
       		new_location  = "#top";
       }       
       else {
       
       }
       
        if (new_location != null) {  
       		window.location.href = new_location;
        }
	
	return;
}

function navigation_over(id) {
	nav_sub_state_value = "";
	nav_state_value = id;
	nav_main_actual_id = id;
	navigation_update(id); 
	return;
}



function navigation_out(id) {
    timerID = setTimeout ("navigation_out_execute("+id+")",100);  // ** the function has to be spanned in order other events can occur
    return;
}

function navigation_out_execute(id){
     if ((nav_state_value-0)==id){
    	 nav_state_value = "";
    	if (nav_sub_state_value == ""){
    		navigation_update(site_document_id.substr(0,2));
		}
	}
	return;
}



var navigation = new Object();
navigation.set = navigation_set;
navigation.over = navigation_over;
navigation.out = navigation_out;


function nav_sub_state_on(id){
	nav_sub_state_value = id;
//	alert ('state_on '+nav_sub_state_value);
	return;
}

function nav_sub_state_off(id){
    timerID = setTimeout ("nav_sub_state_off_execute("+id+")",100);  // ** the function has to be spanned in order other events can occur
    return;
}

function nav_sub_state_off_execute(id){
    // alert ('state_off '+nav_sub_state_value);
    if (((nav_sub_state_value-0)== id) && (nav_state_value == "")){
    	nav_sub_state_value = "";
    	navigation_update(site_document_id.substr(0,2))	
    }
	return;
}


// Stop hiding from old browsers -->

