/*
Warning: This site includes additional code that is not part of the standard Joust
package and may well be experimental.  You are welcome to use the code and ideas
contained in these pages in your own site.  However, you should be sure you know
what you are doing because this "extra" code will not get the same level of support
that the standard package does.  In other words, if you ask for help with "extra"
stuff and you clearly don't understand what you are messing with, you will get the
response "well, what did you expect?".
*/
// ===== BEGIN WU FUNCTIONS ==========

function menusubmit(as_menu,Target,ProcessState,p1,p2,p3,p4,p5,p6,p7) {

	if (window.frames[2].document.forms[1]) {
		window.frames[4].document.writeln(loading)
		myform = window.frames[2].document.forms[1]
		if (as_menu == "logout") myform.target="_top";
		// send output to cltext frame
		myform.target=Target
		myform.as_session_id.value = strSessionID
		myform.as_transaction_id.value = strTransID
		myform.as_process_state.value = ProcessState
		myform.as_menu_selection.value = as_menu
		myform.as_p1.value = p1
		myform.as_p2.value = p2
		myform.as_p3.value = p3
		myform.as_p4.value = p4
		myform.as_p5.value = p5
		myform.as_p5.value = p6
		myform.as_p5.value = p7
		myform.submit()
	}


	if (as_menu == "logout") {
		document.clear();
		};
	};

function menusubasp(url)
	{
	alert(url)
	cltext = top.frames[3].document
	cltext.open()
	cltext.writeln(loading)
	cltext.close()
	cltext.location = url
	return
	}

//
// ===== END WU FUNCTIONS ============
//



