// ICASA table of contents

//document.write("<img src='images/header_name.jpg' border=0 alt='ICASA logo'><br /><br />")


var subdir=location.href.split('/');
var menuItem=subdir.length-2;
var myURL="www.icasa.net";		//When upload change to www.icasa.net


//Control for documents in main folder
var start=location.href.lastIndexOf("/")+1
var end=location.href.lastIndexOf(".")


//This line is used for testing
//document.write(subdir[menuItem]); 



document.write("<ul>");

document.write("<li>");
if (location.href.substring(start,end)=="rss") {document.write("<a class='toc' href='index.html'>Home Page</a>")}
else if (subdir[menuItem]==myURL){document.write("<span class='current'>Home Page</span>");}
else {document.write("<a class='toc' href='../index.html'>Home Page</a>");}
document.write("</li>");


document.write("<li>");
document.write("<a class='toc' href='http://groups.google.com/group/ICASA' target='_blank'>ICASA Forum</font></a>")
document.write("</li>");


document.write("<li>");
if (subdir[menuItem]=="about_us") {document.write("<span class='current'>About ICASA</span>");}
else if (subdir[menuItem]==myURL) {document.write("<a class='toc' href='about_us/index.html'>About ICASA</a>");}
else {document.write("<a class='toc' href='../about_us/index.html'>About ICASA</a>");}
document.write("</li>");


document.write("<li>");
if (subdir[menuItem]=="contact") {document.write("<span class='current'>Contact ICASA</span>");}
else if (subdir[menuItem]==myURL) {document.write("<a class='toc' href='contact/index.html'>Contact ICASA</a>");}
else {document.write("<a class='toc' href='../contact/index.html'>Contact ICASA</a>");}
document.write("</li>");


document.write("<li>");
if (subdir[menuItem]=="membership") {document.write("<span class='current'>Join ICASA</span>");}
else if (subdir[menuItem]==myURL) {document.write("<a class='toc' href='membership/index.html'>Join ICASA</a>");}
else {document.write("<a class='toc' href='../membership/index.html'>Join ICASA</a>");}
document.write("</li>");


document.write("<li>");
if (subdir[menuItem]=="bod") {document.write("<span class='current'>Board of Directors</span>");}
else if (subdir[menuItem]==myURL) {document.write("<a class='toc' href='bod/index.html'>Board of Directors</a>");}
else {document.write("<a class='toc' href='../bod/index.html'>Board of Directors</a>");}
document.write("</li>");


document.write("<li>");
if (subdir[menuItem]=="minutes") {document.write("<span class='current'>Meeting Minutes</span>");}
else if (subdir[menuItem]==myURL) {document.write("<a class='toc' href='minutes/index.html'>Meeting Minutes</a>");}
else {document.write("<a class='toc' href='../minutes/index.html'>Meeting Minutes</a>");}
document.write("</li>");


document.write("<li>");
if (subdir[menuItem]=="events") {document.write("<span class='current'>Events Calendar</span>");}
else if (subdir[menuItem]==myURL) {document.write("<a class='toc' href='events/index.html'>Events Calendar</a>");}
else {document.write("<a class='toc' href='../events/index.html'>Events Calendar</a>");}
document.write("</li>");


document.write("<li>");
if (subdir[menuItem]=="education") {document.write("<span class='current'>Education</span>");}
else if (subdir[menuItem]==myURL) {document.write("<a class='toc' href='education/index.html'>Education</a>");}
else {document.write("<a class='toc' href='../education/index.html'>Education</a>");}
document.write("</li>");


document.write("<li>");
if (subdir[menuItem]=="proceedings") {document.write("<span class='current'>Proceedings</span>");}
else if (subdir[menuItem]==myURL) {document.write("<a class='toc' href='proceedings/index.html'>Proceedings</a>");}
else {document.write("<a class='toc' href='../proceedings/index.html'>Proceedings</a>");}
document.write("</li>");


document.write("<li>");
if (subdir[menuItem]=="publications") {document.write("<span class='current'>Publications</span>");}
else if (subdir[menuItem]==myURL) {document.write("<a class='toc' href='publications/index.html'>Publications</a>");}
else {document.write("<a class='toc' href='../publications/index.html'>Publications</a>");}
document.write("</li>");


document.write("<li>");
if (subdir[menuItem]=="standards") {document.write("<span class='current'>Data Standards</span>");}
else if (subdir[menuItem]==myURL) {document.write("<a class='toc' href='DataStandards/index.html'>Data Standards</a>");}
else {document.write("<a class='toc' href='../DataStandards/index.html'>Data Standards</a>");}
document.write("</li>");


document.write("<li>");
if (subdir[menuItem]=="modular") {document.write("<span class='current'>Modular Models</span>");}
else if (subdir[menuItem]==myURL) {document.write("<a class='toc' href='modular/index.html'>Modular Models</a>");}
else {document.write("<a class='toc' href='../modular/index.html'>Modular Models</a>");}
document.write("</li>");


