if(window.name != "_P_O_P_U_P_" && window.name.substr(0, 4) != '_nf_')
{
    window.onerror=function(msg, URL, lineNum){return true;}
    var newLocation = self.location.href;
    if(newLocation.indexOf('?TEMPLATE_URL=') == -1)
    {
        if(self.location.href == top.location.href)
        {
            lcFrameRedirect(newLocation);
        }
    }
    else
    {
        newLocation = newLocation.substring(newLocation.indexOf('?TEMPLATE_URL=') + 14);
        if(self.location.href == top.location.href)
        {
            lcFrameRedirect(newLocation);
        }
    }
}

function lcFrameRedirect(strBaseUrl)
{
    if(typeof(bFramePageCheckProblemBrowser) != "undefined" &&
        typeof(bIFrameProblemBrowser) != "undefined")
    {
        if(bFramePageCheckProblemBrowser == true &&
            bIFrameProblemBrowser == true)
            {
                return;
            }
    }

    var sliceCount = 3;
    if(strBaseUrl.indexOf('/_lccms_/_') != -1)
    {
        strBaseUrl = strBaseUrl.slice(0, strBaseUrl.lastIndexOf('/_lccms_/_'));
    }
    else
    {
        strBaseUrl = strBaseUrl.slice(0, strBaseUrl.lastIndexOf('/'));
    }

    top.location.href = strBaseUrl + "?SHOW_URL=" + self.location.href.replace(/http:\/\//g, 'LCHTTPLCHTTPLCHTTP');
}
