function Space(len){
var j;
	for(j=0; j < len; j++){
		document.write('&nbsp;');
	}
}

function DrawNavBar(pixlen, nitems, links, tlinks, curitem, leadspace, trailspace,pix1path){
var i;	
	document.write('<TABLE WIDTH="',pixlen,'" CELLPADDING="0" CELLSPACING="0" BORDER="0"  CLASS="tablebackground">');
	document.write('<TR>');
	document.write('<TD WIDTH="',pixlen,'">');
		document.write('<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="tablebackground">');
		document.write('<TR>');		
		for(i=0; i < nitems; i++){		  
			document.write('<TD');
			if(i == (curitem-1)){			
				document.write(' class="navtophighlight">');
			}
			else{
				document.write('>');
			}
			Space(leadspace);
			document.write('<A HREF="',links[i],'" ');
			if(i == (curitem-1)){
				document.write(' class="navtophighlight">');
			}
			else{
				document.write(' class="navtop">');
			}
			document.write(tlinks[i]);			
			document.write('</A>');
			Space(trailspace);
			document.write('</TD>');	 					
		}
		document.write('</TR>');
		document.write('</TABLE>');
	document.write('</TD>');
	document.write('</TR>');
	document.write('<TR>');
		document.write('<td height="6" class="navtophighlight">');
		document.write('<IMG SRC="')
		document.write(pix1path,'" WIDTH="1" HEIGHT="1" BORDER="0">');
		document.write('</td>');
	document.write('</TR>');	
	document.write('</TABLE>');	
}

function DrawNavBar2(pixlen, nitems, links, tlinks, curitem, leadspace, trailspace,pix1path){
var i;	
	document.write('<TABLE WIDTH="',pixlen,'" CELLPADDING="0" CELLSPACING="0" BORDER="0"  CLASS="tablebackground">');
	document.write('<TR>');
	document.write('<TD WIDTH="',pixlen,'">');
		document.write('<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="tablebackground">');
		document.write('<TR>');		
		for(i=0; i < nitems; i++){		  
			document.write('<TD');
			if(i == (curitem-1)){			
				document.write(' class="navtophighlight">');
			}
			else{
				document.write('>');
			}
			Space(leadspace);
			document.write('<A HREF="',links[i],'" ');
			if(i == (curitem-1)){
				document.write(' class="navtophighlight">');
			}
			else{
				document.write(' class="navtop">');
			}
			document.write(tlinks[i]);			
			document.write('</A>');
			Space(trailspace);
			document.write('</TD>');	 					
		}
		document.write('</TR>');
		document.write('</TABLE>');
	document.write('</TD>');
	document.write('</TR>');	
	document.write('</TABLE>');	
}

function DrawNavBar2Targ(pixlen, nitems, links, targets, tlinks, curitem, leadspace, trailspace,pix1path){
var i;	
	document.write('<TABLE WIDTH="',pixlen,'" CELLPADDING="0" CELLSPACING="0" BORDER="0"  CLASS="tablebackground">');
	document.write('<TR>');
	document.write('<TD WIDTH="',pixlen,'">');
		document.write('<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="tablebackground">');
		document.write('<TR>');		
		for(i=0; i < nitems; i++){		  
			document.write('<TD');
			if(i == (curitem-1)){			
				document.write(' class="navtophighlight">');
			}
			else{
				document.write('>');
			}
			Space(leadspace);
			document.write('<A HREF="',links[i],'" ');
			if(targets[i].length)
				document.write('target="',targets[i],'" ');			
			if(i == (curitem-1)){
				document.write(' class="navtophighlight">');
			}
			else{
				document.write(' class="navtop">');
			}
			document.write(tlinks[i]);			
			document.write('</A>');
			Space(trailspace);
			document.write('</TD>');	 					
		}
		document.write('</TR>');
		document.write('</TABLE>');
	document.write('</TD>');
	document.write('</TR>');	
	document.write('<TR>');
		document.write('<td height="6" class="navtophighlight">');
		document.write('<IMG SRC="')
		document.write(pix1path,'" WIDTH="1" HEIGHT="1" BORDER="0">');
		document.write('</td>');
	document.write('</TR>');
	document.write('</TABLE>');	
}

