var LINKS_SWNUM = 9;
var LINKS_DFNUM = 4;

var LINKS_TITLES = new Array
( 
	"News", 
	"Features", 
	//"Brief&nbsp;History", 
	"Plugins",
	"Purchase",
	"Documentation", 
	"Web Demo",
	"Plugin Development",
	"Advertise",
	"Legal",
	"Support",
	"Downloads",
	"Products",
	//"Search",
	"Mailing&nbsp;Lists",
	"Privacy&nbsp;Policy"
)

var LINKS_ADDRESSES = new Array
(
	"news.html",
	"features.html",
	//"about.html",
	"plugins.html",
	"Purchase.html",
	"3Help/index.html",
	"webdemo.html",
	"Development_Lab.html",
    "Advertising.html",
	"legal.html",
	"../support.html",
	"../downloads.html",
	"../products.html",
	//"../search.html",
	"../maillists.html",
	"../privacy.html"
)

var LINKS_USE_NEW_WIN = new Array
(
	false,
	false,
	false,
	false,
	//false,
	true,
	false,
	false,
	false,
    false,
	false,
	false,
	false,
	false,
	//false,
	false
)

var LINKS_ICON_INACTIVE = new Array
(
	"images/Page_not_cur.jpg",
	"images/Page_not_cur.jpg",
	"images/Page_not_cur.jpg",
	"images/Page_not_cur.jpg",
	//"images/Page_not_cur.jpg",
	"images/Page_not_cur.jpg",
	"images/Page_not_cur.jpg",
	"images/Page_not_cur.jpg",
	"images/Page_not_cur.jpg",
	"images/Page_not_cur.jpg",
	"images/Page_not_cur.jpg",
	"images/Page_not_cur.jpg",
	"images/Page_not_cur.jpg",
	"images/Page_not_cur.jpg",
	//"images/Page_not_cur.jpg",
	"images/Page_not_cur.jpg"
)

var LINKS_ICON_ACTIVE = new Array
(
	"images/Page_current.jpg",
	"images/Page_current.jpg",
	"images/Page_current.jpg",
	"images/Page_current.jpg",
	//"images/Page_current.jpg",
	"images/Page_current.jpg",
	"images/Page_current.jpg",
	"images/Page_current.jpg",
	"images/Page_current.jpg",
	"images/Page_current.jpg",
	"images/Page_current.jpg",
	"images/Page_current.jpg",
	"images/Page_current.jpg",
	"images/Page_current.jpg",
	//"images/Page_current.jpg",
	"images/Page_current.jpg"
)

function PageCheck( address )
{
	var temp = document.URL
	if( address == temp.substring( temp.lastIndexOf("/")+1, temp.length ) )
		return true;
	return false
}

function Create_Index()
{
	var tester
	var ct

	document.writeln("<table border='0' cellpadding='3' cellspacing='0'>")
	document.writeln("<tr>")
	document.writeln("<td colspan='2'>")
	document.writeln("<center>")
	document.writeln("<font color='#006400' size='4'>")
	document.writeln("<b>Server Watch</b>")
	document.writeln("</font>")
	document.writeln("</center>")
	document.writeln("</td>")
	document.writeln("</tr>")

	for( ct=0; ct < LINKS_SWNUM; ct++ )
	{
		tester = PageCheck( LINKS_ADDRESSES[ct] )
		document.writeln("<tr>")
		document.writeln("<td>")
		if( tester == true )
		{
			document.write("<img src='" + LINKS_ICON_ACTIVE[ct] + "' border='0'>" )
		}
		else
		{
			if( LINKS_USE_NEW_WIN[ct] == false )
			{
				document.write("<a href='" + LINKS_ADDRESSES[ct] + "'>")
			}
			else
			{
				document.write("<a href=\"(Empty Reference!)\" onclick=\"window.open('" + LINKS_ADDRESSES[ct] + "'); return false;\">")
			}
			document.write("<img src='" + LINKS_ICON_INACTIVE[ct] + "' border='0'>" )
			document.writeln("</a>")
		}
		document.writeln("</td>")
		document.writeln("<td align='right' class='sw_bar'>")
		if( tester == false )
		{
			if( LINKS_USE_NEW_WIN[ct] == false )
			{
				document.write("<a href='" + LINKS_ADDRESSES[ct] + "' class='sw_bar'>")
			}
			else
			{
				document.write("<a href=\"(Empty Reference!)\" class=\"sw_bar\" onclick=\"window.open('" + LINKS_ADDRESSES[ct] + "'); return false;\">")
			}
		}
		document.write("<b>")
		document.write(LINKS_TITLES[ct])
		document.write("</b>")
		if( tester == false )
			document.writeln("</a>")
		document.writeln("</td>")
		document.writeln("</tr>")
	}

	document.writeln("<tr>")
	document.write("<td colspan='2' align='center'><font size='4' color='#006400'>")
	document.write("<b>DFSoftware</b>")
	document.write("</font>")
	document.writeln("</td>")
	document.writeln("</tr>")

	for( ; ct < LINKS_SWNUM + LINKS_DFNUM; ct++ )
	{
		tester = PageCheck( LINKS_ADDRESSES[ct] )
		document.writeln("<tr>")
		document.writeln("<td>")
		if( tester == true )
		{
			document.write("<img src='" + LINKS_ICON_ACTIVE[ct] + "' border='0'>" )
		}
		else
		{
			
			if( LINKS_USE_NEW_WIN[ct] == false )
			{
				document.write("<a href='" + LINKS_ADDRESSES[ct] + "'>")
			}
			else
			{
				document.write("<a href=\"(Empty Reference!)\" onclick=\"window.open('" + LINKS_ADDRESSES[ct] + "'); return false;\">")
			}
			document.write("<img src='" + LINKS_ICON_INACTIVE[ct] + "' border='0'>" )
			document.writeln("</a>")
		}
		document.writeln("</td>")
		document.writeln("<td align='right'>")
		if( tester == false )
		{
			if( LINKS_USE_NEW_WIN[ct] == false )
			{
				document.write("<a href='" + LINKS_ADDRESSES[ct] + "' class='sw_bar'>")
			}
			else
			{
				document.write("<a href=\"(Empty Reference!)\" class=\"sw_bar\" onclick=\"window.open('" + LINKS_ADDRESSES[ct] + "'); return false;\">")
			}
		}
		document.write("<b>")
		document.write(LINKS_TITLES[ct])
		document.write("</b>")
		if( tester == false )
			document.writeln("</a>")
		document.writeln("</td>")
		document.writeln("</tr>")
	}

	document.writeln("</table>")
}