lreJS = new Object();
lreJS.hostName = 'http://www.luxuryrealestate.com/';
lreJS.blankPage = '<html><body bgcolor="white"></body></html>';

function lre_loadPage(frm)
{
        if(typeof(frm) == "undefined")
        {
                frm = lremain;
        }

        if(window.location.hash == "")
        {
                frm.location = lreJS.hostName + removeLeadingSlash(lreConfig.searchPage);
        }
        else
        {
                frm.location = lreJS.hostName + '/scripts/index.php?siteScript=propPages&siteScreen=details&templateSet=BR&action=BRRevisit&BRUID=UNKNOWN' +
                                   window.location.hash.substring(1);
        }
}


function lre_dynamic_loadPage(pageToLoad, metadata)
{
        if(pageToLoad == '')
        {
                lremain.location = lreJS.hostName + '/scripts/index.php?siteScript=propPages&siteScreen=summaries&action=newSearch&BRUID=' +
                                   + lreConfig.firmKey + '&Keyword=' + metadata;
        }
        else
        {
                //lremain.location = lreJS.hostName + removeLeadingSlash(lreConfig.searchPage);
                lre_loadPage();
        }
}

function removeLeadingSlash(str)
{
        while(str.indexOf("/") == 0)
        {
                str = str.substring(1);
        }

        return str;
}
