// JavaScript Document

/*
		#---------------------------#
		#		Fenstergrössen		#
		#---------------------------#
*/

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())
    location.href = location.href;
}

/* Überwachung von Netscape initialisieren */
if (!window.Weite && window.innerWidth) {
	window.onresize = neuAufbau;

	Weite = Fensterweite();
	Hoehe = Fensterhoehe();
}

// --- Fenstergröße

//wird bei body onload initialisiert
function Start() {
	
	//Browserinfos
	var spitzname = navigator.appCodeName;
	var name = navigator.appName;
	var version = navigator.appVersion;
  	var sprache = navigator.language;
	if (navigator.appName == "Microsoft Internet Explorer") {
 		var sprache = navigator.browserLanguage;
	}
	var platform = navigator.platform;
	var agent = navigator.userAgent;
	var java = navigator.javaEnabled();
		
/*		var myBrowser = document.createTextNode(name+" ("+spitzname+") "+sprache+agent);
		var Ausgabebereich = document.getElementById("browserInfo");
		Ausgabebereich.appendChild(myBrowser);
*/

	if (agent.indexOf("Internet Explorer") != -1) {
		compatible = 0;
	} else if (agent.indexOf("MSIE") != -1) {
		compatible = 0;
	} else if (agent.indexOf("Firefox") != -1) {
		compatible = 1;
	} else if (agent.indexOf("Safari") != -1) {
		compatible = 0;
	} else if (agent.indexOf("Opera") != -1) {
		compatible = 0;
	} else if (agent.indexOf("Netscape") != -1) {
		compatible = 1;
	}

	//positionieren
	positionMain();
	
}

function positionMain() {
  if (Weite < 975) {
	document.getElementById("nav_bar").style.marginLeft = '15px';
	document.getElementById("headline").style.marginLeft = '15px';
	document.getElementById("content_complete").style.marginLeft = '15px';
	document.getElementById("right-col").style.marginRight = '-15px';
  }
}

/*
		#-----------------------------------#
		#		Fenstergrössen - ENDE		#
		#-----------------------------------#
*/

