/*
*****************************************
+---------------------------------------+
| scriptlib.js                          |
+---------------------------------------+
| Author: Yves Landert Sota AG          |
| (c)2003 yl@sota.ch                    |
+---------------------------------------+
*****************************************
*/

// FixCssBrowserPlattform
 var index;
 var pfad = "";
 var root = "";

	if(index != true){
		  root = "../";
		} else {
		  root = "site/";
		}
	
	if (navigator.appName.indexOf("Netscape") >= 0 & navigator.userAgent.indexOf("Mac") >= 0) {
		pfad = "css/style_ns_mac.css";
		}
		else if (navigator.appName.indexOf("Explorer") >= 0 & navigator.userAgent.indexOf("Mac") >= 0) {
			pfad = "css/style_ie_mac.css";
		}
		else if (navigator.appName.indexOf("Netscape") >= 0 & navigator.userAgent.indexOf("Win") >= 0) {
			pfad = "css/style_ns.css";
		} else {
		pfad = "css/style.css";
		}
	
	document.write("<link rel='stylesheet' type='text/css' href='"+root+pfad+"'>");
	

/* MouseOver for cellColorChanges */
	function tdOver(myObj) {
		myObj.style.backgroundColor='#DFDFDF';
	 }
	
	function tdOut(myObj) {
		myObj.style.backgroundColor='';	
	 }


/* createTable 100% height for dynamicContent */
 

 var tabBreite = 750;
 var tabBorder = 0;
 var tabSpace = 1;
 var tabPadding = 0;
 var tabAlign = "center";
 var tabBgColor = "#ffffff";

	function fensterweite() {
			 if (window.innerWidth) {
				 return window.innerWidth; 
				 }
			 else if (document.body && document.body.offsetWidth){
					  return document.body.offsetWidth; 
					 }
			 else {
				 return 0;
				}
			}

	function fensterhoehe() {
	 if (window.innerHeight){
	     return window.innerHeight;
		 }
	 else if (document.body && document.body.offsetHeight){
	           return document.body.offsetHeight; 
			   }
	 else{
	    return 0;
		}
	}

	function neuAufbau() {
		 if (weite != fensterweite() || hoehe != fensterhoehe()){
		 window.history.go(0);
		 }
	}
		/* BrowerCheck  und Ausgabe der Tabelle */
		if(navigator.appName=='Netscape'){
			 hoehe = window.innerHeight;
			 tabelle = "<table width='"+tabBreite+"' height='"+hoehe+"' border='"+tabBorder+"' cellspacing='"+tabSpace+"' cellpadding='"+tabPadding+"' align='"+tabAlign+"' bgcolor='"+tabBgColor+"'>";
			} else {
			 tabelle = "<table width='"+tabBreite+"' height='100%' border='"+tabBorder+"' cellspacing='"+tabSpace+"' cellpadding='"+tabPadding+"' align='"+tabAlign+"' bgcolor='"+tabBgColor+"'>";
		    }
			
	/* Überwachung von Netscape initialisieren */
	if(!window.weite && window.innerWidth) {
	   window.onresize = neuAufbau;
	   weite = fensterweite();
	   hoehe = fensterhoehe();
	  }


  if(navigator.appName=='Netscape'){
 
   spalte = "<td valign='top' height='100%"+-50+"' width='300' bgColor='#333333'>";
  } else {
   //spalte = "<td valign='top' height='100%' width='300' bgColor='#333333'>";
   ieHoehe = this.height - 50;
   spalte = "<td valign='top' height='"+ieHoehe+"' width='300' bgColor='#333333'>";
  }




		