function initOutlineIcons(imgStore) {
	var ip = '/WebFAC/images/menu/';
	var ipbase = ip;
	ip += (theBrowser.platform == 'Mac') ? 'mac/' : ((theBrowser.platform == 'OS/2') ? 'os2/' : 'win/');

	imgStore.add('iconPlusTop', ip + 'plustop.gif', 18, 16);
	imgStore.add('iconPlus', ip + 'plus.gif', 18, 16);
	imgStore.add('iconPlusBottom', ip + 'plusbottom.gif', 18, 16);
	imgStore.add('iconPlusOnly', ip + 'plusonly.gif', 18, 16);
	imgStore.add('iconMinusTop', ip + 'minustop.gif', 18, 16);
	imgStore.add('iconMinus', ip + 'minus.gif', 18, 16);
	imgStore.add('iconMinusBottom', ip + 'minusbottom.gif', 18, 16);
	imgStore.add('iconMinusOnly', ip + 'minusonly.gif', 18, 16);
	imgStore.add('iconLine', ip + 'line.gif', 18, 16);
	imgStore.add('iconBlank', ip + 'blank.gif', 18, 16);
	imgStore.add('iconJoinTop', ip + 'jointop.gif', 18, 16);
	imgStore.add('iconJoin', ip + 'join.gif', 18, 16);
	imgStore.add('iconJoinBottom', ip + 'joinbottom.gif', 18, 16);

	//Add folder and document images to the imgStore.
	//***** ORIGINAL *****
	imgStore.add('Folder', ip + 'folderclosed.gif', 18, 16);
	imgStore.add('FolderSelected', ip + 'folderopen.gif', 18, 16);
	//***** STATUS ICONS jwj 2000-05-10 *****
	imgStore.add('Space', ipbase + '1pix.gif', 6, 16);
	imgStore.add('SpaceSelected', ipbase + 'arrow.gif', 6, 16);

	var di = ipbase;
	if ((theBrowser.code == 'NS') || (theBrowser.code == 'MSIE')) {
		di += theBrowser.code.toLowerCase() + '_doc';
		imgStore.add('Document', di + '.gif', 18, 16);
		imgStore.add('DocumentMouseOver', di + '_mo.gif', 18, 16);
		imgStore.add('DocumentSelected', di + '_sel.gif', 18, 16);
	} else {
		imgStore.add('Document', di + 'doc.gif', 18, 16);
	}
	imgStore.add('form', ipbase + 'fancy/form.gif', 18, 16);

}
function initialise() {
	// Tell joust where to find the various index files it needs
	index1 = 'index.htm';
	index2 = '';
	index3 = ''; //'index3.htm';

	// Set up parameters to control menu behaviour
	theMenu.autoScrolling = true;
	theMenu.modalFolders = false;
	theMenu.linkOnExpand = false;
	theMenu.toggleOnLink = true;
	theMenu.showAllAsLinks = false;
	theMenu.focusOnLink = true;
	theMenu.savePage = true;
	theMenu.tipText = "text";
	theMenu.name = "theMenu";
	theMenu.container = "self.clmenu";
	theMenu.reverseRef = "parent";
	theMenu.contentFrame = "cltext";
	theMenu.defaultTarget = "cltext";

	// Initialise all the icons
	initOutlineIcons(theMenu.imgStore);

	// Add default menu items
	level1ID = theMenu.addEntry(-1, "", "&nbsp;WUCrsl News", "/wucrsl/WUCrsL_intro.asp", "");
		level2ID = theMenu.entry[level1ID].isopen = true;
		level2ID = theMenu.entry[level1ID].CSSClass = "leaf"
		level2ID = theMenu.entry[level1ID].noOutlineImg = true;
	level1ID = theMenu.addEntry(-1, "","","","")
		level2ID = theMenu.entry[level1ID].noOutlineImg = true;
	level1ID = theMenu.addEntry(-1, "", "&nbsp;Courses", "javascript:void(0);","");
		level2ID = theMenu.entry[level1ID].isopen = true;
		level2ID = theMenu.entry[level1ID].CSSClass = "root"
		level2ID = theMenu.entry[level1ID].noOutlineImg = true;
		level2ID = theMenu.addChild(level1ID, "Space", "Bulletin", "/wucrso/WUCRSOWeb.htm","");
		level2ID = theMenu.addChild(level1ID, "Space", "By Semester", "javascript:void(0);", "");
			level3ID = theMenu.entry[level2ID].isopen = true;
			level3ID = theMenu.addChild(level2ID, "Space", "Listing", "/wucrsl/SQLPages/WUCrsLWeb_select_semester.htm", "");
			level3ID = theMenu.addChild(level2ID, "Space", "Search", "/wucrsl/SQLPages/WUCrsLWeb_select_semester_search.htm", "");
			level3ID = theMenu.addChild(level2ID, "Space", "Open Courses", "/wucrsl/SQLPages/WUCRSLWeb_Open_courses.ASP", "");
			level3ID = theMenu.addChild(level2ID, "Space", "Closed/Unavailable Courses", "/wucrsl/SQLPages/WUCRSLWeb_Closed_Course_semesters.htm", "");
	level1ID = theMenu.addEntry(-1, "","","","")
		level2ID = theMenu.entry[level1ID].noOutlineImg = true;
	level1ID = theMenu.addEntry(-1, "","&nbsp;A&amp;S Curriculum","javascript:void(0)","")
		level2ID = theMenu.entry[level1ID].isopen = true;
		level2ID = theMenu.entry[level1ID].CSSClass = "root"
		level2ID = theMenu.entry[level1ID].noOutlineImg = true;
			level3ID = theMenu.addChild(level1ID, "Space", "Courses By Area", "javascript:void(0);", "");
				level4ID = theMenu.addChild(level3ID, "Space", "Natural Sciences", "/wucrsp/wucrsp_select_course.asp?attr=2&toggle=off", "");
				level4ID = theMenu.addChild(level3ID, "Space", "Social Sciences", "/wucrsp/wucrsp_select_course.asp?attr=5&toggle=off", "");
				level4ID = theMenu.addChild(level3ID, "Space", "Textual &amp; Historical Studies", "/wucrsp/wucrsp_select_course.asp?attr=6&toggle=off", "");
				level4ID = theMenu.addChild(level3ID, "Space", "Language &amp; Arts", "/wucrsp/wucrsp_select_course.asp?attr=7&toggle=off", "");
			level3ID = theMenu.addChild(level1ID, "Space", "Courses By Basic Requirements", "javascript:void(0);", "");
				level4ID = theMenu.addChild(level3ID, "Space", "Cultural Diversity", "/wucrsp/wucrsp_select_course.asp?attr=10&toggle=off", "");
				level4ID = theMenu.addChild(level3ID, "Space", "Social Differentiation", "/wucrsp/wucrsp_select_course.asp?attr=11&toggle=off", "");
				level4ID = theMenu.addChild(level3ID, "Space", "Quantitative Analysis", "/wucrsp/wucrsp_select_course.asp?attr=9&toggle=off", "");
				level4ID = theMenu.addChild(level3ID, "Space", "Writing Intensive", "/wucrsp/wucrsp_select_course.asp?attr=12&toggle=off", "");
			level3ID = theMenu.addChild(level1ID, "Space", "Courses in Clusters", "javascript:void(0);", "");
				level4ID = theMenu.addChild(level3ID, "Space", "By Department", "/wucrsp/WUCrsP_select_department_in_clusters.asp", "");
		level2ID = theMenu.addChild(level1ID, "Space", "Clusters By Area", "javascript:void(0);", "");
			level3ID = theMenu.addChild(level2ID, "Space", "All Clusters", "/wucrsp/wucrsp_select_cluster.asp?attr=2,5,6,7&toggle=off", "");
			level4ID = theMenu.addChild(level2ID, "Space", "Natural Sciences", "/wucrsp/wucrsp_select_cluster.asp?attr='2'&toggle=off", "");
			level4ID = theMenu.addChild(level2ID, "Space", "Social Sciences", "/wucrsp/wucrsp_select_cluster.asp?attr='5'&toggle=off", "");
			level4ID = theMenu.addChild(level2ID, "Space", "Textual &amp; Historical Studies", "/wucrsp/wucrsp_select_cluster.asp?attr='6'&toggle=off", "");
			level4ID = theMenu.addChild(level2ID, "Space", "Language &amp; Arts", "/wucrsp/wucrsp_select_cluster.asp?attr='7'&toggle=off", "");
			level3ID = theMenu.addChild(level2ID, "Space", "Search", "/wucrsp/Wucrspweb_search_clu_intr.htm", "");
		level2ID = theMenu.addChild(level1ID, "Space", "Programs By Area", "javascript:void(0);", "");
			level3ID = theMenu.addChild(level2ID, "Space", "All Programs", "/wucrsp/wucrsp_select_program.asp?attr=2,5,6,7&toggle=off", "");
			level3ID = theMenu.addChild(level2ID, "Space", "Natural Sciences", "/wucrsp/wucrsp_select_program.asp?attr='2'&toggle=off", "");
			level3ID = theMenu.addChild(level2ID, "Space", "Social Sciences", "/wucrsp/wucrsp_select_program.asp?attr='5'&toggle=off", "");
			level3ID = theMenu.addChild(level2ID, "Space", "Textual &amp; Historical Studies", "/wucrsp/wucrsp_select_program.asp?attr='6'&toggle=off", "");
			level3ID = theMenu.addChild(level2ID, "Space", "Language &amp; Arts", "/wucrsp/wucrsp_select_program.asp?attr='7'&toggle=off", "");

}

function convertSlashes(strToConv) {
	var result = '';
	var c = '';
	for (var i = 0; i < strToConv.length; i++) {
		c = strToConv.charAt(i);
		result += (c == '\\') ? '/' : c;
	}
	return result;
}

window.defaultStatus = "";
initialise();



