function popsave( urlDetails ) {
    window.open('/popup/vip/save.htm?' + urlDetails, 'save_listing', 'height=150,width=300,scrollbars=no');
}             

function displaycalc( urlDetails ) {
    window.location = '/popup/newcalcs.htm?' + urlDetails;
}             

function popcalc (urlDetails) {
    window.open('/popup/calc.htm?' + urlDetails, 'mortgage_calc', 'height=400,width=510,scrollbars=yes');
}

function popappt( urlDetails ) {
    window.open(urlDetails, 'appt_form', 'height=535,width=500,resizable=yes,scrollbars=yes');
}

function popshowing( urlDetails ) {
    window.open(urlDetails, 'showing_form', 'height=550,width=640,resizable=yes,scrollbars=yes');
}             

function popemail( urlDetails ) {
    window.open('/homesearch.htm?' + urlDetails, 'email_a_friend', 'height=350,width=400,scrollbars=no');
}             

function popflyer( urlDetails ) {
    window.open('/homesearch.htm?' + urlDetails, '','height=725,width=580,resizable=yes,scrollbars=yes'); // was height=850
} 

function loadimg( url ) {
    document.detail.src = url;
}

// handle the mouse overs
if (document.all || document.getElementById) {
    document.write("<style>\n");
    document.write(".menuitems {\n");
    document.write("border:0px solid #eeeee0;\n");
    document.write("font-family: tahoma, arial, sans-serif;\n");
    document.write("font-size: 8pt;\n");
    document.write("color:006699;\n");
    document.write("cursor:pointer;\n");
    document.write("padding:5px;\n");
    document.write("}\n\n");

    document.write(".menuitems a {\n");
    document.write("text-decoration:none;\n");
    document.write("color:006699;\n");
    document.write("}\n");
    document.write("<\/style>\n");
}

function overEffect(e, state, bgcolor) {

    if (document.all) {
        s = event.srcElement;
    }
    else if (document.getElementById) {
        s = e.target;
    }

    if (s.className == "menuitems") {
        s.style.borderStyle = state;
        s.style.backgroundColor = bgcolor;
    }
    else {

        while(s.tagName != "DIV") {

            s = document.getElementById ? s.parentNode : s.parentElement;
            if (s.className == "menuitems") {
                s.style.borderStyle = state;
                s.style.backgroundColor = bgcolor;
            }
        }
    }
}
