// Site Functions V2.03 Copyright 1998, 1999, 2001 by Joseph Delgado. (jdelgado@carroll.com)
// (www.eqp.com) Enchanted Quill Press
// V02.01 02/28/99 - JD - Added code for Netscape version of @table.
// V02.02 04/09/99 - JD - Added ALT Tabs to remove "How to Use Controls" Section.
// V02.03 02/03/01 - JD - Added CCS to HR line to change line color for black backgrounds.
// V03.00 05/06/01 - JD - Added PAD and Spacer Gifs. Removed old @Table Code.
// V03.01 07/26/02 - JD - Added code for solid black lines not shaded ones.

function IsIE4()
{
	if (parseInt(navigator.appVersion) >= 4 && navigator.appName == "Microsoft Internet Explorer")
	{
		return true;
	}
	return false;
}

function IsNav4()
{
	if (parseInt(navigator.appVersion) >= 4 && navigator.appName == "Netscape")
	{
		return true;
	}
	return false;
}

function writestars(count)
{
	document.write (drawstars(count));
}

function drawstars(count)
{
	var webstr="";
		if (count==0)
			return webstr;
		if (count < .5)
			count=.5;
		if (count > 5)
			count=5;
		for (lp=0; lp < Math.floor(count); ++ lp)
		{
			webstr+='<img src="images/ministar_ss.gif" align="" width="11" height="10" border="0" alt="*">';
		}
		if (Math.round(count)>count)
			webstr+='<img src="images/ministarhalf_ss.gif" align="" width="6" height="10" border="0" alt="+">';
		return webstr;
}

function inlinestars(count)
{
	document.write(drawstars(count))
}

function moveup(anchor)
{
	window.location.hash=document.anchors[anchor].name;
}

function movedn(anchor)
{
	if (anchor>document.anchors.length-1)
	{
		anchor=0;
	}
	window.location.hash=document.anchors[anchor].name;
}

function writectrllinks(anchor,sitename,link,rating,blnPadEnabled)
{
	var str1="";
	var str2="";
	if (blnPadEnabled==true)
		str2='<A HREF="http://www.asp-shareware.org/pad/" TARGET="_xtrn"><IMG SRC="images/ctPadSmall_ss.gif" align="ABSMIDDLE" WIDTH="58" HEIGHT="21" BORDER="0"></A>';
	else
		str2='<IMG SRC="images/ctSpacer_ss.gif" align="ABSMIDDLE" WIDTH="58" HEIGHT="21" BORDER="0">';

	str1='<P><A NAME="'+anchor+'"><A HREF="javascript:moveup(\''+(anchor-1)+'\')"><img src="images/ctlup_ss.gif" align="ABSMIDDLE" width="21" height="21" border="0" HSPACE="1" ALT="Previous"></A><A HREF="javascript:movedn(\''+(anchor+1)+'\')"><img src="images/ctldown_ss.gif" align="ABSMIDDLE" width="21" height="21" border="0" HSPACE="1" ALT="Next"></A><A HREF="'+link+'" TARGET="IDSITES"><img src="images/ctlload_ss.gif" align="ABSMIDDLE" width="21" height="21" border="0" HSPACE="1" ALT="Load Page"></A><A HREF="#0">'
	str1+='<img src="images/ctltop_ss.gif" align="ABSMIDDLE" width="21" height="21" border="0" HSPACE="1" ALT="Top of List"></A>'+str2+'<FONT CLASS="entry">'+sitename+'</FONT><BR><FONT CLASS="link"><A HREF="'+link+'" CLASS="CTRLURL" TARGET="IDSITES"><I>'+link+'</A></I></FONT>'
	str1+=drawstars(rating)+'<BR><HR COLOR="#000000" NOSHADE>';
	document.write(str1);
}

function writectrlrevs(anchor,softname,revlink,downlink,rating)
{
	var str1="";
		str1='<P><A NAME="'+anchor+'"><A HREF="javascript:moveup(\''+(anchor-1)+'\')"><img src="images/ctlup_ss.gif" align="ABSMIDDLE" width="21" height="21" border="0" HSPACE="1" ALT="Previous"></A><A HREF="javascript:movedn(\''+(anchor+1)+'\')"><img src="images/ctldown_ss.gif" align="ABSMIDDLE" width="21" height="21" border="0" HSPACE="1" ALT="Next"></A><A HREF="'+downlink+'" TARGET="IDSITES"><img src="images/ctlload_ss.gif" align="ABSMIDDLE" width="21" height="21" border="0" HSPACE="1" ALT="Download"></A><A HREF="#0">'
		str1+='<img src="images/ctltop_ss.gif" align="ABSMIDDLE" width="21" height="21" border="0" HSPACE="1" ALT="Top of List"></A><A HREF="'+revlink+'"><IMG SRC="images/ctldoc_ss.gif" align="ABSMIDDLE" width="21" height="21" border="0" HSPACE="1" ALT="Read Review"></A>'
		str1+='<FONT CLASS="entry">'+softname+'</FONT><BR><FONT CLASS="link"><A TARGET="IDSITES" HREF="'+downlink+'"><I>'+downlink+'</A></I></FONT>'
		str1+=drawstars(rating)+'<BR><HR COLOR="#000000" NOSHADE>';
		document.write(str1);
}

function jumphash(form)
{
	window.location.hash=form.mark.options[form.mark.selectedIndex].value;
	form.mark.selectedIndex=0;
}

function jumpurl(form)
{
	window.location=form.mark.options[form.mark.selectedIndex].value;
	form.mark.selectedIndex=0;
}