var pathname = window.location.pathname;
var bUrl = "http://" + window.location.hostname + pathname.substring(0, pathname.lastIndexOf("/"));
<!-- 
function links() {
  	  document .write ("<TABLE border=0 cellPadding=0 cellSpacing=0 width=130>");
          document .write ("    <TBODY>");
          document .write ("    <TR>");
          document .write ("      <TD class=bordercolor height=1 rowSpan=5 width=1><IMG height=1 src='../images/pixel(1).gif' width=1></TD>");
          document .write ("      <TD class=bordercolor colSpan=1 height=1 width='123'><IMG height=1 src='../images/pixel(1).gif' width=1></TD>");
          document .write ("      <TD class=bordercolor height=1 rowSpan=5 width=1><IMG height=1 src='../images/pixel(1).gif' width=1></TD>");
          document .write ("     </TR>");
          document .write ("    <TR>");
          document .write ("      <TD align=middle background='../images/gbl_mod_head_aa1.gif' class=moduleheader colSpan=1 height=15 ");
          document .write ("      vAlign=left width='123'>Utility Billing Links</TD>");
          document .write ("    </TR>");
          document .write ("    <TR>");
          document .write ("      <TD class=bordercolor colSpan=1 height=1 width='123'><IMG border=0 height=1 src='../images/pixel(1).gif'></TD></TR>");
          document .write ("    <TR>");
          document .write ("      <TD class=backgroundYellow colSpan=1 height=1 width='123'>");
          document .write ("        <!-- begin CONTENT TABLE area -->");
          document .write ("  <TABLE border=0 cellPadding=0 cellSpacing=0 class=module width='98%'>");
          document .write ("    <TBODY>");
          
	  /*//Start copying to add links
	  document .write ("    <TR vAlign=top>");
          document .write ("      <TD><IMG border=0 height=9 hspace=3 src='../images/story_arrow.gif' vspace=3 width=5></TD>");
          document .write ("      <TD vAlign=top><a class=link href=" + bUrl + "/Fire.html>Dept Home</a></TD>");
          document .write ("    </TR>");
          //End copying to add links*/
          
          /*//Start copying to add sub-links;
	  document .write ("    <TR vAlign=top>");
          document .write ("      <TD align=right><IMG border=0 height=6 hspace=3 src='../images/NavBullet.gif' vspace=3 width=5></TD>");
          document .write ("      <TD vAlign=top><a class=sublinks href=" + bUrl + "/retiredofficers.html>Retired Officers</a></TD>");
          document .write ("    </TR>");
          //End copying to add links*/	  

          //Department Home Page
	  document .write ("    <TR vAlign=top>");
          document .write ("      <TD><IMG border=0 height=9 hspace=3 src='../images/story_arrow.gif' vspace=3 width=5></TD>");
          document .write ("      <TD vAlign=top><a class=link href=" + bUrl + "/EUtility.html>Dept. Home</a></TD>");
          document .write ("    </TR>");
          //End copying to add links

          //Customer Login
	  document .write ("    <TR vAlign=top>");
          document .write ("      <TD><IMG border=0 height=9 hspace=3 src='../images/story_arrow.gif' vspace=3 width=5></TD>");
          document .write ("      <TD vAlign=top><a class=link href=" + bUrl + "/login.aspx>Customer Login</a></TD>");
          document .write ("    </TR>");
          //End copying to add links

          //Customer Profile Maintenance
	  document .write ("    <TR vAlign=top>");
          document .write ("      <TD Align=right><IMG border=0 hspace=2 height=6 src='../images/NavBullet.gif' vspace=3 width=5></TD>");
          document .write ("      <TD vAlign=top><a class=sublinks href=" + bUrl + "/CustomerProfile.aspx>Customer Profile Maintenance</a></TD>");
          document .write ("    </TR>");
          //End copying to add links

          //Pay Bill
	  document .write ("    <TR vAlign=top>");
          document .write ("      <TD Align=right><IMG border=0 hspace=2 height=6 src='../images/NavBullet.gif' vspace=3 width=5></TD>");
          document .write ("      <TD vAlign=top><a class=sublinks href=" + bUrl + "/PayBillReview.aspx>Pay Bill (Login required)</a></TD>");
          document .write ("    </TR>");
          //End copying to add links

          //View Comsumption History
	  document .write ("    <TR vAlign=top>");
          document .write ("      <TD Align=right><IMG border=0 hspace=2 height=6 src='../images/NavBullet.gif' vspace=3 width=5></TD>");
          document .write ("      <TD vAlign=top><a class=sublinks href=" + bUrl + "/eutilityhome.aspx>Consumption History (Login required)</a></TD>");
          document .write ("    </TR>");
          //End copying to add links

          //Request New Commercial Service
	  document .write ("    <TR vAlign=top>");
          document .write ("      <TD Align=right><IMG border=0 hspace=2 height=6 src='../images/NavBullet.gif' vspace=3 width=5></TD>");
          document .write ("      <TD vAlign=top><a class=sublinks href=" + bUrl + "/RequestNewCommercialService.aspx>Request New Comercial Services</a></TD>");
          document .write ("    </TR>");
          //End copying to add links

          //Request New Residential Service
	  document .write ("    <TR vAlign=top>");
          document .write ("      <TD Align=right><IMG border=0 hspace=2 height=6 src='../images/NavBullet.gif' vspace=3 width=5></TD>");
          document .write ("      <TD vAlign=top><a class=sublinks href=" + bUrl + "/RequestNewResidentialService.aspx>Request New Residential Services</a></TD>");
          document .write ("    </TR>");
          //End copying to add links

          //Disconnect Services 
	  document .write ("    <TR vAlign=top>");
          document .write ("      <TD Align=right><IMG border=0 hspace=2 height=6 src='../images/NavBullet.gif' vspace=3 width=5></TD>");
          document .write ("      <TD vAlign=top><a class=sublinks href=" + bUrl + "/DisconnectService.aspx>Disconnect Services (Login required)</a></TD>");
          document .write ("    </TR>");
          //End copying to add links

          //Account Logout
	  document .write ("    <TR vAlign=top>");
          document .write ("      <TD Align=right><IMG border=0 hspace=2 height=6 src='../images/NavBullet.gif' vspace=3 width=5></TD>");
          document .write ("      <TD vAlign=top><a class=sublinks href=" + bUrl + "/Logout.aspx>Account Logout</a></TD>");
          document .write ("    </TR>");
          //End copying to add links

          //Automated Bank Draft
	  document .write ("    <TR vAlign=top>");
          document .write ("      <TD><IMG border=0 height=9 hspace=3 src='../images/story_arrow.gif' vspace=3 width=5></TD>");
          document .write ("      <TD vAlign=top><a class=link href=" + bUrl + "/EUtilitybankdraft.html>Automated Bank Draft</a></TD>");
          document .write ("    </TR>");
          //End copying to add links

          //Confidentiality Information
	  document .write ("    <TR vAlign=top>");
          document .write ("      <TD><IMG border=0 height=9 hspace=3 src='../images/story_arrow.gif' vspace=3 width=5></TD>");
          document .write ("      <TD vAlign=top><a class=link href=" + bUrl + "/EUtilityConfidential.html>Confidential Information</a></TD>");
          document .write ("    </TR>");
          //End copying to add links

          //Sewer Adjustment for Water Leak
	  document .write ("    <TR vAlign=top>");
          document .write ("      <TD><IMG border=0 height=9 hspace=3 src='../images/story_arrow.gif' vspace=3 width=5></TD>");
          document .write ("      <TD vAlign=top><a class=link href=" + bUrl + "/EUtilitywaterleak.html>Sewer Adjustment for Water Leak</a></TD>");
          document .write ("    </TR>");
          //End copying to add links

          //Statement Explanation
	  document .write ("    <TR vAlign=top>");
          document .write ("      <TD><IMG border=0 height=9 hspace=3 src='../images/story_arrow.gif' vspace=3 width=5></TD>");
          document .write ("      <TD vAlign=top><a class=link href=" + bUrl + "/EUtilitybillexplain.html>Statement Explanation</a></TD>");
          document .write ("    </TR>");
          //End copying to add links

          //FAQ
	  document .write ("    <TR vAlign=top>");
          document .write ("      <TD><IMG border=0 height=9 hspace=3 src='../images/story_arrow.gif' vspace=3 width=5></TD>");
          document .write ("      <TD vAlign=top><a class=link href=" + bUrl + "/EUtilityFAQ.html>Utility Services FAQ</a></TD>");
          document .write ("    </TR>");
          //End copying to add links

          //Don't mess up with the folloing lines
          document .write ("     </TBODY>");
          document .write ("   </TABLE><!-- end CONTENT TABLE area -->");
          document .write ("      </TD></TR>");
	  document .write ("    <TR>");
          document .write ("      <TD class=bordercolor colSpan=1 height=1 width='123'><IMG height=1 src='../images/pixel(1).gif' width=1></TD>");
          document .write ("    </TR>");
          document .write ("  </TBODY>");
          document .write ("</TABLE>");
} -->
