function links(type,number) {
	
	var name = new Array();
	var href = new Array();
	var file = new Array();
	var directory = new Array();
	var id = new Array();
	
	var index = 0;
	
	
	//------------------INSERT LINK CODES AND VALUES BELOW--------------------//
	
	
	var address = "http://www.studentgroups.ucla.edu/sikh/"
	
	
	name[index] = "Home";
	href[index] = address + "index.html";
	file[index] = "index.html";
	directory[index] = "";
	id[index] = "home";
	
	index++;
	
	name[index] = "Event Schedule";
	href[index] = address + "events/index.html";
	file[index] = "index.html";
	directory[index] = "events";
	id[index] = "events";
	
	index++;
	
	name[index] = "Calendar";
	href[index] = address + "calendar/index.html";
	file[index] = "index.html";
	directory[index] = "calendar";
	id[index] = "calendar";
	
	index++;
	
	name[index] = "Pictures";
	href[index] = address + "pictures/index.html";
	file[index] = "index.html";
	directory[index] = "pictures";
	id[index] = "pictures";
	
	index++;
	
	name[index] = "Membership";
	href[index] = address + "membership/index.html";
	file[index] = "index.html";
	directory[index] = "membership";
	id[index] = "membership";
	
	index++;
	
	name[index] = "Downloads";
	href[index] = address + "downloads/index.html";
	file[index] = "index.html";
	directory[index] = "downloads";
	id[index] = "downloads";
	
	index++;
	
	name[index] = "Local Gurdwaras";
	href[index] = address + "gurdwaras/index.html";
	file[index] = "index.html";
	directory[index] = "gurdwaras";
	id[index] = "gurdwaras";
	
	index++;
	
	name[index] = "About Sikhism";
	href[index] = address + "sikhism/index.html";
	file[index] = "index.html";
	directory[index] = "sikhism";
	id[index] = "sikhism";
	
	index++;
	
	name[index] = "About Us";
	href[index] = address + "aboutus/index.html";
	file[index] = "index.html"
	directory[index] = "aboutus";
	id[index] = "aboutus";
	
	index++;
	
	name[index] = "Links";
	href[index] = address + "links/index.html";
	file[index] = "index.html";
	directory[index] = "links";
	id[index] = "links";
	
	index++;
	
	name[index] = "Contact Us";
	href[index] = address + "contactus/index.html";
	file[index] = "index.html";
	directory[index] = "contactus";
	id[index] = "contactus";
	
	
	//------------------INSERT LINK CODES AND VALUES ABOVE--------------------//
	
	
	
	/*------------------------DEFAULT FORMAT------------------------//
	
	------------------------------------------------------------------
	INSTRUCTIONS:
	
	TO ADD ADDITIONAL LINKS, COPY THE TEXT INDICATED BELOW AND PASTE
	>>DIRECTLY<< AFTER THE FINAL SEMICOLON OF THE ENTRY AFTER WHICH YOU
	WISH TO ADD THE TEXT >>WITHOUT<< HITTING THE [ENTER] KEY.
	-------------------------------------------------------------------

	-------------------------------------------------------------------
	START COPY FROM HERE-->	
	index++;
	
	name[index] = "";
	href[index] = address + "";
	file[index] = "";
	directory[index] = "";
	id[index] = "";
	<--END COPY HERE
	--------------------------------------------------------------------	
	
	--------------------------------------------------------------------
	REMINDER:
	
	REMEMBER TO DELETE THE "address + " TEXT VALUE FROM THE href[index]
	VARIABLE IF THE INTENDED VALUE FOR href[index] IS A COMPLETE URL OR
	ADDRESS (SUCH AS A WEB ADDRESS).
	--------------------------------------------------------------------
	
	//---------------------END DEFAULT FORMAT BOX---------------------*/
	
	
	if (type.toLowerCase() == "number") {
		return(index + 1);
	} else if (type.toLowerCase() == "name" && number >= 0) {
		return (name[number]);
	} else if (type.toLowerCase() == "href" && number >= 0) {
		return (href[number]);
	} else if (type.toLowerCase() == "file" && number >= 0) {
		return (file[number]);
	} else if (type.toLowerCase() == "directory" && number >= 0) {
		return (directory[number]);
	} else if (type.toLowerCase() == "directory/" && number >= 0) {
		if (directory[number] != "")
			return (directory[number] + "/");
		else
			return (directory[number]);
	} else if (type.toLowerCase() == "id" && number >= 0) {
		return (id[number]);
	} else if (!(number >= 0)) {
		return ("You must enter an index value greater than or equal to zero.");
	} else {
		return ("You have not specified a valid value for the type parameter.");
	}
	
}

