


    function printpage() {
        window.print();
    }

    function setFooter() {
        var curHeight = document.getElementById("top").offsetHeight + document.getElementById("menu").offsetHeight + document.getElementById("content").offsetHeight;
            //var curHeight = document.getElementById("inner").offsetTop+document.getElementById("inner").offsetHeight; //geht nicht im Firefox
        var viewHeight = document.getElementsByTagName('html')[0].offsetHeight;

            //im IE den Margin-Bottom 30px berücksichtigen
        if (window.innerWidth == undefined) {
            //curHeight += 30;
            curHeight = document.getElementById("inner").offsetHeight;
    //            alert("IE");
        }
                 
        if (curHeight > viewHeight) {
            document.getElementById("footer").style.position = "relative";
            dojo.byId("scopeShadow").style.height = document.getElementById("scope").offsetHeight + "px";
        } else {
            dojo.byId("scopeShadow").style.height = document.getElementById("scope").offsetHeight + "px";
        }
    }

    function setBoxHeight() {
        var hl = document.getElementById("leftVacCont").offsetHeight;
        var hr = document.getElementById("rightVacCont").offsetHeight;

        if (hl > hr) {
            document.getElementById("rightVacCont").style.height = hl + "px";
        } else {
            document.getElementById("leftVacCont").style.height = hr + "px";
        }
    }


    //  +++++ VACANCY +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    var highlightedObject = null;

    /*function selectStelle(val, status, id) {
        document.vacancyForm.stelle.value = val;
        document.vacancyForm.status.value = 1;
        doVacancyAction(status, 1, id);
    }

    function selectOrt(val, status, id) {
        document.vacancyForm.ort.value = val;
        document.vacancyForm.status.value = 2;
        doVacancyAction(status, 2, id);
    } */


    function doVacancyAction(status, statID, id) {
        if (status != 0 && status != statID) {
            if (highlightedObject != null) {
                highlightedObject.className = "lo";
            }
            highlightedObject = document.getElementById(id);
            highlightedObject.className = "hi";
        } else {
            document.vacancyForm.submit();
        }
    }


    function clearVacancyForm() {
        highlightedObject = null;
        document.vacancyForm.stelle.value = "";
        document.vacancyForm.ort.value = "";
        document.vacancyForm.status.value = 0;
        document.vacancyForm.submit();
    }

    
    function setShadow() {
        var myWidth = 0, myHeight = 0;
        if( typeof( window.innerWidth ) == 'number' ) {
            //Non-IE
            myWidth = window.innerWidth;
            myHeight = window.innerHeight;
        } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
            //IE 6+ in 'standards compliant mode'
            myWidth = document.documentElement.clientWidth;
            myHeight = document.documentElement.clientHeight;
        } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
            //IE 4 compatible
            myWidth = document.body.clientWidth;
            myHeight = document.body.clientHeight;
        }


        //dojo.byId("scopeShadow").style.height = myHeight*2 + "px";
        //alert(dojo.byId("wrap").style.height);
    }

    // Sortiert die Liste
    function bubbleSortList(myList) {
        var x, y, holder;
        for(x = 0; x < myList.length; x++) {
            for(y = 0; y < (myList.length-1); y++) {
                if(myList[y].name > myList[y+1].name) {
                    holder = myList[y+1];
                    myList[y+1] = myList[y];
                    myList[y] = holder;
                }
            }
        }
        return myList;
    }

    // Window Onload
    dojo.addOnLoad(function(){
        setShadow();
    });