/* Redshift CSS and Javascript Drop down Menu Definition. Rudolf Vavruch 2005 */

// EDIT THE STUFF BELOW

var rscssm_closeTime = 300; // how long to wait before closing a menu

// MAIN MENUS
def_list = [];
// "id", "vertical|horizontal", "href", "image_path/image_name.ext", "image width", "image height", "alt text"
def_list[0] = ["menudropabout", "horizontal", "aboutus.html", "images/aboutbut_f2.gif", "81", "37", "About Us"]
def_list[0][7] = [];

// "id", "vertical|horizontal", "href", "image_path/image_name.ext", "image width", "image height", "alt text"
def_list[1] = ["menudropprojects", "vertical", "#", "images/projectsbut_f2.gif", "76", "37", "Projects"]
def_list[1][7] = [];
// "item name", "href"
def_list[1][7][0] = ["Overview", "projectsoverview.html"];
def_list[1][7][1] = ["All", "projectsoverview.html"];
def_list[1][7][2] = ["0 - 9", "$0"];
def_list[1][7][3] = ["A - H", "$1"];
def_list[1][7][4] = ["I - P", "$2"];
def_list[1][7][5] = ["Q - Z", "$3"];

// "id", "vertical|horizontal", "href", "image_path/image_name.ext", "image width", "image height", "alt text"
def_list[2] = ["menudropdocuments", "horizontal", "#", "images/documentsbut_f2.gif", "84", "37", "Documents"]
def_list[2][7] = [];
// "item name", "href"
def_list[2][7][0] = ["Overview", "documentsoverview.html"];
def_list[2][7][1] = ["Land Reports", "landreports.html"];
def_list[2][7][2] = ["Development Issues", "developmentissues.html"];
def_list[2][7][3] = ["Academic Papers", "academicpapers.html"];
def_list[2][7][4] = ["Newspaper Articles", "newspaperarticles.html"];
def_list[2][7][5] = ["Links", "links.html"];

// "id", "vertical|horizontal", "href", "image_path/image_name.ext", "image width", "image height", "alt text"
def_list[3] = ["menudropmediastore", "horizontal", "mediastore.html", "images/mediastorebut_f2.gif", "89", "37", "Media Store"]
def_list[3][7] = [];

// "id", "vertical|horizontal", "href", "image_path/image_name.ext", "image width", "image height", "alt text"
def_list[4] = ["menudropgallery", "horizontal", "gallery.html", "images/gallerybut_f2.gif", "67", "37", "Gallery"]
def_list[4][7] = [];

// "id", "vertical|horizontal", "href", "image_path/image_name.ext", "image width", "image height", "alt text"
def_list[5] = ["menudropcontactus", "horizontal", "contactus.html", "images/contactusbut_f2.gif", "95", "37", "Contact Us"]
def_list[5][7] = [];


// SUB MENUS
sub_list = [];
// "id", "vertical|horizontal", "href", "image_path/image_name.ext", "image width", "image height", "alt text"
sub_list[0] = ["submenudrop09", "horizontal", "#", "#", "156", "32", ""]
sub_list[0][7] = [];
// "item name", "href"
sub_list[0][7][0] = ["7400 Houses Project", "7400housesproject.html"];

// "id", "vertical|horizontal", "href", "image_path/image_name.ext", "image width", "image height", "alt text"
sub_list[1] = ["submenudropAE", "horizontal", "#", "#", "156", "32", ""]
sub_list[1][7] = [];
// "item name", "href"
sub_list[1][7][0] = ["Africa Platform", "africaplatform.html"];
sub_list[1][7][1] = ["Aliwal Street Inner City Housing Development", "aliwalstreet.html"];
sub_list[1][7][2] = ["Amaoti Upgrade", "amaotiupgrade.html"];
sub_list[1][7][3] = ["Cement Factory Upgrade", "cementfactory.html"];
sub_list[1][7][4] = ["Cwebeni Horse Trails", "cwebeni.html"];
sub_list[1][7][5] = ["Community Toilet Blocks, Durban", "communitytoilets.html"];
sub_list[1][7][6] = ["Ekuphumleni Housing Association", "ekuphumleni.html"];
sub_list[1][7][7] = ["Emergency Shelters", "emergencyshelters.html"];

