var IsIEPlus = false
if (navigator.userAgent.indexOf("MSIE")    != -1 && 
	navigator.userAgent.indexOf("Windows") != -1 && 
	navigator.appVersion.substring(0,1) > 3)
{
	IsIEPlus = true;
}

if (IsIEPlus)
{
	var newLineChar = String.fromCharCode(10);
	var char34 = String.fromCharCode(34);
	var FirstCRMsg = true;
	var hpStr;
	var hpLinkCnt = 0;
	var hpLinkWidth = 0;

	hpStyle =	"<STYLE type='text/css'>" +
				" A:link			{ color:#0000ff; }" +
				" A:visited			{ color:#008888; }" +
				" A:hover			{ color:red;     }" +
				"</STYLE>";
	document.write(hpStyle);

	hpStr =
		"<TABLE BORDER=0 WIDTH=625 CELLPADDING=0 CELLSPACING=0 BGCOLOR='#ffffff'>" +
		
		"<TR>" +
		"<TD WIDTH=150 VALIGN=TOP><font face='verdana,arial,helvetica' size=2 color=black>" +
		
		"	<!--CATEGORY_LINKS--><BR>" +
		
		"</TD>" +
		
		"</TR>" +
		"</TABLE>";
}

function showHomePage(PageIDStr)
{
	buildNavigation(PageIDStr);
	//buildHeadline(PageIDStr);

	//alert(hpStr);
	document.write(hpStr);
}

function addCategory(CatIDStr, CatStr, defaultShow)
{
	sImg   = defaultShow? "rush2.jpg" : "rush1.jpg";
	sStyle = defaultShow? "white"     : "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='*'" +
				 "     ID=I_" + CatIDStr +
				 "     onClick=clickCategory(" + char34 + CatIDStr + char34 + ") ALIGN=middle BORDER=0>&nbsp;" +
				 "<A STYLE='color:white;text-decoration:none;'" +
				 "   HREF='noop' " +
				 "   onfocus=" + char34 + "window.status='';" + char34 + 
				 "   onmouseover=" + char34 + "window.status='';" + char34 + 
				 "   onclick=" + char34 + "window.event.returnValue = false;" + char34 + ">" +
				 "<B><a href STYLE='text-decoration: none'>" + CatStr + "</B></a><BR>" +
				 "<DIV STYLE='display:" + sStyle + ";'" +
				 "     ID=T_" + CatIDStr + 
				 "     onClick=" + char34 + "window.event.cancelBubble=true;" + char34 + ">" +
				 "<DIV ><FONT SIZE=2><!--" + CatIDStr + "-->" + "</DIV>" +
				 "</DIV></DIV>" + SubStr;
		hpStr = hpStr.replace(SubStr, SrcStr);	
	}
}

function addCategoryLink(CatIDStr, CatStr, LinkUrl)
{
	SubStr  = "<!--" + CatIDStr + "-->";
	if (hpStr.indexOf(SubStr) >= 0)
	{
		SrcStr ="<font color=#000000>" + CatStr + "</font><BR>" + SubStr;
		hpStr = hpStr.replace(SubStr, SrcStr);	
	}
}

function setLastUpdate(TextStr)
{
	hpStr = hpStr.replace("<!--LASTUPDATE-->", TextStr);	
}

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 = 'rush2.jpg';
	}
	else 
	{
		txtObj.style.display = 'none';
		imgObj.src = 'rush1.jpg';
	}
	window.event.cancelBubble=true;
}
