function highlight(clName) {
    anchors = document.getElementsByTagName("a");
    cur_url = document.URL;
    if (cur_url.indexOf("#") > 0) {
        cur_url = cur_url.substr(0,cur_url.indexOf("#"));
    }
    for(var i = 0; i < anchors.length; i++) {
        if (anchors[i].className == clName) {
            href = anchors[i].href;
            if ((cur_url == href)) {
                anchors[i].className = clName + " " + clName + "_active";
            }
        }
    }
}

function prefered_selected() {
    if (document.getElementById("prefered").selectedIndex == 6) {
        document.getElementById("partner_div").style.display = "block";
    } else {
        document.getElementById("partner_div").style.display = "none";
    }
}

function sendmail_loaded() {
    dURL = document.URL;
    indOf = dURL.indexOf("#apartment_page");
    if (indOf>0) {
        document.getElementById("prefered").selectedIndex = dURL.substr(dURL.length-1);
    }
}
