﻿function redir()
{
    
    if(location.href.toLowerCase().indexOf('collector')!=-1)
    {
    top.frmContent.location = 'Frames/Products/Collection/Collector/Collector.aspx';
    }
    if(location.href.toLowerCase().indexOf('creditsystem')!=-1 || location.href.toLowerCase().indexOf('cs')!=-1)
    {
    top.frmContent.location = 'Frames/Products/CreditInfo/CreditSystem/CS.aspx';
    }
    if(location.href.toLowerCase().indexOf('debtmanager')!=-1 || location.href.toLowerCase().indexOf('dm')!=-1)
    {
    top.frmContent.location = 'Frames/Products/Collection/DebtManager/DM.aspx';
    }
    if(location.href.toLowerCase().indexOf('echeck')!=-1)
    {
    top.frmContent.location = 'Frames/Products/CreditApp/eCheck/eCheck.aspx';
    }
    if(location.href.toLowerCase().indexOf('winsgate')!=-1 || location.href.toLowerCase().indexOf('wg')!=-1)
    {
    top.frmContent.location = 'Frames/Products/Insurance/Winsgate/Winsgate.aspx';
    }
    if(location.href.toLowerCase().indexOf('eflow')!=-1 || location.href.toLowerCase().indexOf('e-flow')!=-1)
    {
    top.frmContent.location = 'Frames/Products/eFlow/CRM/CRM.aspx';
    }
	if(location.href.toLowerCase().indexOf('landers')!=-1 || location.href.toLowerCase().indexOf('mortgage')!=-1)
    {
    top.frmContent.location = 'Frames/Products/Mortgage/Landers/Landers.aspx';
    }
    if(location.href.toLowerCase().indexOf('rodata')!=-1 || location.href.toLowerCase().indexOf('rodb')!=-1)
    {
    top.frmContent.location = 'Frames/Products/CreditInfo/RoData/RoData.aspx';
    }
   if(location.href.toLowerCase().indexOf('news')!=-1)
    {
        if(location.href.toLowerCase().indexOf('_')!=-1)
        {
            var index = location.href.toLowerCase().indexOf('_');
            var news = location.href.toLowerCase().substring(index+1);
            top.frmContent.location = 'Frames/NewsItem.aspx?id='+news+'';
        }
        if(location.href.toLowerCase().indexOf('_')==-1)
        {
            top.frmContent.location = 'Frames/news.aspx';
        }
    }
}

