// Nords?en Oceanarium 2010 - JavaScript 

// Flash bg covering the whole screen area
function setFlashBGHeight(){
	var numPageHeight = $("#MainWrapper").height();
	var numWinHeight = window.innerHeight;
	var numWindowHeight = $(window).height();
        var numOutputHeight=null; 
	if(numPageHeight>numWindowHeight){ numOutputHeight = numPageHeight; }
	else{numOutputHeight = numWindowHeight;}
	$("#NZWebBGFlash").css("height", numOutputHeight + "px");
	$("#FlashWrapper").css("height", numOutputHeight + "px");
}

//Open microsites in a new window
function openMicrosite(url) {
window.open(url,"ExplorerTest","height=768, width=1024, resizable=0, menubar=no");
}

//Used to open (in a new window) all a:tags including with "http://www.nordsoenskoletjeneste.dk/"
$(function() {
  $("a[href^=http://www.nordsoenskoletjeneste.dk/]").attr("target","_blank");
  
  // IE7 z-index hack
	if($.browser.msie == true && parseInt($.browser.version) < 8){ var zIndexNumber = 1000; $('div').each(function() { $(this).css('zIndex', zIndexNumber); zIndexNumber -= 10; }); }
});