

function footer() {
  // Properties
  this.linkArray    = new Array();

  this.addressLine  = "";
  this.activeItem   = "";
  this.namePrefix   = "Footer - ";
  this.resourcePath = "";

  // Methods
  this.draw                  = drawfooter;
  this.getLinkTrackingString = getLinkTrackingString;
}

function getLinkTrackingString( s ) {
  if ( !s ) {
    return '';
  }

  s = this.namePrefix + s;

  var result = '';
  var len    = s.length;

  for ( var i = 0; i < len; i++ ) {
    var c = s.charAt( i );
    result += ( c != ' ' ? ( c != '&' ? c : 'and' ) : '+' );
  }

  result = 'name="&lid=' + result + '"';

  return result;
}

function drawfooter() {
  var category, link, id, title, width, height;

  var footerObject = new Array();

  footerObject[ footerObject.length ] = '<div align="center">';
  footerObject[ footerObject.length ] = '<div id="footer">';
  footerObject[ footerObject.length ] = '<div id="links">';

  for ( var i = 0; i < this.linkArray.length; i++ ) {
  	var addDelimiter = true;

    link  = this.linkArray[ i ][ 0 ];
    title = this.linkArray[ i ][ 1 ];
    id    = this.linkArray[ i ][ 2 ];

		// Add delimiter if NOT the first menu item
		// or if a line break was NOT added
    if ( ( i > 0 ) && ( addDelimiter ) ) {
    	footerObject[ footerObject.length ] = '<small> &#8226\; </small>';
    }

    if ( id == this.activeItem && this.activeItem != "" ) {
      footerObject[ footerObject.length ] = '<b>' + title + '</b>';
    }
    else {
      footerObject[ footerObject.length ] = '<a href="' + link + '" ' + this.getLinkTrackingString( title ) + '>' + title + '</a>';
    }
  }

  footerObject[ footerObject.length ] = '</div>';
  footerObject[ footerObject.length ] = '<div id="copyright">';
  footerObject[ footerObject.length ] = this.addressLine;
  footerObject[ footerObject.length ] = '</div>';
  footerObject[ footerObject.length ] = '<div id="logos">';

  footerObject[ footerObject.length ] = '<a id="footerHud" href="http://www.hud.gov/" target="_blank"><img src="' + this.resourcePath + '/images/cobrands/hud_logo.gif" alt="U.S. Department of Housing and Urban Development" align="middle" border="0" height="56" width="64"></a>';  
  footerObject[ footerObject.length ] = '<a id="footerLogoTruste" href="javascript:openTrustE();"><img src="' + this.resourcePath + '/cobrands/branding/ext_truste_square.gif" width="116" height="31" align="middle" border="0" alt="reviewed by Trust-E site privacy statement" /></a>';
  footerObject[ footerObject.length ] = '<a id="footerLogoVeriSign" href="https://seal.verisign.com/splash?form_file=fdf/splash.fdf&type=GOLD&sealid=2&dn=WWW.LOWERMYBILLS.COM&lang=en" target="_blank"><img src="' + this.resourcePath + '/images/misc/misc_verisign.gif" border=0 align="absmiddle" hspace="10"></a>';
  footerObject[ footerObject.length ] = '<a id="footerLogoBBB" href="http://www.bbbonline.org/cks.asp?id=102042618283022676" target="_blank"><img src="' + this.resourcePath + '/cobrands/branding/bbb_ReliabilitySeal4.gif" width="90" height="31" border="0" alt="Better Business Bureau OnLine Reliability Seal" align="middle"></a>';
  footerObject[ footerObject.length ] = '<a id="footerLogoTrueSecure" href="javascript:openTruSecure();"><img src="' + this.resourcePath + '/cobrands/branding/logo_truesecure.gif" width="108" height="31" border="0" alt="CYBERTRUST CERTIFIED" align="middle"></a>';
  footerObject[ footerObject.length ] = '</div></div></div>';

  for ( var i = 0; i < footerObject.length; i++ ) {
    document.write( footerObject[ i ] );
  }
}

// opener for the SilverPop unsubscribe popup
// if you edit this window URL please do the same in the link override in \partners\embed\footer\footer.jsp
function openUnsubscribeForm() {
	window.open("http://LMB.lmbusc.com/addfbedbadd07da5f781ed23f22b3158", "silverPop", "width=640,height=500,scrollbars=no,alwaysRaised,resizable=yes,dependent");
}


function openTruSecure() {
	window.open("/misc/popups/TruSecure.jsp", "TS", "width=350,height=440,scrollbars=no,alwaysRaised=no,resizable=yes,dependent");
}

function openTrustE() {
newBigWindow = window.open("/misc/privacy/popup/index.jsp", "TE", "width=700,height=450,scrollbars=yes,alwaysRaised,resizable=yes,toolbar,dependent");
}
