<!--
function getCookie( name ) {
  var start = document.cookie.indexOf( name + "=" );
  var len = start + name.length + 1;
  if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) ) {
    return null;
  }
  if ( start == -1 ) return null;
  var end = document.cookie.indexOf( ";", len );
  if ( end == -1 ) end = document.cookie.length;
  return unescape( document.cookie.substring( len, end ) );
}

function setCookie( name, value, expires, path, domain, secure ) {
  var today = new Date();
  today.setTime( today.getTime() );
  if ( expires ) {
    expires = expires * 1000 * 60 * 60 * 24;
  }
  var expires_date = new Date( today.getTime() + (expires) );
  document.cookie = name+"="+escape( value ) +
    ( ( expires ) ? ";expires="+expires_date.toGMTString() : "" ) + //expires.toGMTString()
    ( ( path ) ? ";path=" + path : "" ) +
    ( ( domain ) ? ";domain=" + domain : "" ) +
    ( ( secure ) ? ";secure" : "" );
}

function deleteCookie( name, path, domain ) {
  if ( getCookie( name ) ) document.cookie = name + "=" +
    ( ( path ) ? ";path=" + path : "") +
    ( ( domain ) ? ";domain=" + domain : "" ) +
    ";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}

//var raw = document.cookie;
//document.write(raw);

var wsulinks = new Array(
"none",
"Business and Administration", 
"Education and Human Services", 
"Engineering and Computer Science", 
"Liberal Arts", 
"Nursing and Health", 
"Science and Mathematics", 
"Graduate Studies", 
"Medicine", 
"Professional Psychology", 
"University College", 
"Lake Campus-Celina", 
"Academic Department listing", 
"Distance Learning ", 
"Employee Handbooks", 
"ROX", 
"Student Handbook", 
"Pilot", 
"WINGS", 
"Wright On-line", 
"Wright Way Policies", 
"Bursar", 
"Campus Housing", 
"Dining Services", 
"Financial Aid", 
"Gen Ed Requirements", 
"The Guardian Online", 
"Registrar", 
"Student Activities", 
"Student Support Services", 
"CaTS", 
"CTL", 
"Communications & Marketing", 
"Disability Services", 
"Organizational Development and Learning", 
"Nutter Center", 
"Police Department", 
"Community Magazine", 
"Dialogue Online", 
"Multicultural Center", 
"News Releases", 
"WSU Arts", 
"Dayton Campus Bookstore", 
"Directions to Campus", 
"Emergency Closing Procedures", 
"Employment Opportunities", 
"Parking & Transportation", 
"Supporting WSU", 
"Virus/Security Alerts", 
"Wright1 Card",
"Class Schedule",
"Swine Flu"
);

var urls = new Array (
"none", 
"http://www.wright.edu/business/", 
"http://cehs.wright.edu/", 
"http://www.cs.wright.edu/", 
"http://www.wright.edu/cola/", 
"http://www.nursing.wright.edu/", 
"http://www.wright.edu/cosm/", 
"http://www.wright.edu/sogs/", 
"http://www.med.wright.edu/", 
"http://www.wright.edu/sopp/", 
"http://www.wright.edu/uc/", 
"http://www.wright.edu/lake/", 
"http://www.wright.edu/academics/prog/", 
"http://www.wright.edu/dl/", 
"http://www.wright.edu/hr/relations/", 
"http://rox.wright.edu", 
"http://www.wright.edu/students/handbook/", 
"http://pilot.wright.edu/", 
"http://wings.wright.edu", 
"http://wol.wright.edu", 
"http://www.wright.edu/wrightway/", 
"http://www.wright.edu/bursar/", 
"http://www.wright.edu/housing/", 
"http://www.wright.edu/admin/foodserv/", 
"http://www.wright.edu/financialaid/", 
"http://www.wright.edu/gened/", 
"http://www.theguardianonline.com/", 
"http://www.wright.edu/registrar/", 
"http://www.wright.edu/studentactivities/", 
"http://www.wright.edu/students/studsupport/", 
"http://www.wright.edu/cats/", 
"http://www.wright.edu/ctl/", 
"http://www.wright.edu/cm/", 
"http://www.wright.edu/students/dis_services/", 
"http://www.wright.edu/odl/", 
"http://www.nuttercenter.com", 
"http://www.wright.edu/admin/safety/", 
"http://www.wright.edu/community/", 
"http://www.wright.edu/dialogue/", 
"http://www.wright.edu/news_events/culture.html", 
"http://www.wright.edu/cgi-bin/news.cgi", 
"http://www.wright.edu/news_events/arts.html", 
"http://wright.bncollege.com/", 
"http://www.wright.edu/visit/", 
"http://www.wright.edu/aboutwsu/inclement.html", 
"http://www.wright.edu/hr/employment/jobopps.html", 
"http://www.wright.edu/admin/parking/", 
"http://wsufoundation.wright.edu", 
"http://www.wright.edu/cats/info/", 
"http://www.wright.edu/wright1card/",
"https://oas5.wright.edu/pls/PROD/bwckschd.p_disp_dyn_sched/",
"http://www.wright.edu/swineflu/"
);

var wsucookie = getCookie('quicklinks');
var custom_cookie = getCookie('custom_quicklinks');

//var raw = document.cookie;
//document.write(raw);

document.write('<form name="pickadir"><select name="pickadir" onChange="MM_jumpMenu(\'parent\',this,1)"><option value="#" selected>Quick Links</option><option value="#">----------</option>');

//if (wsucookie != null) {
if (wsucookie) {
	//document.write(cookie);
	var cookie_array = wsucookie.split(',');
	var option = "<option value=\"" + cookie_array + "\">" + cookie_array + "</option>";
	//document.write(option);
	
	for (var i = 0; i < cookie_array.length; i++) {
		//document.write('stuff');
		var current_value = cookie_array[i];
		var current_option = "<option value=\"" + urls[current_value] + "\">" + wsulinks[current_value] + "</option>";
		document.write(current_option);
	}
	
	
}
else {
	var options = "<option value=\"http://www.wright.edu/academics/prog/\">Academic Department listing</option><option value=\"https://oas5.wright.edu/pls/PROD/bwckschd.p_disp_dyn_sched/\">Class Schedule</option><option value=\"http://www.wright.edu/dl/\">Distance Learning</option><option value=\"http://pilot.wright.edu/\">Pilot</option><option value=\"http://www.wright.edu/wrightway/\">Wright Way Policies</option><option value=\"http://www.wright.edu/admin/foodserv/\">Dining Services</option><option value=\"http://www.wright.edu/odl/\">Organizational Development and Learning</option><option value=\"http://www.wright.edu/news_events/culture.html\">Multicultural Center</option><option value=\"http://www.wright.edu/news_events/arts.html\">WSU Arts</option><option value=\"http://wright.bncollege.com\">Dayton Campus Bookstore</option><option value=\"http://www.wright.edu/visit/\">Directions to Campus</option><option value=\"http://www.wright.edu/hr/employment/jobopps.html\">Employment Opportunities</option><option value=\"http://www.wright.edu/admin/parking/\">Parking & Transportation</option><option value=\"http://www.wright.edu/cats/info/\">Virus/Security Alerts</option><option value=\"http://www.wright.edu/swineflu/\">Swine Flu</option><option value=\"http://www.wright.edu/lake/\">Lake Campus-Celina</option>";
	
	document.write(options);
}


if (custom_cookie != null) {
	var items_array = custom_cookie.split(';');
	for (var j = 0; j < items_array.length; j++) {
		var parts_array = items_array[j].split(',');
		if (parts_array[1] != null) {
			var coption = "<option value=\"" + parts_array[1] + "\">" + parts_array[0] + "</option>";
			document.write(coption);
		}
	}
}

document.write('<option value="#">----------</option><option value="http://www.wright.edu/cgi-bin/ssi/quicklinks.cgi?action=customize">Personalize Your Quick Links</option></select> <input type="button" name="Button1" value="Go" onClick="MM_jumpMenuGo(\'menu1\',\'parent\',1)"></form>');

//-->


