if(document.all) {
	k = -3;
}
else {
	k = -1;
}

function balanceHeight(mode) {
	if(document.getElementById("textcontent").offsetHeight < 1 || (mode != "noimg" && typeof document.getElementsByName("contentimg")[0] != "undefined" && document.getElementsByName("contentimg")[0].height < 1)) {
		setTimeout("balanceHeight(\""+mode+"\")",100);	
	}
	else {	
		textcontentHeight = document.getElementById("textcontent").offsetHeight;
		contactHeight = document.getElementById("landkontakt").offsetHeight;
		
		if(mode == "noimg" || (typeof document.getElementsByName("contentimg")[0] == "undefined")) {
			landimgHeight = 0;
		}
		else {
			landimgHeight = document.getElementsByName("contentimg")[0].height;	
		}	
		
		contacttextHeight = document.getElementById("landkontakttext").offsetHeight;
		
		if(textcontentHeight + k > contactHeight + landimgHeight) {			
			contactHeight = textcontentHeight + k - landimgHeight;			
			contactPadding = (contactHeight - contacttextHeight);

			paddingTop = contactPadding / 2;
			paddingBottom = paddingTop;
			
			if(landimgHeight == 0) {		// ohne bild in re spalte
				if(typeof document.getElementsByName("contentimg")[0] != "undefined") {
					document.getElementById("landkontakt").style.borderTop = "1px solid #bedddf";				
				}		
				else {						// szenario mit qf-header 
					paddingTop = 0;
					document.getElementById("landkontakt").style.borderBottom = "0";				
				}
			}
			else {
				setTimeout("fixOpera()",1000);
			}
			
			document.getElementById("landkontakt").style.paddingTop = paddingTop+"px";
			document.getElementById("landkontakt").style.paddingBottom = paddingBottom+"px";			
		}
		else if(textcontentHeight + k < contactHeight + landimgHeight) {
			textcontentHeight = contactHeight + landimgHeight + k;
			document.getElementById("textcontent").style.height = textcontentHeight+"px";
		}		
   }
}

function fixOpera() {
	textcontentHeight = document.getElementById("textcontent").offsetHeight;
	contactHeight = document.getElementById("landkontakt").offsetHeight;
	
	if(typeof document.getElementsByName("contentimg")[0] == undefined) {
		landimgHeight = document.getElementsByName("contentimg")[0].height;
	}
			
	if(textcontentHeight + 15 < contactHeight + landimgHeight) {		
		document.getElementById("landkontakt").style.paddingTop = "20px";
		document.getElementById("landkontakt").style.paddingBottom = "22px";		
	}
}


