<!--
// JavaScript Document, scripts.js
var F4NActiveContentSets = true;

//Variablen
var agt = navigator.userAgent.toLowerCase(); // convert all characters to lowercase to simplify testing
var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));

//GoogleMaps (GetDirections)
var gdir;
var map;

function F4N_getDirections(uid,table) {

   var TheOldContent = document.getElementById('getdirections');
   if (TheOldContent) {
    TheOldContent.innerHTML = "";
   }

   gdir=new GDirections(map, document.getElementById('getdirections'));
   var saddr = document.getElementById('saddr').value;
   var daddr = document.getElementById('daddr').value;
   gdir.load('from: '+saddr+' to: '+daddr);
}

//Onload
window.onload = function() {

 if (F4NActiveContentSets) {
	//nicht für die Startseite 
  	F4N_SetContentDesignSettings();
	
 }

}

function F4N_SetContentDesignSettings() {

                         //im ausgeloggten Zustand ca. 169px
 var F4N_ContentOffset = 300;
 var F4N_ContentHeightLimit = 0;
 var F4N_ContainerMinHeight = 930;
 var F4N_MaxContainerHeight;

 var theElement = document.getElementById('content');
 var theElement2 = document.getElementById('right');
 if (theElement && theElement2) {
    	
	var F4N_RightBoxHeight = F4N_GetContentHeight('right');
 	var F4N_ContentHeight = F4N_GetContentHeight('content');
	
	//alert(F4N_RightBoxHeight+" | "+F4N_ContentHeight);
	
	if (F4N_ContentHeight > F4N_RightBoxHeight && ((F4N_ContentHeight+F4N_ContentOffset) > F4N_ContainerMinHeight)) {
  		F4N_SetContentHeight(F4N_ContentHeight + F4N_ContentOffset, 0, "right", false);
 	}
  
 }

 //alert((F4N_MaxContainerHeight + F4N_ContentOffset)+"|");

 return true;
}

function F4N_SetContentHeight(F4N_ContentHeight, F4N_Content_TopBox_Diff, IDTag, IsRelativeDiv) {

 var TheElement = document.getElementById(IDTag);

 if (IsRelativeDiv) {
  	TheElement.style.top = (F4N_ContentHeight-F4N_Content_TopBox_Diff)+"px";
 }
 else {
 	if (is_ie) {
  	 document.all[""+IDTag+""].style.height = (F4N_ContentHeight-F4N_Content_TopBox_Diff)+"px"; //IE only
 	}
 	else {
  	 TheElement.style.height = (F4N_ContentHeight-F4N_Content_TopBox_Diff)+"px";
 	}
 }
}

function F4N_GetContentHeight(IDTag) {

 var TheElementHeight = 0;
 if (IDTag) {

  var TheElement = document.getElementById(IDTag);
  if (TheElement) {
                        //Speichert die Höhe eines Elements.
   TheElementHeight = parseInt(TheElement.offsetHeight);
  }
  else TheElementHeight = 0;

 }
 return TheElementHeight;
}

//
-->
