function adCorrection(adName) {
   var bwsr = navigator.userAgent.toLowerCase();
   if($(adName).offsetHeight > 50){
	   switch(adName){
           case 'FlexTop' : $('#container').style.margin = '111px 0 0 0';
                            $('#'+adName+'View').style.top = '10px';
							if ($('#FlexSky')!=undefined) { $('#FlexSky').style.top = '111px'; }
                            break;
           default : break;
       }
   } else { $(adName).style.display = 'none'; }
}

function moveca(Source,movepx) {
	var SourceLayer = document.getElementById(Source);
    var TargetLayer = document.getElementById(Source+"View");
	var bwsr = navigator.userAgent.toLowerCase();
	var addpx = 0;

	if (SourceLayer && TargetLayer){
			if (TargetLayer.offsetTop) {
				SourceLayer.style.top = ((bwsr.indexOf("msie") > -1)) ? TargetLayer.offsetTop + movepx + 'px' : TargetLayer.offsetTop + movepx + 'px';
			}
			if (TargetLayer.offsetLeft) {
				SourceLayer.style.left = TargetLayer.offsetLeft + addpx +'px';
			}
	}
}

function moveSiteTop() {
	var ih = $("#FlexTop >*:not(script)").length;
    var rwead = $('#rwe').innerHeight();
    var iaasite = $('#iaa_datasheet').innerHeight();
    if((ih <1 && rwead < 5 && iaasite < 5 )) {
		$('#wrapper').addClass("nomargin");
		moveca('Ca',0);
		if (document.getElementById("Ca2") != undefined) {
			moveca('Ca2',10);
		}
	}
}
function zeigeWerbemittel() {
	window.setTimeout("moveSiteTop()", 400);

	if (document.getElementById("Ca") != undefined) {
		window.setTimeout("moveca('Ca',100)", 200);
	}

	if (document.getElementById("Ca2") != undefined) {
		window.setTimeout("moveca('Ca2',100)", 250);
	}

}

