
	var newLineChar = String.fromCharCode(10);
	var char34 = String.fromCharCode(34);
	var FirstCRMsg = true;
	var hpStr;
	var hpLinkCnt = 0;
	var hpLinkWidth = 0;
        var IsIEPlus = true

	hpStr =
		"<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>" +
		"<TR>" +
		"<TD VALIGN=TOP><font face='verdana,arial,helvetica' size=1>" +
		"	<!--CATEGORY_LINKS--><BR>" +
		"</TD>" +
		"</TR>" +
		"</TABLE>";
		if (navigator.userAgent.indexOf("MSIE")!= -1 && 
		navigator.userAgent.indexOf("Windows") != -1 && 
		navigator.appVersion.substring(0,1) > 3)
		{
		IsIEPlus= true;
		}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}	


function showHomePage()
{
	buildNavigation();

	if (IsIEPlus==true)
	document.write(hpStr);
	
}


function addHomePageLink(LinkStr, LinkUrl, defaultSelection)
{
	SubStr = "<!--HOMEPAGE_LINK-->";
	if (hpStr.indexOf(SubStr) >= 0)
	{
		hpLinkCnt += 1;
		SrcStr = "<OPTION VALUE='" + hpLinkCnt + "'";
		if (defaultSelection) SrcStr += " SELECTED";
		SrcStr += ">" + LinkStr;
		
		//Make the select box the same width as the link title.
		for (i = LinkStr.length+1; i < hpLinkWidth+2; i++)
			SrcStr += "&nbsp;";

		SrcStr += SubStr;
		hpStr = hpStr.replace(SubStr, SrcStr);
		
		hpStr += "<A ID=ID_HPLink" + hpLinkCnt + " STYLE='display:none' HREF='" + LinkUrl + "'>1</A>";
	}
}

function addCategory(CatIDStr, CatStr, defaultShow, Overlay)
{

	if (IsIEPlus==true)
	{
		sImg   = defaultShow? "minus.gif" : "plus.gif";
		sStyle = defaultShow? "black"     : "none";
	
		SubStr = "<!--CATEGORY_LINKS-->";
		if (hpStr.indexOf(SubStr) >= 0)
		{
		SrcStr = "<DIV STYLE='cursor:hand;'" +
				 "     ID=C_" + CatIDStr +
				 "     onClick=clickCategory(" + char34 + CatIDStr + char34 + ") NOWRAP>" +
				 "<IMG SRC='" + sImg + "' ALT='Click Here!'" +
				 "     ID=I_" + CatIDStr +
				 "     onClick=clickCategory(" + char34 + CatIDStr + char34 + ") ALIGN=middle BORDER=0>&nbsp;" +
                                 "<A STYLE='color:#333333;text-decoration:none;'" +
				 "   HREF='noop' " +
				 " Title=" + Overlay +
				 "   onfocus=" + char34 + "window.status='';" + char34 + 
				 "   onmouseover=" + char34 + "window.status='';" + char34 + 
				 "   onclick=" + char34 + "window.event.returnValue = false;" + char34 + ">" +
				 "<B>" + CatStr + "</B></A><BR>" +
				 "<DIV STYLE='display:" + sStyle + ";'" +
				 "     ID=T_" + CatIDStr + 
				 "     onClick=" + char34 + "window.event.cancelBubble=true;" + char34 + ">" +
				 "<DIV STYLE='margin-left:12;'><FONT SIZE=1><!--" + CatIDStr + "-->" + "</DIV>" +
				 "</DIV></DIV>" + SubStr;
		hpStr = hpStr.replace(SubStr, SrcStr);
		}
	}
	else
	{
		SrcStr = "<B>" + CatStr + "</B><BR>";
		document.write(SrcStr);
	}	
}



function addCategoryLink(CatIDStr, CatStr, LinkUrl)
{

	if (IsIEPlus==true)
	{
		SubStr  = "<!--" + CatIDStr + "-->";
		if (hpStr.indexOf(SubStr) >= 0)
		{
                SrcStr = "&nbsp;&nbsp;&nbsp;<A HREF='" + LinkUrl + "'><FONT COLOR=#006699>" + CatStr + "</FONT></A><BR>" + SubStr;
		hpStr = hpStr.replace(SubStr, SrcStr); 
		}
	}
	else
	{
		SrcStr = "&nbsp;&nbsp;&nbsp;<A HREF='" + LinkUrl + "'>" + CatStr + "</A><BR>";
		document.write(SrcStr); 
	}	
	
}



function goHomePage(s)
{	
	//window.location.href = s.options[s.selectedIndex].value;
	
	option = s.options[s.selectedIndex].value;
	elmID = "ID_HPLink" + option
	obj = document.all(elmID);
	if (obj != null)
		obj.click();
}

function clickCategory(CatIDStr) 
{
	var txtObj = document.all("T_" + CatIDStr);
	var imgObj = document.all("I_" + CatIDStr);

	if (txtObj.style.display == 'none') 
	{
		txtObj.style.display = '';
		imgObj.src = 'minus.gif';
	}
	else 
	{
		txtObj.style.display = 'none';
		imgObj.src = 'plus.gif';
	}
	window.event.cancelBubble=true;
}




function LineBreak()
{
	SubStr = "<!--CATEGORY_LINKS-->";
	SrcStr = "&nbsp;";
	hpStr = hpStr.replace(SubStr, SrcStr);	
}
