// JavaScript Document

 function getSize() {  
     var myWidth = 0, myHeight = 0;  
   
     if( typeof( window.innerWidth ) == 'number' ) {  
         //Non-IE  
         myWidth = window.innerWidth;  
         myHeight = window.innerHeight;  
     } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {  
         //IE 6+ in 'standards compliant mode'  
         myWidth = document.documentElement.clientWidth;  
         myHeight = document.documentElement.clientHeight;  
     } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {  
         //IE 4 compatible  
         myWidth = document.body.clientWidth;  
         myHeight = document.body.clientHeight;  
     }  
     //alert(myWidth);
     return myWidth;  
 } 


function einmitten() { 

	if (navigator.appName == "Microsoft Internet Explorer") {

		var width = null;
		var ausgangswert = null;
		
		width = getSize();
		//alert(width);
		
		ausgangswert = width - 794;
		//alert(ausgangswert);
		
			if (ausgangswert > 1) {
				var corrigenda = null;
				corrigenda = ausgangswert / 2;
				//alert(corrigenda);
				//document.getElementById('container').style.marginLeft = corrigenda + 'px';
				//document.getElementById('container').style.marginRight = corrigenda + 'px';
			}
	} else {
		//alert(window.innerWidth);
		//document.getElementById('banner').style.display = 'none';
	}
}

function getWindowWidth(win) { 
	if (win == undefined) win = window; 
	if (win.innerWidth) { 
		return win.innerWidth; 
		} else { 
		if (win.document.documentElement && win.document.documentElement.clientWidth) { 
			return win.document.documentElement.clientWidth; } 
			return win.document.body.offsetWidth; } 
}



//window.onload = einmitten();





function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(einmitten);
addLoadEvent(function() {
  /* more code to run on page load */ 
});
