function ghost_item() {
    if(document.getElementById) {
        target = document.getElementById('ghost');
        target.setAttribute('disabled', 'true');
    }
}

function redirect(url) {
    window.location = url;
}

function popup(src) {
    var theWindow = window.open(src.getAttribute('href'), 'Halsall Lettings Area');
    theWindow.focus();
    return theWindow;
}

function visibility(target_id) {
    if(document.getElementById) {
        target = document.getElementById(target_id);
        if(target.style.display == 'none') {
            target.style.display = '';
        } else {
            target.style.display = 'none';
        }
    }
}

function clear_field(target_id) {
    if(document.getElementById) {
        target = document.getElementById(target_id);
        if(target.value == target.defaultValue) {
            target.value = '';
        }
    }
}

/*
//fixes float in IE 6 Win if needed
if(document.all && window.attachEvent) {
    window.attachEvent("onload", fixWinIE);
}
function fixWinIE() {
    if(document.body.scrollHeight < document.all.content.offsetHeight) {
        document.all.content.style.display = 'block';
    }
}
*/