// Set the initial height
var sliderHeight = "368px";

$(document).ready(function(){

if ($('#leg_navigator_spacer')) {
 
	// Show the slider content
	$('#leg_navigator_spacer').show();
	
	$('#leg_navigator_spacer').each(function () {
		var current = $(this);
		current.attr("box_h", current.height());
	});
	
	$("#leg_navigator_spacer").css("height", sliderHeight);
}
});

function setFlashHeight(newHeight,wmodus,durationflash,state){
			//alert(durationflash);
        	//assuming flashDiv is the name of the div contains flex app.
       		//alert(newHeight);
        	//alert(wmodus)
			//alert(state);
        	//flashContentHolderDiv.wmode = wmodus;
			//alert(newHeight);
			if (state != "showDropDown")
			{
				$("#leg_navigator_spacer").animate({"height": newHeight+"px"}, {duration: durationflash });
			}
			var flashContentHolderDiv = document.getElementById('LEG_PortalNavigator'); 
			flashContentHolderDiv.height = newHeight;
			/*if (jQuery.fn.flash) {
				  $('#leg_navigator_content').flash({ params: {wmode : wmodus, height : newHeight}})
					.html("");
			}*/

	};

