// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

function adjustMenuHeight(theTarget, theElement, home){
	var menu = document.getElementById(theTarget);
        var footer = document.getElementById("footer");
        var oldHeight = menu.offsetHeight;
	if (home) {
		menu.style.height = "595px";
	}
	else {
		var centerdiv = document.getElementById(theElement);
		var height = centerdiv.offsetHeight + 21;
		menu.style.height = height + "px";
                //var newHeight = getHeight("menu");
                var newHeight = menu.offsetHeight;
                if(navigator.appName=="Microsoft Internet Explorer")
                {
                   footer.style.marginTop = (newHeight - oldHeight +25) + "px";
                }
                else
                {
                   footer.style.marginTop = (newHeight + 25) + "px";
                }
                footer.style.marginBottom = "25px";
	}
}

function openWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}
