jQuery(document).ready(    /*     This function gets loaded when all the HTML, not including the portlets, is     loaded.     */        function() {        }        );Liferay.Portlet.ready(    /*     This function gets loaded after each and every portlet on the page.     portletId: the current portlet's id     jQueryObj: the jQuery wrapped object of the current portlet     */        function(portletId, jQueryObj) {        }        );jQuery(document).last(    /*     This function gets loaded when everything, including the portlets, is on     the page.     */        function() {        }        );/** MENU SCRIPT **/var arrMenu = new Array();var visibleMenu = null;var openedMenu = null;var selectedTopMenu = 0;function showOpenedMenu(){    //alert(openedMenu);    if (openedMenu > 0) {        try {            visibleMenu.style.display = 'none';        } catch(e) {        }        visibleMenu = document.getElementById("menu_" + selectedTopMenu);        try {            // visibleMenu.style.display = 'inline';        } catch(e) {        }    }}function createSecondMenu(id) {    openedMenu = id;    for (x = 0; x < arrMenu.length; x++) {        var arrThisMenu = arrMenu[x];        var oDiv = document.createElement("div");        oDiv.style.border = "1px solid red";        var oTable = document.createElement("table");        oTable.cellPadding = "0"        oTable.cellSpacing = "0"        oTable.id = "menu_" + arrThisMenu.id;        oTable.style.display = 'none';        oTable.height = '15px';//        oTable.border=1;        oTable.style.absolute = 'relative';        oTable.style.left = 0;        var oTr = document.createElement("tr");        for (subMenu in arrThisMenu) {            try {                var oTd = document.createElement("td");                oTd.className = "maneuLevel2";                var label = subMenu.split("_")[0];                if (label != "sub")continue;                var submenuId = subMenu.split("_")[1];                var anchor = document.createElement("A");                var tempDiv = document.createElement("div");                anchor.innerHTML = arrThisMenu[subMenu];                if (arrThisMenu['status_' + submenuId] == "open" || arrThisMenu['status_' + submenuId] == "selected") {                    anchor.className = "selected";                }                anchor.href = arrThisMenu['url_' + submenuId];                oTd.appendChild(anchor);                oTr.appendChild(oTd)                if (arrThisMenu['status_' + submenuId] == "selected") {                    openedMenu = arrThisMenu.id;                }            } catch(ex) {                //alert(ex)            }            var oTBody = document.createElement("tbody");            oTable.appendChild(oTBody);            oTBody.appendChild(oTr);            oDiv.appendChild(oTable);        }        document.getElementById("menu_level_2").appendChild(oTable);        //alert(document.getElementById("menu_level_2").innerHTML)    }}function showSubMenu(parent_id) {    //      alert(parent_id);    try {        visibleMenu.style.display = 'none';    } catch(e) {    }    //alert("menu_" + parent_id + "= " + document.getElementById("menu_" + parent_id));    visibleMenu = document.getElementById("menu_" + parent_id);    try {        //        visibleMenu.style.display = 'inline';    } catch(e) {    }}function hideSubMenu() {    //  alert(parent_id);    try {        visibleMenu.style.display = 'none';    } catch(e) {    }    //alert("menu_" + parent_id + "= " + document.getElementById("menu_" + parent_id));    visibleMenu = null;//document.getElementById("menu_" + selectedTopMenu);    try {        //visibleMenu.style.display = 'inline';    } catch(e) {    }}var selectedParent = 0;//global variables that can be used by ALL the function son this page.var inputs;var imgFalse = '/html/themes/hh/images/false.gif';var imgTrue = '/html/themes/hh/images/true.gif';//this function runs when the page is loaded, put all your other onload stuff in here too.function chk_init() {    //    debugger;    replaceChecks();}function replaceChecks() {    //get all the input fields on the page    inputs = document.getElementsByTagName('input');    //cycle trough the input fields    for (var i = 0; i < inputs.length; i++) {        //check if the input is a checkbox        if (inputs[i].getAttribute('type') == 'radio') {            //create a new image            var img = document.createElement('img');            //check if the checkbox is checked            if (inputs[i].checked) {                img.src = imgTrue;            } else {                img.src = imgFalse;            }            //set image ID and onclick action            img.id = 'checkImage' + i;            img.height = "11"            img.width = "11"            //set image            img.onclick = new Function('checkChange(' + i + ')');            //place image in front of the checkbox            inputs[i].parentNode.insertBefore(img, inputs[i]);            inputs[i].onchange = new Function('radioChange(' + i + ')');            //hide the checkbox            inputs[i].style.display = 'none';        }    }}//change the checkbox status and the replacement imagefunction checkChange(i) {    if (inputs[i].checked) {        inputs[i].checked = '';        document.getElementById('checkImage' + i).src = imgFalse;    } else {        inputs[i].checked = 'checked';        document.getElementById('checkImage' + i).src = imgTrue;    }    var oRadios = document.getElementsByName(inputs[i].name);    if (oRadios.length > 1) {        uncheckOthers(inputs[i].name, i);    }}function uncheckOthers(name, notX) {    for (var x = 0; x < inputs.length; x++) {        if (inputs[x].type == "radio" && inputs[x].name == name && x != notX) {            document.getElementById('checkImage' + x).src = imgFalse;        }    }}//window.onload = init;var alertFill = "Udfyld alle felter!"function validateBrochureForm() {    debugger;    if (document.getElementById("navn").value.length == 0) {        alert(alertFill)        document.getElementById("navn").focus();        return false;    } else if (document.getElementById("adresse").value.length == 0) {        alert(alertFill)        document.getElementById("adresse").focus();        return false;    } else if (document.getElementById("postnr").value.length == 0) {        document.getElementById("postnr").focus();        alert(alertFill)        return false;    }    }function openStock(){window.open('http://www.nasdaqomxnordic.com/aktier/shareinformation?Instrument=CSE3284','share' );}