function Len(string)
{
	if (string == null)
		return (false);

	return String(string).length;
}

function setRelativeRoot()
{
  var TestStr2 = "/Website/";
  TestLen = Len(TestStr2);
  var Pos = 0;
  var PathLen = 0;
  var PathLen4 = 0;
  var MPos = 0;
  var LPos = 0;
  var LLen = 0;
  var CPath = "";
  CPath = location.href;
  PathLen = Len(CPath);
  PathLen4 = PathLen - TestLen + 1;
  var TestStr = ""
  Pos = 1;
  MPos = PathLen4;
  while (Pos <= PathLen4)
    {
    TestStr = CPath.substr(Pos, TestLen);
    if (TestStr == TestStr2)
      {
      MPos = Pos;
      break;
      }
    Pos++;
    }
  if (Pos < PathLen4)
    LPos = Pos + TestLen;
  else
    for (Pos = 8; Pos <= PathLen; Pos++)
      if (CPath.substr(Pos, 1) == "/")
        {
        LPos = Pos + 1;
        break;
        }
  LLen = PathLen - LPos + 1;
  FPath = CPath.substr(LPos, LLen);
  FLen = Len(FPath);
  Pos = 1;
  var SlashCnt = 0;
  while (Pos <= FLen)
    {
    if (FPath.substr(Pos, 1) == "/")
      SlashCnt++;
    Pos++;
    }
  if (SlashCnt == 0)
    relativeRoot = "./";
  else
    {
    relativeRoot = "";
    for (LoopCnt = 1; LoopCnt <= SlashCnt; LoopCnt++)
      relativeRoot += "../";
    }
}

function header()
{
  //general background and text settings
  document.write('<img src="' + relativeRoot + 'graphics/titlebar.gif"><br><br>');
}

function tablestart()
{
  //size table to screen resolution
  if (screen.width == 800)
    document.write('<table width="760" align = "center" frame="void" border="1" cellpadding="4">');
  else
    document.write('<table width="920" align = "center" frame="void" border="1" cellpadding="4">');
  document.write('<tr><td colspan="2"></td></tr>');
  document.write('<tr><td valign="top" width="200" bgcolor="#FFFFD8">');
}

function tablebody()
{
  document.write('</td>');
  document.write('<td bgcolor="#FFFFFF">');
}

// This function inserts a copyright statement with "DCP" as the holder.
function footer()
{
  //End body table
  document.write('</td></tr></table>');
  if (screen.width == 800)
    document.write('<table width="760" align="center"><tr>');
  else
    document.write('<table width="920" align="center"><tr>');
  document.write('<td width="250"><p class="copyright">Copyright &copy; 2004-2006  DCP.  All Rights Reserved</p></td>');
  document.write('<td><a href=' + relativeRoot + 'index.html><img border="0" src="' + relativeRoot + 'graphics/up_homepage.jpg"></a></td>');
  document.write('<td><a href=' + relativeRoot + 'siteMap.html><img border="0" src="' + relativeRoot + 'graphics/up_sitemap.jpg"></a></td>');
  document.write('<td><a href=' + relativeRoot + 'links/index.html><img border="0" src="' + relativeRoot + 'graphics/up_links.jpg"></a></td>');
  document.write('</tr>');
  document.write('<tr><td></td></tr></table>');
}

function acrobat()
{
document.write('<a href="http://www.adobe.com/products/acrobat/readstep2.html">');
document.write('<img src="' + relativeRoot + 'graphics/get_adobe_reader.gif"></a>');
}

function cml()
{
m2 = "mai";
m1 = "lt";
m3 = "o:";
a5 = "ccs";
a1 = "oft";
a3 = "@pa";
a2 = "ir.";
a4 = "com";
ml = m2 + m1 + m3 + a5 + a1 + a3 + a2 + a4;
document.write('<a href="' + ml + '">');
}

function icml()
{
cml();
document.write('<img src="' + relativeRoot + 'graphics/ccmail.gif"></a>');
}

function acml()
{
cml();
document.write('&nbsp;&nbsp;<img src="' + relativeRoot + 'animatedemail.gif"></a>');
}

function tcml()
{
cml();
document.write('<span class="link">email</span></a>');
}