// "id", "vertical|horizontal", "href", "image_path/image_name.ext", "image width", "image height", "alt text"
sub_list[2] = ["submenudropKO", "horizontal", "#", "#", "156", "32", ""]
sub_list[2][7] = [];
// "item name", "href"
sub_list[2][7][0] = ["Khanyisa Community Centre", "khanyisa.html"];
sub_list[2][7][1] = ["Khayelitsha Site C People’s Housing", "khayelitshasite.html"];
sub_list[2][7][2] = ["Klipfontein Glebe", "klipfonteinglebe.html"];
sub_list[2][7][3] = ["Leandra House Construction", "leandrahouse.html"];
sub_list[2][7][4] = ["Manteku Seed Project", "mantekuseed.html"];
sub_list[2][7][5] = ["Mzamba Tours", "mzambatours.html"];
sub_list[2][7][6] = ["N2 Gateway Project", "n2gateway.html"];
sub_list[2][7][7] = ["Nyati Family Clan", "nyatifamilyclan.html"];
sub_list[2][7][8] = ["Orphans and Vulnerable Children Network", "orphans.html"];
sub_list[2][7][9] = ["Piesang River Double Storeys", "piesangriver.html"];
sub_list[2][7][10] = ["Port St. John", "portstjohns.html"];

// "id", "vertical|horizontal", "href", "image_path/image_name.ext", "image width", "image height", "alt text"
sub_list[3] = ["submenudropPV", "horizontal", "#", "#", "156", "32", ""]
sub_list[3][7] = [];
// "item name", "href"
sub_list[3][7][0] = ["Ruo Emoh Housing Development", "ruoemoh.html"];
sub_list[3][7][1] = ["Safe Haven For Abused Women", "safehaven.html"];
sub_list[3][7][2] = ["Savings Mobilization and Management", "savingsmobilization.html"];
sub_list[3][7][3] = ["Settlement Profile", "settlementprofile.html"];
sub_list[3][7][4] = ["Snail Project", "snailproject.html"];
sub_list[3][7][5] = ["Solid Waste Network", "solidwastenetwork.html"];
sub_list[3][7][6] = ["VukuZenzele Creche and Old Age Home", "vukuzenzelecreche.html"];
sub_list[3][7][7] = ["Wilderness N2", "wildernessn2.html"];

// STOP EDITTING HERE

// create menu drop downs so long
var menuDump = "";
var rscssm_dropdowns_nameslist = [];
var rscssm_subdropdowns_nameslist = [];

for (i=0; i<def_list.length; i++) {
	rscssm_dropdowns_nameslist[i] = def_list[i][0];
	menuDump += '<div id="'+def_list[i][0]+'" ';
	if (def_list[i][1] == "vertical") {
		menuDump += 'class="dropdownvert">\n';
	} else {
		menuDump += 'class="dropdown">\n';
	}
	 
	//menuDump += '<div class="dropdownimg"><a href="'+def_list[i][2]+'" onmouseover="rscssm_rollOn()" onmouseout="rscssm_rollOff()"><img src="'+def_list[i][3]+'" width="'+def_list[i][4]+'" height="'+def_list[i][5]+'" alt="'+def_list[i][6]+'"></a></div>\n';
	
	if (def_list[i][7].length) {
		menuDump += '<ul>\n';
		for (j=0; j<def_list[i][7].length; j++) {
			if (def_list[i][7][j][1].charAt(0) == '$') {
				subMenuId = def_list[i][7][j][1].substring(1,def_list[i][7][j][1].length);
				menuDump += '<li><a href="#" onmouseover="rscssm_subRollOn(); rscssm_openSubMenu('+subMenuId+');" onmouseout="rscssm_subRollOff();">'+def_list[i][7][j][0]+'</a></li>\n';
			} else {
				menuDump += '<li><a href="'+def_list[i][7][j][1]+'" onmouseover="rscssm_rollOn()" onmouseout="rscssm_rollOff()">'+def_list[i][7][j][0]+'</a></li>\n';
			}
		}
		menuDump += '</ul>\n';
	}
	
	menuDump += '</div>\n';
}

def_list = null;

// create sub menu drop downs
for (i=0; i<sub_list.length; i++) {
	rscssm_subdropdowns_nameslist[i] = sub_list[i][0];
	menuDump += '<div id="'+sub_list[i][0]+'" ';
	if (sub_list[i][1] == "vertical") {
		menuDump += 'class="dropdownvert">\n';
	} else {
		menuDump += 'class="dropdown">\n';
	}
	 
	//menuDump += '<a href="'+sub_list[i][2]+'" onmouseover="rscssm_subRollOn()" onmouseout="rscssm_subRollOff()"><img src="'+sub_list[i][3]+'" width="'+sub_list[i][4]+'" height="'+sub_list[i][5]+'" alt="'+sub_list[i][6]+'"></a>\n';
	
	if (sub_list[i][7].length) {
		menuDump += '<ul>\n';
		for (j=0; j<sub_list[i][7].length; j++) {
			menuDump += '<li><a href="'+sub_list[i][7][j][1]+'" onmouseover="rscssm_subRollOn()" onmouseout="rscssm_subRollOff()">'+sub_list[i][7][j][0]+'</a></li>\n';
		}
		menuDump += '</ul>\n';
	}
	
	menuDump += '</div>\n';
}

sub_list = null;

function rscssm_write () {
	//document.write("<textarea>");
	document.write(menuDump);
	//document.write("</textarea>");
	
	menuDump = "";
}

