// JavaScript Document

// Global Array for Quick Links
// modify names & links here


var AUCqlinks = new Array();
AUCqlinks[1] = "AUC Press";
AUCqlinks[2] = "Book Store";
AUCqlinks[3] = "Conferences";
AUCqlinks[4] = "Directory";
AUCqlinks[5] = "Employment";
AUCqlinks[6] = "Events Calendar";
AUCqlinks[7] = "Library";
AUCqlinks[8] = "Publications";
AUCqlinks[9] = "Webmail";


var AUCqval = new Array();
AUCqval[0] = "#";
AUCqval[1] = "http://www.aucpress.com/";
AUCqval[2] = "http://bookstore.aucegypt.edu";
AUCqval[3] = "http://www.aucegypt.edu/resources/conferences.html";
AUCqval[4] = "http://pacs.aucegypt.edu/dir";
AUCqval[5] = "http://www.aucegypt.edu/facstaff/Pages/AcademicVacancies.aspx";	
AUCqval[6] = "http://cal.aucegypt.edu/webevent/events";
AUCqval[7] = "http://library.aucegypt.edu";
AUCqval[8] = "http://www.aucegypt.edu/publications";
AUCqval[9] = "http://webmail.aucegypt.edu";




appendOption();

function appendOption() {
//alert('append option ...');
	for(i=1; i<AUCqlinks.length; i++){
		  var elOptNew = document.createElement('option');
		  elOptNew.text = AUCqlinks[i];
		  //alert('TEXT: ' + AUCqlinks[i]);
		  elOptNew.value = AUCqval[i]; //i;
		  //alert('VALUE: ' + AUCqval[i]);
		  var elSel = document.getElementById('quicklinkssel');
		  //alert('GET ');			
		  try {
			elSel.add(elOptNew, null); // standards compliant; doesnt work in IE
		  }
		  catch(ex) {
			elSel.add(elOptNew); // IE only
		  }
	}
  
}


function quick_changed(ele){

	var optbox = document.getElementById(ele);
	for(i=0; i<AUCqlinks.length; i++){
		if(true == optbox.options[i].selected)
			document.location.href = optbox.options[i].value;
	}
	return;
}
