/* * navigation.js * Copyright (C) 2009 * Author: Rutger Grootenhuis * Created: 13-02-2009 */ var Navigation = { mainUrl : 'http://www.microsoft.com/netherlands/WerkenBijMicrosoft/', currentControlID : null, busy : false, onload : function () { }, showEmployeePage : function (employeeID) { Navigation.started(); var href = Navigation.mainUrl + "collegas/" + employeeID + ".aspx"; location.href = '#employee=' + employeeID; Navigation.navigate(href); }, navigateClick : function (el) { Navigation.navigate(el.href); }, dataVisible : false, navigate : function (href) { Navigation.dataVisible = false; setTimeout("Navigation.showOverlay()", 1000); href = href + "?contentonly=true"; $.get(href, function(data){ Navigation.showData(data); }); }, showData : function (data) { Navigation.dataVisible = true; document.getElementById("NavigationDiv").innerHTML = data; var explorerControl = document.getElementById("ExplorerControl"); var explorerDiv = document.getElementById("ExplorerDiv"); var explorerHeight = document.getElementById("ctl00_ExplorerHeightHiddenField").value; explorerDiv.style.height = explorerHeight + "px"; explorerControl.height = explorerHeight; explorerControl.Content.ExplorerPage.ChangeHeight(explorerHeight); Behaviour.reapply('.NavigationLink'); Behaviour.reapply('.ViewMoreMessages'); Behaviour.reapply('.ViewLessMessages'); Navigation.finished(); }, showOverlay : function () { if (Navigation.dataVisible) return; document.getElementById("OverlayDiv").style.left = (($("#ContentTabel").width() - 935) / 2) + "px"; document.getElementById("OverlayDiv").style.height = $("#ContentTabel").height() + "px"; document.getElementById("OverlayDiv").style.display = "block"; }, started: function() { CssUtils.ie6LinksStatic(); }, finished: function() { CssUtils.ie6LinksRelative(); } } var behaviourRules = { //'.NavigationLink' : function(el) //{ // el.onclick = function() // { // Navigation.navigateClick(el); // return false; // } //} } Behaviour.register (behaviourRules); addLoadEvent(Navigation.onload);