  tableWidth = 50 + 500;
  tableHeight = ( 3 * 2 * 2 + (rate.length + 1) ) * 19;
  available_width = 0;
  available_height = 0;
  var rateTableCode = "";
  var optionCode = "";
  var layerCode = "";
  var popWin = "";
  var catagory = "rates";
  var catagory_image = '<img src="/graphics/ratesmtg.gif" width="60" height="60">';
  var pageOptions = "stats:2:7!";
  var dataNegColour = "black";
  var dataPosColour = "black";
  var rateDescriptionText= "This table list the banks, credit unions and other lenders offering mortgages, as well as the interest rates charged and the various terms from six months through 10 years. Use the drop down box above to compare options. The information can be sorted alphabetically by lender, term or by rate by clicking on the bold headings. </span>";

  s = location.href;
  s = s.replace(/_sort?.shtml/i, ".shtml");

  if (is.ns4)  {
    rateDescCode = '<layer NAME="rateDescLayer" width='+tableWidth+'; height=100; zindex = 1> </layer> </ilayer>';
    rateTableCode = '<ilayer name="relativeLayer"> <layer NAME="rateTableLayer" width='+tableWidth+'; height='+tableHeight+'; zindex = 1> </layer> </ilayer>';
    optionCode = '<a href="" onClick="this.pathname = displayPrint();"> <img src="http://www.fiscalagents.com/graphics/print.gif" alt="Click here for a printable version of this page" border=0 width=100 height=30></a>';
  }
  else if (ieDHTML)  {
    rateDescCode = '<SPAN ID="rateDescLayer" STYLE="position:relative;visibility:visible"> </SPAN>';
    rateTableCode = '<SPAN ID="rateTableLayer" STYLE="position:relative;visibility:visible"> </SPAN>';
  }
  else if (DHTML)	{
    rateDescCode = '<div ID=rateDescLayer STYLE="position:relative;visibility:visible"></div>';
    rateTableCode = '<div ID=rateTableLayer STYLE="position:relative;visibility:visible">Loading, Please wait...</div>';
  }

	function setupDocument()	{
		if (is.mac)  {
			location.replace(s);
		}
		else if (ieDHTML || IE_DHTML)  {
			available_width = document.body.clientWidth;
			available_height = document.body.clientHeight;
		}
		else if (is.ns4 || NS_DHTML)  {
			available_width = parseInt(600,10);
			available_height = innerHeight;
		}
		else  {
			location.replace(s);
		}
		layerSetup('mor_clo');
	}