// ZA

/* Hoehe der Website berechnen, um das div WALLPAPER auszurichten  */
function getDocHeight() {
    var D = document;
    return Math.max(
        Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
        Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
        Math.max(D.body.clientHeight, D.documentElement.clientHeight)
    );
}


/*  Werbemittel(-plätze) ausrichten */
/*  Werbemittel(-plätze) ausrichten */
function setWallpaper(){   
    var ADContainer = document.getElementById('Ads_OV_BS');
    var wallpaper = document.getElementById('WALLPAPER');
	var Sky = document.getElementById('Ads_OV_SKY');

    var computedStyle;

    // Browserabhängige Abfrage bezüglich Stylesheetinformationen
    if (typeof wallpaper.currentStyle != 'undefined') 
      { computedStyle = wallpaper.currentStyle; }
    else
      { computedStyle = document.defaultView.getComputedStyle(wallpaper, null); }

    if (computedStyle['backgroundColor'] != 'transparent') {

      ADContainer.style.left = "30px";
      ADContainer.style.width = "791px";
      ADContainer.style.top = "0px";
      ADContainer.getElementsByTagName('div')[0].style.left = "769px";

      var banner_top_l = document.getElementById('banner_top_l');
	  var banner_top = document.getElementById('banner_top');
	  banner_top.style.height = "90px";
      banner_top_l.style.marginTop = "2px";
      banner_top_l.style.height = ADContainer.style.height;
	  banner_top_l.style.backgroundImage = 'none';
      banner_top_l.style.backgroundColor = computedStyle['backgroundColor'];

      if (CLIENT == 'IE6' || CLIENT == 'IE7' || CLIENT == 'IE8'){
		if ( CLIENT == 'IE6' || CLIENT == 'IE7'){
			wallpaper.style.zIndex = -1;
			banner_top_l.style.marginTop = '-13';
		} else {
			banner_top_l.style.marginTop = '-2';
		}
        wp_width = document.body.offsetWidth-774 + "px";
      } else {
		banner_top_l.style.marginTop = '1px';
        wp_width = document.documentElement.offsetWidth-788 + "px";
      }
        wallpaper.style.width = wp_width;
        wallpaper.style.height = getDocHeight()+ 32 + "px";
		wallpaper.style.visibility = "visible";
		Sky.style.visibility = "hidden";
    }
}

