/*
subnavi.js

created 14-03-2005 oBu + js
last edited 11-08-2005 dg
*/

// uses page and pathpre from navigation.js

var numberMainNavi=4; //Anzahl der mainnavigationpoints (um das mehrdimensonale Array zu erstellen)

var url = new Array();
var urlString = new Array();

for (i=0; i<numberMainNavi; i++) {	//mehrdimensonales Array erstellen
	url[i]=new Array();
	urlString[i]=new Array();
}

// begin edit here

urlString[0][0]="P&G 's commitment to safety";
	urlString[0][1]="Protecting People";
	urlString[0][2]="Skin and Detergents";
	urlString[0][3]="Enzymes and Detergents";
urlString[1][0]="Innovation at P&G";
	urlString[1][1]="Product Development";
	urlString[1][2]="Consumer Research";		
	urlString[1][3]="Developing new products";
urlString[2][0]="Environmental protection";
	urlString[2][1]="Protecting the Environment";
	urlString[2][2]="Biodegradability";	
	urlString[2][3]="Toxicity";
urlString[3][0]="And find even more information on www.scienceinthebox.com";
	urlString[3][1]="More information";	

// end edit here
	
url[0][0]="protecting-people";
	url[0][1]="protecting-people";
	url[0][2]="skin-detergents";
	url[0][3]="enzymes-detergents";
url[1][0]="product_development";
	url[1][1]="product_development";
	url[1][2]="consumerresearch";
	url[1][3]="developing-new-products";
url[2][0]="protecting-environment";
	url[2][1]="protecting-environment";
	url[2][2]="biodegradability";
	url[2][3]="toxicity";
url[3][0]="more-information";
	url[3][1]="more-information";

string="";
ExtendedNavi="";
var includeExtendedNavi=0;


for (i=0; i<urlString.length; i++) {	
	string += "<tr><td><a href=\""+pathpre+url[i][0]+".html\" class=\"secNav\" style=\"padding-left:14\"><img src=\""+pathpre+"gfx/arrow-on-yellow.gif\" alt=\"\" width=\"8\" height=\"9\" border=\"0\">"+urlString[i][0]+"</a></td></tr>"; //write mainNavipoint
	for (j=1; j<urlString[i].length; j++) {	//write extendedNavipoint, wird nur ausgewertet, wenn includeExtendedNavi==1;
		if (url[i][j] == page){ //navipoint-url=page-url -> dieser mainNavipoint muss expandiert sein
			includeExtendedNavi=1;
			ExtendedNavi += "<tr><td><a href=\""+pathpre+url[i][j]+".html\" class=\"secNavActive\" style=\"padding-left:21\"><img src=\""+pathpre+"gfx/arrow-on-yellow.gif\" alt=\"\" width=\"8\" height=\"9\" border=\"0\">"+urlString[i][j]+"</a></td></tr>";
		} else {
			ExtendedNavi += "<tr><td><a href=\""+pathpre+url[i][j]+".html\" class=\"secNav\" style=\"padding-left:21\"><img src=\""+pathpre+"gfx/arrow-on-yellow.gif\" alt=\"\" width=\"8\" height=\"9\" border=\"0\">"+urlString[i][j]+"</a></td></tr>";
		}
	}
	if (includeExtendedNavi==1) {
		string += ExtendedNavi;
		includeExtendedNavi=0;
	}
	ExtendedNavi="";
}

navString = "";

navString += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#FFFFC1\">";
navString += "<tr><td><img src=\""+pathpre+"gfx/navileft-header.gif\" alt=\"\" width=\"168\" border=\"0\"></td></tr>";
navString += string;
navString += "<tr><td><img src=\""+pathpre+"gfx/trans.gif\" alt=\"\" width=\"1\" height=\"14\" border=\"0\"></td></tr>";
navString += "<tr><td bgcolor=\"#FF8B04\"><img src=\""+pathpre+"gfx/trans.gif\" alt=\"\" width=\"168\" height=\"1\" border=\"0\"></td></tr>";
navString += "</table>";

document.write(navString);