function menuList() {

	var directory = new Array();
	var directoryList = new Array();
	var directorySort = new Array();
	var linkString = new Array();
	var currentDirectory;
	var directoryLevel = 0;
	var index = 0;
	
	directory = document.URL.split("/");
	index = 0;
	
	while (index != directory.length) {
		directorySort.push(directory[index]);
		index++;
	}
	
	index = directorySort.length - 1;
	
	while (directorySort[index] != "sikh" && directorySort[index] != "A:" && directorySort[index] != "a:") {
		currentDirectory = directorySort.pop();
		index--;
	}
	
	index++;

	if (directory[directory.length - 1].substring(".") != -1)
		directoryLevel = directory.length - (index + 1);
	else if (directory[directory.length - 1].substring(".") == -1)
		directoryLevel = directory.length - index;
	else
		document.write("ERROR IN FIRST if-COMPLEX IN FUNCTION menuList()");
	
	index = directoryLevel;
	
	while (index != 0) {
		linkString.push("../");
		index--;
	}
	
	document.write("<UL>");
	
	for (index = 0; index < links("number"); index++) {
		document.write("<A class='list' style='TEXT-DECORATION: none' href='" + linkString.join("") + links("directory/",index) + "' id='" + links("id",index) + "'>")
		document.write("<LI");
		if ((links("directory",index).search(directory[directory.length - directoryLevel - 1]) == 0 && links("id",index) != "home" && directory[directory.length - directoryLevel - 1] != "") || (directoryLevel == 0 && links("id",index) == "home"))
			document.write(" class='main'");
		document.write(">" + links("name",index) + "</LI></A>");
	}
	
	document.write("</UL>");
	return;

}

function barList() {

	var directory = new Array();
	var directoryList = new Array();
	var directorySort = new Array();
	var linkString = new Array();
	var currentDirectory;
	var directoryLevel = 0;
	var index = 0;
	
	directory = document.URL.split("/");
	index = 0;
	
	while (index != directory.length) {
		directorySort.push(directory[index]);
		index++;
	}
	
	index = directorySort.length - 1;
	
	while (directorySort[index] != "sikh" && directorySort[index] != "A:" && directorySort[index] != "a:") {
		currentDirectory = directorySort.pop();
		index--;
	}
	
	index++;

	if (directory[directory.length - 1].substring(".") != -1)
		directoryLevel = directory.length - (index + 1);
	else if (directory[directory.length - 1].substring(".") == -1)
		directoryLevel = directory.length - index;
	else
		document.write("ERROR IN FIRST if-COMPLEX IN FUNCTION menuList()");
	
	index = directoryLevel;
	
	while (index != 0) {
		linkString.push("../");
		index--;
	}
	
	document.write("<CENTER><FONT class='linkcolor' size='1'>");
	
	for (index = 0; index < links("number"); index++) {
		if (index != 0)
			document.write(" | ");
		if (links("directory",index).search(directory[directory.length - directoryLevel - 1]) == 0 || (directoryLevel == 0 && links("id",index) == "home"))
			document.write("<B>");
		document.write("<A class='list' style='A:visited {TEXT-DECORATION: none}' href='" + linkString.join("") + links("directory/",index) + "' id='" + links("id",index) + "'>" + links("name",index) + "</A>")
		if (links("directory",index).search(directory[directory.length - directoryLevel - 1]) == 0 || (directoryLevel == 0 && links("id",index) == "home"))
			document.write("</B>");
	}
	
	document.write("</FONT></CENTER>");

	return;

}