dojo.require("dojo.parser"); dojo.require("dojox.image.Lightbox"); dojo.require("dojox.widget.FisheyeLite"); dojo.require("dijit.form.ComboBox"); dojo.require("dojo.fx"); dojo.require("dojo.fx.easing"); dojo.require("dojo.cookie"); dojo.require("dijit.form.CheckBox"); dojo.require("dijit.Editor"); dojo.require("dijit.Dialog"); dojo.require("dijit.form.Button"); dojo.require("dijit.form.TextBox"); dojo.require("dojox.widget.ColorPicker"); dojo.require("dijit.ProgressBar"); dojo.require("dijit.Tooltip");
var hideLoader = function () { var a = Math.floor(20); jsProgress.update({ maximum: a, progress: 0 }); for (var b = 0; b <= a; b++) setTimeout("jsProgress.update({ progress: " + b + " })", (b + 1) * 25 + Math.floor(Math.random() * 100)); dojo.fadeOut({ node: "preloader", duration: 3E3, onEnd: function () { dojo.style("preloader", "display", "none") } }).play() };
function IsSilverlight() { var a = !1; if (navigator.appName == "Microsoft Internet Explorer") try { new ActiveXObject("AgControl.AgControl"), a = !0 } catch (b) { } else try { navigator.plugins["Silverlight Plug-In"] && (a = !0) } catch (c) { } return a } function loadRightBanner() { var a = IsSilverlight(), b = dojo.byId("silverlightControlHost"); a === !0 ? (dojo.query(".book_item").style("display", "none"), dojo.style(b, "display", "block")) : (dojo.query(".book_item").style("display", "block"), dojo.style(b, "display", "none")) }
dojo.addOnLoad(function () {
    dojo.parser.parse(); hideLoader(); HoverQuestion(); highLightLinks(); dojo.query("img.imgBounce").instantiate(dojox.widget.FisheyeLite, { properties: { height: 1.5, width: 1.5} }); var a = dojo.byId("flyout"), b = dojo.byId("flyout2"), c = dojo.byId("start_link"), d = dojo.byId("ext_links"), f = dojo.byId("close1"), e = dojo.byId("close2"); dojo.style(a, "left", "-10000px"); dojo.style(b, "left", "-10000px"); hover(c, a, f, "145px"); hover(d, b, e, "245px"); colorswitcher(); a = document.getElementById("ext_links_flyout2");
    OpenExternalLinks(a); a = dijit.byId("gradient"); dojo.cookie("gradient") == "ja" ? (a.setValue(!0), setGradient()) : (a.setValue(!1), unsetGradient()); a.onClick = function () { this.checked ? (dojo.cookie("gradient", "ja", { expires: 90 }), setGradient()) : (dojo.cookie("gradient", "nej", { expires: 90 }), unsetGradient()) }; document.getElementById("farg_link").onclick = function () { dojo.style("wrap_colorpicker", { position: "absolute", top: "50px", left: "300px" }) }; document.getElementById("close_colorpicker").onclick = function () {
        dojo.style("wrap_colorpicker",
{ position: "absolute", top: "50px", left: "-10000px" })
    }; loadRightBanner()
}); function highLightLinks() { if (document.getElementById("middle") != null && document.getElementById("middle") != void 0) for (var a = document.getElementById("middle").getElementsByTagName("a"), b = 0; b < a.length; b++) a[b].style.color = "blue", a[b].onmouseover = function () { this.style.color = "green" }, a[b].onmouseout = function () { this.style.color = "blue" } }
function setGradient() { var a = document.getElementById("hd"); a.style.backgroundImage = "url(Images/gradient.png)"; a.style.backgroundPosition = "0 0"; a.style.backgroundRepeat = "repeat-x" } function unsetGradient() { document.getElementById("hd").style.backgroundImage = "none" }
function HoverQuestion() { var a = []; a.push("Poikkimaki.se anv\u00e4nder mycket javascript, vilket kr\u00e4ver en modern webbl\u00e4sare."); a.push("Google's Chrome \u00e4r den snabbaste webbl\u00e4saren,"); a.push("s\u00e5 om du vill ha den snabbaste upplevelsen anv\u00e4nd den."); a.push("Annars \u00e4r Mozilla Firefox en favorit."); new dijit.Tooltip({ connectId: ["question"], label: a.join("<br>") }) }
function OpenExternalLinks(a) { for (var b = a.getElementsByTagName("a"), c = 0; c < b.length; c++) b[c].onclick = function () { var b = this.href, c = window.location.href, c = c.replace("http://", ""), e = c.indexOf("/"); e > 0 && (c = c.substr(0, e)); this.href = "#" + a.id; b.search(c) < 0 ? window.open(b, "", "height=600,width=800,scrollbars=yes,resizable=yes,toolbar=no,menubar=no") : this.href = b } }
function hover(a, b, c, d) { a.onclick = function () { dojo.style(b, "left", d); dojo.fx.wipeIn({ node: b, duration: 1E3, easing: dojo.fx.easing.elasticIn }).play() }; c.onclick = function () { dojo.fx.wipeOut({ node: b, duration: 1E3, easing: dojo.fx.easing.elasticIn }).play(); dojo.style(b, "left", "-10000px") } }
function colorswitcher() { var a = dijit.byId("colorPicker"), b = dojo.cookie("bgcolor"); b == void 0 && b == null ? dojo.cookie("bgcolor", "white", { expires: 90 }) : (b = dojo.cookie("bgcolor"), document.getElementById("body1").style.backgroundColor = b); a.onChange = function (a) { dojo.cookie("bgcolor", a, { expires: 90 }); document.getElementById("body1").style.backgroundColor = a } } function setCookie(a, b) { document.cookie = a + "=" + b }
function getCookie(a) { for (var b = "", c = document.cookie.split(";"), d = 0; d < c.length; d++) { var f = c[d].split("="), e = f[1]; f[0] == a && (b = e) } return b } var Books_ticker = { index: 0 };