document.write("<li>");
if (subdir[menuItem]=="tillage") {document.write("<span class='current'>Modeling Tillage</span>");}
else if (subdir[menuItem]==myURL) {document.write("<a class='toc' href='tillage/index.html'>Modeling Tillage</a>");}
else {document.write("<a class='toc' href='../tillage/index.html'>Modeling Tillage</a>");}
document.write("</li>");


document.write("<li>");
if (subdir[menuItem]=="oryza") {document.write("<span class='current'>ORYZA2000</span>");}
else if (subdir[menuItem]==myURL) {document.write("<a class='toc' href='oryza/index.html'>ORYZA2000</a>");}
else {document.write("<a class='toc' href='../oryza/index.html'>ORYZA2000</a>");}
document.write("</li>");


document.write("<li>");
if (subdir[menuItem]=="dssat") {document.write("<span class='current'>DSSAT Software</span>");}
else if (subdir[menuItem]==myURL) {document.write("<a class='toc' href='dssat/index.html'>DSSAT Software</a>");}
else {document.write("<a class='toc' href='../dssat/index.html'>DSSAT Software</a>");}
document.write("</li>");


document.write("<li>");
if (subdir[menuItem]=="listserver") {document.write("<span class='current'>DSSAT Listserver</span>");}
else if (subdir[menuItem]==myURL) {document.write("<a class='toc' href='listserver/index.html'>DSSAT Listserver</a>");}
else {document.write("<a class='toc' href='../listserver/index.html'>DSSAT Listserver</a>");}
document.write("</li>");


document.write("<li>");
if (subdir[menuItem]=="toolkit") {document.write("<span class='current'>Tools</span>");}
else if (subdir[menuItem]==myURL) {document.write("<a class='toc' href='toolkit/index.html'>Tools</a>");}
else {document.write("<a class='toc' href='../toolkit/index.html'>Tools</a>");}
document.write("</li>");


document.write("<li>");
if (subdir[menuItem]=="data_exchange") {document.write("<span class='current'>Data Exchange</span>");}
else if (subdir[menuItem]==myURL) {document.write("<a class='toc' href='data_exchange/index.html'>Data Exchange</a>");}
else {document.write("<a class='toc' href='../data_exchange/index.html'>Data Exchange</a>");}
document.write("</li>");


document.write("<li>");
if (subdir[menuItem]=="applications") {document.write("<span class='current'>Applications</span>");}
else if (subdir[menuItem]==myURL) {document.write("<a class='toc' href='applications/index.html'>Applications</a>");}
else {document.write("<a class='toc' href='../applications/index.html'>Applications</a>");}
document.write("</li>");


document.write("<li>");
if (subdir[menuItem]=="ipr") {document.write("<span class='current'>Intellect Property</span>");}
else if (subdir[menuItem]==myURL) {document.write("<a class='toc' href='ipr/index.html'>Intellect Property</a>");}
else {document.write("<a class='toc' href='../ipr/index.html'>Intellect Property</a>");}
document.write("</li>");


document.write("<li>");
if (subdir[menuItem]=="weather_data") {document.write("<span class='current'>Weather Data</span>");}
else if (subdir[menuItem]==myURL) {document.write("<a class='toc' href='weather_data/index.html'>Weather Data</a>");}
else {document.write("<a class='toc' href='../weather_data/index.html'>Weather Data</a>");}
document.write("</li>");


document.write("<li>");
if (subdir[menuItem]=="summaries") {document.write("<span class='current'>Summaries</span>");}
else if (subdir[menuItem]==myURL) {document.write("<a class='toc' href='summaries/index.html'>Summaries</a>");}
else {document.write("<a class='toc' href='../summaries/index.html'>Summaries</a>");}
document.write("</li>");


document.write("<li>");
if (subdir[menuItem]=="links") {document.write("<span class='current'>Links</span>");}
else if (subdir[menuItem]==myURL) {document.write("<a class='toc' href='links/index.html'>Links</a>");}
else {document.write("<a class='toc' href='../links/index.html'>Links</a>");}
document.write("</li>");


document.write("<li>");
if (subdir[menuItem]==myURL) {
	document.write("<img src='images/xml.png' style='border:none; vertical-align:bottom;'>")
	if (location.href.substring(start,end)=="rss") {document.write("<span class='current'>RSS Feed</span>");}
	else {document.write("<a class='toc' href='rss.html'>RSS Feed</a>");}
	}//if myURL
else {document.write("<a class='toc' href='../rss.html'><img src='../images/xml.png' style='border:none; vertical-align:bottom;'>RSS Feed</a>");}
document.write("</li>");


document.write("</ul>");
