function BI_NavController( navigationFrameName, navigationDivName, contentFrameName,
headerFrameName, headerDivName, headerImageDivName ){
BI_NavController.prototype=new NavController( navigationFrameName, navigationDivName,
contentFrameName, headerFrameName, headerDivName,
headerImageDivName );
this.navFrameName  = navigationFrameName ? navigationFrameName : "PageNavigation";
this.navDivName   = navigationDivName ? navigationDivName : "navdiv";
this.contentFrameName = contentFrameName ? contentFrameName : "PageContent";
this.headerFrameName = headerFrameName ? headerFrameName : "PageHeader";
this.headerDivName  = headerDivName ? headerDivName : "hdrcontent";
this.headerImageDivName = headerImageDivName ? headerImageDivName : "divImage";
this.navDocument  =top.frames[ this.navFrameName ].document;
this.contentDocument=top.frames[ this.contentFrameName ].document;
this.headerDocument =top.frames[ this.headerFrameName ].document;
this.addButtons  =BI_NavController.prototype.addButtons;
this.addHideShow =BI_NavController.prototype.addHideShow;
this.addHTMLContent =BI_NavController.prototype.addHTMLContent;
this.addLCMitems =_addLCMitems;
this.addLinks  =BI_NavController.prototype.addLinks;
this.addMixed  =BI_NavController.prototype.addMixed;
this.addProdMenu =_addProdMenu;
this.clear   =BI_NavController.prototype.clear;
this.initFrameset =BI_NavController.prototype.initFrameset;
function _addLCMitems( itemsList ){
BI_NavController.prototype._buildPageNavigation( this.navFrameName, this.navDocument,
this.navDivName, __getLCMitems( itemsList ) );
}
function _addProdMenu(){
BI_NavController.prototype._buildPageNavigation( this.navFrameName, this.navDocument,
this.navDivName, __getMiniProductMenu() );
}
function __getLCMitems( itemsList ){
var DEFAULT_COLS=3;
var itemsHTML=BI_NavController.prototype._getTopSection( BI_NavController.prototype._getPath(),
"Monitoring Messages", DEFAULT_COLS );
var itemsArray  = itemsList.split("|");
var totmsgs  =itemsArray[0];
var totseenmsgs =itemsArray[1];
var totunseenmsgs=itemsArray[2];
var totpendmsgs =itemsArray[3];
itemsHTML += '<tr><td>&nbsp;</td><td align="left">' +
'<a class="navboxlink" title="Total messages" href="javascript:if (typeof parent.PageContent.submitProdMenuMsgRet == \'function\' ) parent.PageContent.submitProdMenuMsgRet(\'A\');">Total</a></td>' +
'<td align="right">' + totmsgs + '</td></tr>' +
'<tr><td>&nbsp;</td><td  nowrap="nowrap"><a class="navboxlink" title="Seen messages" href="javascript:if (typeof parent.PageContent.submitProdMenuMsgRet == \'function\' ) parent.PageContent.submitProdMenuMsgRet(\'S\');">Seen</a></td>' +
'<td align="right">' + totseenmsgs + '</td></tr>' +
'<tr><td>&nbsp;</td><td nowrap="nowrap"><a class="navboxlink" title="Unseen messages" href="javascript:if (typeof parent.PageContent.submitProdMenuMsgRet == \'function\' ) parent.PageContent.submitProdMenuMsgRet(\'U\');">Unseen</a></td>' +
'<td align="right">' + totunseenmsgs + '</td></tr>' +
'<tr><td>&nbsp;</td><td nowrap="nowrap"><a class="navboxlink" title="Pending messages" href="javascript:if (typeof parent.PageContent.submitProdMenuMsgRet == \'function\' ) parent.PageContent.submitProdMenuMsgRet(\'P\');">Pending</a></td>' +
'<td align="right">' + totpendmsgs + '</td>';
itemsHTML += BI_NavController.prototype._getBottomSection( BI_NavController.prototype._getPath(), "Click to view messages", DEFAULT_COLS );
return itemsHTML;
}
function __getMiniProductMenu(){
var DEFAULT_COLS=3;
var menuHTML=BI_NavController.prototype._getTopSection( BI_NavController.prototype._getPath(),
"Product Menu", DEFAULT_COLS );
var prodMenuList = __readCookie( "prodMenuMajor" );
var miniProdMenuList = __readCookie( "prodMenuMinor" );
var isUsingBusTargeter=false;
var isUsingLegacyTargeting=false;
var isCityReports=false;
if( ! prodMenuList ){
prodMenuList = "MENU|";
}
if( miniProdMenuList ){
isUsingBusTargeter = miniProdMenuList.indexOf( "BTAR" ) != -1;
isUsingLegacyTargeting = miniProdMenuList.indexOf( "LTAR" ) != -1;
isCityReports = miniProdMenuList.indexOf( "CITY" ) != -1;
}
menuItems = prodMenuList.split( "|" );
var menuLines=[];
for( var i=0;i!=menuItems.length;++i ){
if( isUsingBusTargeter&&i==0 ){
menuLines = __getProdMenuParams( "BTAR" );
if( menuLines[ 0 ]!="" ){
menuHTML += "<tr><td>&nbsp;</td><td><a class='navboxlink' href='" +
menuLines[ 0 ] + "' target='PageContent' title='" +
menuLines[ 1 ] + "'>" + menuLines[ 1 ] +
"</a></td><td>&nbsp;</td></tr>";
}
}
if( isCityReports ){
if( menuItems[ i ] == "LMTD" || menuItems[ i ] == "LTDF" || menuItems[ i ] == "NLTD" )continue;
} else {
if( ( ! isUsingLegacyTargeting )&& ( menuItems[ i ] == "LMTD" || menuItems[ i ] == "NLTD" ) ) continue;
}
menuLines=__getProdMenuParams( menuItems[ i ] );
if( menuLines[ 0 ]!="" ){
menuHTML += "<tr><td>&nbsp;</td><td><a class='navboxlink' href='" +
menuLines[ 0 ] + "' target='PageContent' title='" +
menuLines[ 1 ] + "'>" + menuLines[ 1 ] +
"</a></td><td>&nbsp;</td></tr>";
}
}
if( miniProdMenuList.indexOf( "L360" )!= -1 ){
var URL = "https://ledger360.uk.experian.com/" + "ledger360/default.aspx";
} else {
var URL = "http://www.uk.experian.com/" + "bi/Ledger360/landing_page.html";
}
menuHTML += "<tr><td>&nbsp;</td><td>" +
"<a class='navboxlink' href='" + URL + "' target='_blank' title='Link to Ledger360'>Ledger360</a>" +
"</td><td>&nbsp;</td></tr>";
menuHTML+=BI_NavController.prototype._getBottomSection( BI_NavController.prototype._getPath(),
"Start a new search", DEFAULT_COLS );
return menuHTML;
}
function __getProdMenuParams( accessType ){
var menuParams = [ "", "" ];
switch ( accessType ){
case "BTAR":
menuParams[ 0 ] = "sp2_bt_search.html";
menuParams[ 1 ] = "Business Reports";
break;
case "LMTD":
menuParams[ 0 ] = "sp2_ltd_search.html";
menuParams[ 1 ] = "Limited Company";
break;
case "LTDF":
menuParams[ 0 ] = "sp2_ft_search.html";
menuParams[ 1 ] = "Fast Track";
break;
case "NLTD":
menuParams[ 0 ] = "sp2_nltd_search.html";
menuParams[ 1 ] = "Non-ltd Business";
break;
case "DDIR":
menuParams[ 0 ] = "sp2_dir_search.html";
menuParams[ 1 ] = "Directors";
break;
case "LCRV":
menuParams[ 0 ] = "sp2_ltdmon_retrieval.html";
menuParams[ 1 ] = "Monitoring";
break;
case "INTR":
menuParams[ 0 ] = "sp2_int_search.html";
menuParams[ 1 ] = "International";
break;
case "MENU":
menuParams[ 0 ] = "sp2_request.html";
menuParams[ 1 ] = "Product Menu";
break;
default:
menuParams[ 0 ]="";
menuParams[ 1 ]="";
}
return menuParams;
}
function __readCookie( name ){
var result=null;
var myCookie = " " + document.cookie + ";";
var searchName = " " + name + "=";
var startOfCookie=myCookie.indexOf(searchName)
var endOfCookie;
if( startOfCookie!=-1 ){
startOfCookie+=searchName.length;
endOfCookie = myCookie.indexOf( ";", startOfCookie );
result=unescape(myCookie.substring( startOfCookie, endOfCookie ) );
}
return result;
}
}


