function resizeDiv() {
	// Inline oder externes CSS
	var sky_left = (ad_sky.style.left=="") ? getStyle(ad_sky, "left") : ad_sky.style.left;
	// Sky-DIV dynamisch anpassen
	if (window.innerWidth) {
		// Firefox und Konsorten
		var test_scrollbar = (window.innerHeight<=document.body.scrollHeight) ? 17 : 0;
		ad_sky.style.width = (window.innerWidth - sky_left.substr(0, sky_left.length-2) < min_width) ? min_width - test_scrollbar + "px" : window.innerWidth - sky_left.substr(0, sky_left.length-2) - test_scrollbar + "px";
		ad_sky.style.height = document.body.scrollHeight + "px";
		ad_sky_inner.onmouseover = function() { ad_sky.onclick = ""; };
		ad_sky_inner.onmouseout = function() { ad_sky.onclick = function() { window.open(adclick, ''); }}
		ad_lboard_inner.onmouseover = function() { ad_lboard.onclick = ""; };
		ad_lboard_inner.onmouseout = function() { ad_lboard.onclick = function() { window.open(adclick, ''); }}
	} else if (document.documentElement && document.documentElement.clientWidth) {
		// IE Standard
		ad_sky.style.width = (document.documentElement.clientWidth -
		sky_left.substr(0, sky_left.length-2) < min_width) ? min_width + "px" : document.documentElement.clientWidth - sky_left.substr(0, sky_left.length-2) + "px";
		ad_sky.style.height = document.body.scrollHeight + "px";
	} else {
		// Quirks Mode
		ad_sky.style.width = (document.body.clientWidth - sky_left.substr(0,
		sky_left.length-2) < min_width) ? min_width + "px" : document.body.clientWidth -
		sky_left.substr(0, sky_left.length-2) + "px";
		ad_sky.style.height = document.body.scrollHeight + "px";
	}
}
function getStyle(oElm, strCssRule) {
	var strValue = "";
	if (document.defaultView && document.defaultView.getComputedStyle) {
		strValue = document.defaultView.getComputedStyle(oElm,"").getPropertyValue(strCssRule);
	} else if(oElm.currentStyle) {
		strCssRule = strCssRule.replace(/\-(\w)/g, function (strMatch, p1){ return p1.toUpperCase(); });
		strValue = oElm.currentStyle[strCssRule];
	}
	return strValue;
}

function checkWallpaper() { 
  if (typeof(adtype) != 'undefined') { 
    if (adtype == 'wallpaper') { 
                        
			document.getElementById("superbanner-inner").style.textAlign = "right";  
			document.getElementById('sky-inner').className = 'Wallpaper';
    } 
    if (adtype == 'expwallpaper') { 

			document.getElementById('superbanner-inner').className = 'expWallpaper';
			document.getElementById('skyscraper').className = 'expWallpaper';
			
    } 
  } 
  if (typeof(bgcolor) != 'undefined' && bgcolor != null) { 
	
		document.getElementById('superbanner-top').style.backgroundColor = bgcolor;
		document.getElementById('skyscraper').style.backgroundColor = bgcolor;

  } 
  if (typeof(bgimage) != 'undefined' && bgimage != null) { 
	
		document.getElementById('superbanner-top').style.backgroundImage = bgimage;
		document.getElementById('skyscraper').style.backgroundImage = bgimage;

  } 
  if (typeof(adclick) != 'undefined' && adclick != null) { 
	ad_lboard = document.getElementById('superbanner-top');
	ad_lboard_inner = document.getElementById('superbanner-inner');
	ad_lboard.style.cursor = "pointer";
	ad_lboard.onclick = function() { window.open(adclick, ''); }
	ad_sky = document.getElementById('skyscraper');
	ad_sky_inner = document.getElementById('sky-inner');
	min_width = ad_sky.offsetWidth;
	ad_sky_inner.style.width = ad_sky.offsetWidth + "px";
	ad_sky_inner.style.height = ad_sky.offsetHeight + "px";
	ad_sky.style.cursor = "pointer";
	ad_sky.onclick = function() { window.open(adclick, ''); }
	resizeDiv();
	window.onresize = resizeDiv;
  } 
} 

