var
	pfrLen = 0;
	pfrBackup = "";
	
function setBackupSegment(){
	bix=0;
	eix=0;
	while(eix>-1){
		eix=pathFromRoot.indexOf("/",bix);
		bix=eix+1;
		if(eix>-1)
			pfrBackup = pfrBackup + "../";
	}
}

function getPath(path){
	if(pathFromRoot.indexOf("http")==0)
		return pathFromRoot+path;
	else if(path.indexOf(pathFromRoot)==0)
		return path.substring(pfrLen);
	else
		return pfrBackup+path;
}

	pfrLen = pathFromRoot.length;
	setBackupSegment();
	
document.writeln('<td valign="TOP" bgcolor="#CCCCCC">');
document.writeln('<table width="144" cellspacing="1" cellpadding="0">');
document.writeln('<tr><td align="RIGHT"><img src=' + getPath("../pcp-logo.gif") + ' alt="Port City Pacers" width="140" height="139"></td></tr>');
document.writeln('<tr><td>');
document.writeln('<center><img src=' + getPath("../space.gif") + ' width=142 height=5></center>');
document.writeln('<font size=3>Port City Pacers</font>');
document.writeln('<center><img src=' + getPath("../hbar.gif") + ' width=142 height=2></center>');
document.writeln('</td></tr>');
document.writeln('');
document.writeln('<tr><td>');
document.writeln('<font size=2>');
document.writeln('<a href=' + getPath("../index.html") + '>PCP Home</a>');
document.writeln('<br><a href=' + getPath("../whatsnew.html") + '>What\'s New</a>');
document.writeln('<br><a href=' + getPath("../forum/index_1.html") + '>Forum</a>');
document.writeln('</font>');
document.writeln('</td></tr>');
document.writeln('');
document.writeln('<tr><td>');
document.writeln('<center><img src=' + getPath("../space.gif") + ' width=142 height=5></center>');
document.writeln('<font size=3>Azalea Trail Run</font>');
document.writeln('<center><img src=' + getPath("../hbar.gif") + ' width=142 height=2></center>');
document.writeln('</td></tr>');
document.writeln('<tr><td>');
document.writeln('<font size=2>');
document.writeln('<a href=' + getPath("index.html") + '>ATR Home</a>');
document.writeln('<br><a href=' + getPath("../races/maps/atr.pdf") + '>Course Maps</a>');
document.writeln('<br><a href=' + getPath("records.html") + '>Course Records</a>');
document.writeln('<br><a href=' + getPath("pastwinners.html") + '>Past Winners</a>');
document.writeln('<br><a href=' + getPath("20fastest.html") + '>20 Fastest Times</a>');
document.writeln('<br><a href=' + getPath("results/index.html") + '>Results</a>');
document.writeln('</font>');
document.writeln('</td></tr>');
document.writeln('');
document.writeln('<tr><td>');
document.writeln('<center><img src=' + getPath("../space.gif") + ' width=142 height=5></center>');
document.writeln('<font size=3>ATR 2012</font>');
document.writeln('<center><img src=' + getPath("../hbar.gif") + ' width=142 height=2></center>');
document.writeln('</td></tr>');
document.writeln('<tr><td valign="middle">');
document.writeln('<font size=2>');
document.writeln('<a href=' + getPath("onlinepmtredirect.html") + '>Register Online</a>');
//document.writeln('<br><a href=' + getPath("brochure.pdf") + '>Brochure</a>');	
document.writeln('<br><a href=' + getPath("entryform.pdf") + '>Entry Form</a>');	
document.writeln('<br><a href=' + getPath("entries.html") + '>Entries Received</a>');
//	document.writeln('<a href=' + getPath("news/index.html") + '>Latest News</a>');
document.writeln('<br><a href=' + getPath("sponsors.html") + '>Sponsors</a>');
document.writeln('<br><a href=' + getPath("sponsorship/index.html") + '>Sponsorships</a>');
document.writeln('<br><a href=' + getPath("tshirt-designs/index.html") + '>T-Shirt Designs</a>');
document.writeln('<br><a href=' + getPath("races.html") + '>The Races</a>');

document.writeln('<br>&nbsp;');
document.writeln('<br><a href=' + getPath("accommodations.html") + '>Accommodations</a>');
document.writeln('<br><a href=' + getPath("awards.html") + '>Awards</a>');
document.writeln('<br><a href=' + getPath("chips/index.html") + '>Chip Timing</a>');
document.writeln('<br><a href=' + getPath("festival.html") + '>Festival</a>');
document.writeln('<br><a href=' + getPath("expo/index.html") + '>Health &amp; Fitness Expo</a>');
document.writeln('<br><a href=' + getPath("headquarters.html") + '>Race Headquarters</a>');
document.writeln('<br><a href=' + getPath("registration.html?1") + '>Registration &amp; Fees</a>');
document.writeln('<br><a href=' + getPath("pickup.html") + '>Packet &amp; T-Shirts</a>');
document.writeln('<br><a href=' + getPath("photos.html") + '>Photographs</a>');
document.writeln('<br><a href=' + getPath("postrace.html") + '>Post-Race Activities</a>');
document.writeln('<br><a href=' + getPath("schedule.html") + '>Schedule</a>');
document.writeln('<br><a href=' + getPath("schoolprogram.html") + '>School Program</a>');
document.writeln('<br><a href=' + getPath("schooltraining.html") + '>School Training</a>');
document.writeln('<br><a href=' + getPath("specialrunners.html") + '>Special Runners</a>');
document.writeln('<br><a href=' + getPath("teams.html") + '>Teams</a>');
document.writeln('<br><a href=' + getPath("walkers.html") + '>Walkers</a>');
document.writeln('<br><a href=' + getPath("weather.html") + '>Weather</a>');
document.writeln('<br><a href=' + getPath("wheelchair.html") + '>Wheelchairs</a>');
document.writeln('</font>');
document.writeln('</td></tr>');
document.writeln('');
document.writeln('<tr><td>');
document.writeln('<center><img src=' + getPath("../space.gif") + ' width=142 height=5></center>');
document.writeln('<font size=3>Other</font>');
document.writeln('<center><img src=' + getPath("../hbar.gif") + ' width=142 height=2></center>');
document.writeln('</td></tr>');
document.writeln('<tr><td>');
document.writeln('<font size=2>');
document.writeln('<a href=' + getPath("../links.html") + '>Links</a>');
document.writeln('<br><a href=' + getPath("../contact.html") + '>Contact PCP</a>');
document.writeln('</font>');
document.writeln('</td></tr>');
document.writeln('<tr><td align="center"><img src=' + getPath("../space.gif") + ' width=142 height=50></td><td align="center"></td></tr>');
document.writeln('<tr><td align="center"><img src=' + getPath("../rrca.gif") + ' alt="Road Runner\'s Club of America" width=116 height=170></td></tr>');
document.writeln('</table>');
document.writeln('</td>');

