<!--
var topics = new Array("ConsumerProtection",
				   "Data",
				   "GuidesAndStandards",
				   "HealthIssues",
				   "HealthProfessionalServices",
				   "HealthyCommunities",
				   "HealthyPeople",
				   "News",
				   "Resources",
				   "SeniorServices");

// Functions created by Paul Davis - http://www.kaosweaver.com
function breadCrumbs(base,delStr,defp,cStyle,tStyle,dStyle,nl) 
{ 
	loc=window.location.toString();
        defp = 'index.html';
	subs=loc.substr(loc.indexOf(base)+base.length+1).split("/");
	document.write('<a href="'+getLoc(subs.length-1)+defp+'" class="'+cStyle+'">DHSS Home</a>  '+'<span class="'+dStyle+'">'+delStr+'</span> ');
	a=(loc.indexOf(defp)==-1)?1:2;
        a = 2;
	for (i=a+1;i<(subs.length - 1);i++) 
	{ 
		subs[i]=formatDir(unescape(subs[i]));
		document.write('<a href="'+getLoc(subs.length-i-2)+defp+'" class="'+cStyle+'">'+subs[i]+'</a>  '+'<span class="'+dStyle+'">'+delStr+'</span> ');
	}
	if (nl==1) 
		document.write("<br>");
	document.write('<span class="'+tStyle+'">'+document.title+'</span>');
}
function makeCaps(a) 
{
  g=a.split(' ');
  for (l=0;l<g.length;l++) 
  	g[l]=g[l].toUpperCase().slice(0,1)+g[l].slice(1);
  return g.join(" ");
}
function getLoc(c) {
  var d="";
  if (c>0) 
  	for (k=0;k<c;k++) 
		d=d+"../"; 
   return d;
}
function getReferer()
{
	var referer = document.referrer.toString();
	if (referer != "" && isFromTopic(referer))
	{
		var lstindex = referer.lastIndexOf("/");
		var fstindex = referer.lastIndexOf("/", lstindex-1);
		var dir = referer.substring(fstindex+1, lstindex);
		var directory = formatDir(dir);
		document.write("<img src='"+imgPath+"/navpipe.gif' width='14' height='10' border='0' alt='' /><a class='nava' href='"+referer+"'>"+directory+"</a>");
	}
}
function formatDir(tempStr)
{
	dir = trimBlanks(tempStr.replace(/[A-Z]/g, " $&"));
	return dir;
}

// removes spaces from both ends of the "origString" string
function trimBlanks(origString)
{
	if (origString != null)
	{
		// trim spaces off right end
		while(origString.length > 0 && origString.substring(origString.length - 1) == " ")
		{
			origString= origString.substring(0,origString.length - 1);
		}
		// trim spaces off left end
		while(origString.length > 0 && origString.substring(0,1) == " ")
		{
			origString= origString.substring(1);
		}
	}
	if (origString != null)
	{
		return origString;
	}
	else
	{
		return "";
	}
}

function isFromTopic(referer)
{
	var retValue = false;
//	alert("referer: "+referer);
	for (i=0;i<topics.length;i++)
	{
//		alert("topics "+i+" value: "+topics[i]+"\nindex: "+referer.indexOf(topics[i]));
		if (referer.indexOf(topics[i])!=-1)
		{
			retValue = true;
			break;
		}
	}
	return retValue;
}
//-->
