function switchFaq(fid){ xAddEventListener(window, "resize", adjustLayoutDyn(fid), false); } function adjustLayoutDyn(fid) { // ermittle hoehe var HeightSpalte1 = xHeight("conLeft"); var HeightSpalte2 = xHeight("conMitte"); var maxHeight = Math.max(HeightSpalte1, HeightSpalte2); var faqAntwort = document.getElementById("faq_" + fid); var switchLink = document.getElementById("faqSwitch_" + fid); if(faqAntwort.style.display == "none"){ faqAntwort.style.display = ""; switchLink.innerHTML = "Close"; switchLink.title = "Close"; switchLink.className = "faqClose"; var HeightFaq = xHeight("faq_" + fid)+10; maxHeight = maxHeight+HeightFaq; }else{ var HeightFaq = xHeight("faq_" + fid)+50; faqAntwort.style.display = "none"; switchLink.innerHTML = "Read what Sally has to say"; switchLink.title = "Read what Sally has to say"; switchLink.className = "faqOpen"; maxHeight = maxHeight-HeightFaq; } if (moz) document.getElementById('conLeft').style.minHeight = maxHeight + "px"; else document.getElementById('conLeft').style.height = maxHeight + "px"; if (moz) document.getElementById('conMitte').style.minHeight = maxHeight + "px"; else document.getElementById('conMitte').style.height = maxHeight + "px"; if (moz) document.getElementById('context').style.minHeight = maxHeight-56 + "px"; else document.getElementById('context').style.height = maxHeight-56 + "px"; if (moz) document.getElementById('colRight').style.minHeight = maxHeight-56 + "px"; else document.getElementById('colRight').style.height = maxHeight-56 + "px"; } var xCount=false; function adjustLayout() { // ermittle hoehe var HeightSpalte1 = xHeight("conLeft"); var HeightSpalte2 = xHeight("conMitte"); var maxHeight = Math.max(HeightSpalte1, HeightSpalte2); // alert (maxHeight); if (xCount==false){ xHeight("conLeft", maxHeight); xHeight("conMitte", maxHeight); xHeight("context", maxHeight-159); xHeight("colRight", maxHeight-159); xCount=true; } } window.onload = function() { xAddEventListener(window, "resize", adjustLayout, false); adjustLayout(); }