	function urlFilter(url) {
		if (hcp != "") {
			var baseUrl = (url.indexOf("?") != -1 ? url.substr(0, url.indexOf("?")) : url);
			var queryString = (url.indexOf("?") != -1 ? url.substr(url.indexOf("?")+1) : "");
			return (contextPath + baseUrl + "?hcp=" + hcp + (queryString != "" ? "&" + queryString : ""));
		}
		else return (contextPath + url);
	}
	
	function openwindow() {
    window.open('images/Photo Album/photo1.html','gallery',' menubar=no toolbar=no scrollbars=yes left=650, top=70, width=540 height=620');
	}
		
	// set up drop downs 
	if (ncqDropDown.isSupported()) {

		//==================================================================================================
		// create a set of dropdowns
		//==================================================================================================
		// the first param should always be down, as it is here
		//
		// The second and third param are the top and left offset positions of the menus from their actuators
		// respectively. To make a menu appear a little to the left and bottom of an actuator, you could use
		// something like -5, 5
		//
		// The last parameter can be .topLeft, .bottomLeft, .topRight, or .bottomRight to inidicate the corner
		// of the actuator from which to measure the offset positions above. Here we are saying we want the 
		// menu to appear directly below the bottom left corner of the actuator
		//==================================================================================================
		var ms = new ncqDropDownSet(ncqDropDown.direction.down, 0, 1, ncqDropDown.reference.bottomLeft);
		
		//==================================================================================================
		// create a dropdown menu
		//==================================================================================================
		// the first parameter should be the HTML element which will act actuator for the menu
		// send no URL if nothing should happen onclick (2nd parameter)
		//==================================================================================================

		/*************
		 * Dredging
		 *************/
		var menu2 = ms.addMenu(document.getElementById("menu2"));
		menu2.addItem("Personal information", urlFilter("personal_information.htm"));
		menu2.addItem("Education", urlFilter("education.htm"));
		menu2.addItem("Languages", urlFilter("languages.htm"));
		menu2.addItem("Skills & hobbies ", urlFilter("skills_and_hobbies.htm"));
		menu2.addItem("References", urlFilter("References.htm"));
		/*menu2.addItem("Photo Album", urlFilter("javascript:openwindow();"));*/
		/*************
		 * Waterway Maintenance
		 *************/
		var menu3 = ms.addMenu(document.getElementById("menu3"));
		menu3.addItem("Training courses  ", urlFilter("training_courses.htm"));
		menu3.addItem("Opinions & Ideas in Biology and Astronomy ", urlFilter("opinions_Ideas_Bioandastro.htm"));
		menu3.addItem("Researches ", urlFilter("researches.htm"));
		menu3.addItem("Raja2kolalomam.org website", urlFilter("rajakolalomam.htm"));
		menu3.addItem("Hydrus Club", urlFilter("hc.htm"));
		menu3.addItem("Articles ", urlFilter("articles.htm"));
		
		
		/*************
		 * Waterway Maintenance
		 *************/
		var menu4 = ms.addMenu(document.getElementById("menu4"));
		menu4.addItem("Hashemite University", urlFilter("hu.htm"));
		menu4.addItem("Courses & Grades of 1st semester 2005/ 2006", urlFilter("1st.htm"));
		menu4.addItem("Courses & Grades of 2nd semester 2005/ 2006", urlFilter("2nd.htm"));
		menu4.addItem("Courses & Grades of 1st semester 2006/ 2007", urlFilter("3rd.htm"));
		menu4.addItem("Cumulative Average  ", urlFilter("Cumulative_Average.htm"));
		
		/*************
		 * Waterway Maintenance
		 *************/
		var menu5 = ms.addMenu(document.getElementById("menu5"));
		menu5.addItem("Air Mail &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;", urlFilter("air_mail.htm"));
		menu5.addItem("E-Mail", urlFilter("email.htm"));
		menu5.addItem("Cell Phone ", urlFilter("cell_phone.htm"));
		
		
		/*************
		 * Remediation and Treatment Solutions
		 *************/
		var menu6 = ms.addMenu(document.getElementById("menu6"));
		menu6.addItem("Sitemap", urlFilter("sitemap.htm"));
		menu6.addItem("Sign my Guestbook  &nbsp;", urlFilter("???.html"));
		menu6.addItem("Collection of Useful websites ", urlFilter("websites.htm"));
		
		
		ncqDropDown.renderAll();
	}
