window.onload = function() { var smlTips = new Tips($$('.smlTip'), { showDelay: 200, hideDelay: 40, fixed: false, offsets: { x: -50, y: 10 }, className: 'smlTool-tip' }); }
function json() { }; if (window.XMLHttpRequest) { json.jsonCall = new XMLHttpRequest(); }
else if (window.ActiveXObject) { json.jsonCall = new ActiveXObject("Microsoft.XMLHTTP"); }
json.URL = null; json.dataSend = null; json.getPost = "post"; function JSON(url, getPost) {
    if (!getPost) { json.getPost = "get"; }
    json.URL = url; if ((json.jsonCall.readyState == 0) || (json.jsonCall.readyState == 4)) { json.jsonCall.open(json.getPost, json.URL, true); json.jsonCall.send(json.dataSend); setTimeout('processData()', 1); }
    else { alert("not yet"); }
}
function showHideMenu(itemID, stateMarker, selectedItem) {
    var el = document.getElementById(itemID);
    if (el.style.display != 'block') {
        el.style.display = 'block';
        document.getElementById(stateMarker).innerHTML = "-";
    }
    else {
        el.style.display = 'none';
        selectedItem.style.backgroundPosition = 'top';
        document.getElementById(stateMarker).innerHTML = "+";
    }
}
function showHideSearch() {
    var isShowing = document.getElementById('advancedSearch'); if (isShowing.style.display != "block") { isShowing.style.display = 'block'; document['btnAdvancedSearch'].src = "Images/btnSearchAdvanced_o.gif"; }
    else { isShowing.style.display = 'none'; document['btnAdvancedSearch'].src = "Images/btnSearchAdvanced.gif"; }
}
function showDiv(elName) {
    if (document.getElementById('slideshowMap') != null) {
        if (elName == "map") {
            Initialise();
            document.getElementById('slideshowImages').style.display = 'none';
            document.getElementById('slideshowThumbnails').style.display = 'none';
            document.getElementById('slideshowMap').style.display = 'block';
            Initialise();
        }
        else if (elName == "images") {
            document.getElementById('slideshowImages').style.display = 'block';
            document.getElementById('slideshowThumbnails').style.display = 'block';
            document.getElementById('slideshowMap').style.display = 'none';
        }
    }
    else {
        return false;
    }
}
function trigger(el) {
    var maxHeight = document.getElementById(el).clientHeight;
    var currentHeight = document.getElementById('contentWrapper').clientHeight;
    var minHeight = 160;
    var timerInterval = 5;
    var jumpHeight = 25;
    if ((currentHeight == maxHeight) || (currentHeight > maxHeight)) 
    {
        document.getElementById('contentWrapper').style.overflow = 'hidden';
        document.getElementById('contentButton').innerHTML = "+ More details"; 
        var testInterval = setInterval(function() {
        if (currentHeight > minHeight) {
            currentHeight -= jumpHeight;
            document.getElementById('contentWrapper').style.height = currentHeight + 'px'; 
            }
            else {
                clearInterval(testInterval);
                return false; 
            }
        }, timerInterval);
    }
    else if ((currentHeight == minHeight) || (currentHeight < minHeight)) {
        document.getElementById('contentButton').innerHTML = "- Fewer details"; var testInterval = setInterval(function() {
            if (currentHeight < maxHeight) { currentHeight += jumpHeight; document.getElementById('contentWrapper').style.height = currentHeight + 'px'; }
            else { clearInterval(testInterval); return false; }
        }, timerInterval);
    }
}
function rateProperty(elRate, url) {
    var selected = null; if (elRate.className == "one") { elRate.parentNode.className = "rateMe activeOne"; }
    else if (elRate.className == "two") { elRate.parentNode.className = "rateMe activeTwo"; }
    else if (elRate.className == "three") { elRate.parentNode.className = "rateMe activeThree"; }
    else if (elRate.className == "four") { elRate.parentNode.className = "rateMe activeFour"; }
    else { elRate.parentNode.className = "rateMe activeFive"; }
    var xmlhttp = null; if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); }
    else if (window.ActiveXObject) { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); }
    if (xmlhttp != null) { xmlhttp.open("post", url, true); xmlhttp.send(url); }
    else { alert("Your browser does not support XMLHTTP."); }
    xmlhttp = null;
}