function showPrograms(program_id, programs_header){
	if(program_id == "bachelorsnav") {
		if(document.getElementById(program_id).className=='close'){
			document.getElementById(program_id).className='open';
			document.getElementById(programs_header).className='prorgamsopen';
			document.getElementById("mastersnav").className='close';
			document.getElementById("mastersheader").className='prorgamsclosed';
			document.getElementById("doctoralsnav").className='close';
			document.getElementById("doctoralheader").className='prorgamsclosed';
		} else{
			document.getElementById(program_id).className='close';
			document.getElementById(programs_header).className='prorgamsclosed';
		}
	} else if (program_id == "mastersnav") {
		if(document.getElementById(program_id).className=='close'){
			document.getElementById(program_id).className='open';
			document.getElementById(programs_header).className='prorgamsopen';
			document.getElementById("bachelorsnav").className='close';
			document.getElementById("bachelorsheader").className='prorgamsclosed';
			document.getElementById("doctoralsnav").className='close';
			document.getElementById("doctoralheader").className='prorgamsclosed';
		} else{
			document.getElementById(program_id).className='close';
			document.getElementById(programs_header).className='prorgamsclosed';
		}	
	} else if (program_id == "doctoralsnav") {
		if(document.getElementById(program_id).className=='close'){
			document.getElementById(program_id).className='open';
			document.getElementById(programs_header).className='prorgamsopen';
			document.getElementById("bachelorsnav").className='close';
			document.getElementById("bachelorsheader").className='prorgamsclosed';
			document.getElementById("mastersnav").className='close';
			document.getElementById("mastersheader").className='prorgamsclosed';
		} else{
			document.getElementById(program_id).className='close';
			document.getElementById(programs_header).className='prorgamsclosed';
		}	
	}
}
function showDescription(div_id, closeButton){
		if(document.getElementById(div_id).className=='coursedescriptionShow'){
			document.getElementById(div_id).className='coursedescriptionHide';
			document.getElementById(closeButton).style.display='none';
		}else{
			document.getElementById(div_id).className='coursedescriptionShow';
			document.getElementById(closeButton).style.display='inline';
		}
}
function showAllDescriptions(course_total){
		for (i = 1; i <= course_total; i++) {
			document.getElementById('course' + i).className='coursedescriptionShow';
			document.getElementById('courseclose' + i).style.display='inline';
		}
}
function hideAllDescriptions(course_total){
		for (i = 1; i <= course_total; i++) {
			document.getElementById('course' + i).className='coursedescriptionHide';
			document.getElementById('courseclose' + i).style.display='none';
		}
}
function jumpMenu(campusLocation,restore){
	var popup = window.open(eval("campusLocation.options[campusLocation.selectedIndex].value"),"got");
	popup.focus();
	if (restore) campusLocation.selectedIndex=0;
}
function certificationJumpMenu(certificationLocation,restore){
	var popup = window.open(eval("certificationLocation.options[certificationLocation.selectedIndex].value"),"got");
	popup.focus();
	if (restore) certificationLocation.selectedIndex=0;
}
//This is for the viewbook code//
var forcedRefresh = true;
var alreadyopen = new Array();
var newwin = new Array();
function launchViewbook(){

	if(screen.height > 768)
		openCenteredWindow('../viewbook/', 'viewbook', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no', '950','714');  
	else
		openCenteredWindow('../viewbook/', 'viewbook', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes', '980','714');  
}
function openCenteredWindow(theURL, winName, features, w, h){
  var winl = parseInt((screen.width - w - 10) / 2);
  var wint = parseInt((screen.height - h - 29) / 2);
  var retval = openWindow(theURL, winName, features + ',height=' + h + ',width=' + w + ',top=' + wint + ',left=' + winl);
  if(!theURL) return retval;
}

function openWindow(theURL, winName, features){
  if(forcedRefresh == false && alreadyopen[winName] && !newwin[winName].closed){
    newwin[winName].focus();
  }
  else{
    alreadyopen[winName] = 1;	
    newwin[winName] = window.open(theURL, winName, features);
    newwin[winName].focus();
  }
  if(!theURL) return newwin[winName];
}