
ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false
ns6 = (document.getElementById)? true:false
		

function navOver(id) 
{
	var color = '#ff0000';
	
	
	if (document.all)
		document.all[id].style.backgroundColor = color;
	else if (document.getElementById)
		document.getElementById(id).style.backgroundColor = color;
	else if (document.layers)
	{
		if( document.layers[id] )
		{
			document.layers[id].bgColor = color;
		}
	}
}

function navOff(id) 
{
	var color = '#000000';
	
	
	if (document.all)
		document.all[id].style.backgroundColor = color;
	else if (document.getElementById)
		document.getElementById(id).style.backgroundColor = color;
	else if (document.layers)
	{
		if( document.layers[id] )
		{
			document.layers[id].bgColor = color;
		}  
	}
}


function chgImg(imgField,newImg) {
             if (document.images) {
				document[imgField].src = eval(newImg + ".src")
					}
				}

		

function show(id) {
	if (ns4) {
		document.layers[id].visibility = "show";
	}
	else if (ie4) {
		document.all[id].style.visibility = "visible";
	} 
	else if (ns6) {
		document.getElementById(id).style.visibility = "visible";
	}
}

function hide(id) {
	if (ns4) {
		document.layers[id].visibility = "hide";
	}
	else if (ie4) {
		document.all[id].style.visibility = "hidden";
	} 
	else if (ns6) {
		document.getElementById(id).style.visibility = "hidden";
	}
}



function makeNav(navTitle,navNumber,linkLocation) {
	with( document )
	{
	write( '<td width="80" class="navOff" id="'+navNumber+'" onMouseover="navOver(\''+navNumber+'\');show(\'sub'+navNumber+'\');" onMouseout="navOff(\''+navNumber+'\');hide(\'sub'+navNumber+'\');" onClick="document.location=\''+linkLocation+'\';" bgcolor="#000000"><a class="navText" href="'+linkLocation+'" onMouseover="navOver(\''+navNumber+'\');show(\'sub'+navNumber+'\');" onMouseout="navOff(\''+navNumber+'\');hide(\'sub'+navNumber+'\');"><img src="images/spacer.gif" border="0" height="2" width="20"><br>&nbsp;'+navTitle+'&nbsp;<br><img src="images/spacer.gif" border="0" height="2" width="20"></a></td>' );
	}
}

function makeSubNav(navTitle,navNumber,subNumber,linkLocation) {
	with( document )
	{
	write( '<td class="navOff" id="sub'+navNumber+''+subNumber+'" onMouseover="navOver(\'sub'+navNumber+''+subNumber+'\');show(\'sub'+navNumber+'\');" onMouseout="navOff(\'sub'+navNumber+''+subNumber+'\');hide(\'sub'+navNumber+'\');" onClick="document.location=\''+linkLocation+'\';" bgcolor="#000000"><a class="navText" href="'+linkLocation+'" onMouseover="navOver(\'sub'+navNumber+''+subNumber+'\');show(\'sub'+navNumber+'\');" onMouseout="navOff(\'sub'+navNumber+''+subNumber+'\');hide(\'sub'+navNumber+'\');"><img src="images/spacer.gif" border="0" height="2" width="20"><br>&nbsp;'+navTitle+'&nbsp;<br><img src="images/spacer.gif" border="0" height="2" width="20"></a></td>' );
	}
}


function makeNavRed(navTitle,navNumber,linkLocation) {
	with( document )
	{
	write( '<td width="80" class="navOff" id="'+navNumber+'" onMouseover="show(\'sub'+navNumber+'\');" onMouseout="hide(\'sub'+navNumber+'\');" onClick="document.location=\''+linkLocation+'\';" bgcolor="#ff0000"><a class="navText" href="'+linkLocation+'" onMouseover="show(\'sub'+navNumber+'\');" onMouseout="hide(\'sub'+navNumber+'\');"><img src="images/spacer.gif" border="0" height="2" width="20"><br>&nbsp;'+navTitle+'&nbsp;<br><img src="images/spacer.gif" border="0" height="2" width="20"></a></td>' );
	}
}

function makeNavL(navTitle,navNumber,linkLocation) {
	with( document )
	{
	write( '<td width="140" class="navOff" id="'+navNumber+'" onMouseover="navOver(\''+navNumber+'\');show(\'sub'+navNumber+'\');" onMouseout="navOff(\''+navNumber+'\');hide(\'sub'+navNumber+'\');" onClick="document.location=\''+linkLocation+'\';" bgcolor="#000000"><a class="navText" href="'+linkLocation+'" onMouseover="navOver(\''+navNumber+'\');show(\'sub'+navNumber+'\');" onMouseout="navOff(\''+navNumber+'\');hide(\'sub'+navNumber+'\');"><img src="images/spacer.gif" border="0" height="2" width="20"><br>&nbsp;'+navTitle+'&nbsp;<br><img src="images/spacer.gif" border="0" height="2" width="20"></a></td>' );
	}
}

function makeActiveLine(navNumber,subNumber) {
	with( document )
	{
	write( '<td height="1" onMouseover="show(\'sub'+navNumber+'\');" onMouseout="hide(\'sub'+navNumber+'\');" bgcolor="#bfbfbf"><a onMouseover="show(\'sub'+navNumber+'\');" onMouseout="hide(\'sub'+navNumber+'\');"><img src="images/spacer.gif" border="0" height="1" width="80"></a></td>' );
	}
}


function makeSpacerCell() {
	with( document )
	{
	write( '<td class="subBlack" bgcolor="#000000"><img src="images/spacer.gif" border="0" height="2" width="20"><br>&nbsp;<br><img src="images/spacer.gif" border="0" height="2" width="20"></td>' );
	}
}

function makeImageBlock(imageName,captionText) {
	with( document )
	{
	write( '<table border="0" width="148" cellpadding="0" cellspacing="0" align="right">' );
	write( '<tr>' );
	write( '<td width="10"><img src="../images/spacer.gif" border="0" height="10" width="10"></td>' );
	write( '<td width="1" bgcolor="#bfbfbf"><img src="../images/spacer.gif" border="0" height="1" width="1"></td>' );
	write( '<td width="20"><img src="../images/spacer.gif" border="0" height="20" width="20"></td>' );
	write( '<td><img src="../images/'+imageName+'" border="0" width="117" height="127"><br><br>'+captionText+'</td>' );
	write( '</tr>' );
	write( '</table>' );
	}
}
