function execJQSetup(url) { var script=document.createElement('script'); script.src=url; var head=document.getElementsByTagName("head")[0], done=false; // Attach handlers for all browsers script.onload=script.onreadystatechange = function(){ if ( !done && (!this.readyState || this.readyState == "loaded" || this.readyState == "complete") ) { done=true; formatAMPage(); } }; head.appendChild(script); } function formatAMPage() { jQuery(document).ready(function() { CheckHeight(); $(".BodyContentContainer").css("visibility", "visible"); $(".FooterBlock").css("visibility", "visible"); jQuery("input[type='image'],input[type='submit'],input[type='button'],a").click(CheckHeight); jQuery("body,img").load(CheckHeight); CollapseSetup(); }); function CheckHeight() { var parent = jQuery('.ColumnContainer'); parent.each(function(index, element) { var kids = jQuery(element).children('div'); var maxheight = 0; kids.each(function(index, element) { if (maxheight < jQuery(element).height()) { maxheight = jQuery(element).height(); } }); jQuery(element).height(maxheight); }); } function CollapseSetup() { jQuery('ul.Collapsing > li:has(ul)').each(function() { var li = jQuery(this); li.contents().filter(function() { return this.nodeType != 1; }).wrap(""); li.addClass("Closed"); li.click(function() { li.toggleClass("Closed"); li.toggleClass("Open"); CheckHeight(); }); li.children("a").mouseover(function() { jQuery(this).addClass("LinkHover"); }); li.children("a").mouseout(function() { jQuery(this).removeClass("LinkHover"); }); }); CheckHeight(); } }