<!--
var selectedCourseId = false;

// ************************************************************************************************************
function chooseCourse(course_id) {
	if (course_id) {
		selectedCourseId = course_id;
	} else {
		selectedCourseId = false;
	}
}

// ************************************************************************************************************
function goToCourse() {
	if (selectedCourseId) {
		document.location = './course/view.php?id=' + selectedCourseId;
	} else {
		alert("Please select a category, and then select a course.");
	}
}

// ************************************************************************************************************
function goToCurric(cid) {
	if (cid == 0) {
		
	} else {
		document.location = './course/curriculum.php?cid=' + cid;
	}
}
// ************************************************************************************************************
function displayContent() {
	// Display the object whose id is in the first parameter, and remove the objects whose ids are in
	// the second and subsequent parameters.
	var Args = displayContent.arguments;  
	thisBlock = document.getElementById(Args[0]);
	if (thisBlock) {
		thisBlock.style.display = "block";
	}
	for (i=1; i<Args.length; i++) {
		thisBlock = document.getElementById(Args[i]);
		if (Args[i] != Args[0] && thisBlock) {
			thisBlock.style.display = "none";
		}
	}
}

// ************************************************************************************************************
function loadSlideShow(filepath) {
	var FO = new FlashObject(filepath, "mss_frontpage_slideshow_flash", "400", "400", 9, "#ffffff");
	FO.addVariable("quality", "high");
	FO.addVariable("wmode", "transparent");
	FO.write("mss_frontpage_slideshow");
}

// ************************************************************************************************************

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

// ************************************************************************************************************

function sortOrder(column_name, form_name) { 
	order_field = document.getElementById("orderby");
	order_direction = document.getElementById("orderdir");
	thisform = document.forms[form_name];
	if (order_field && order_direction) {
		if (order_field.value == column_name) {
			if (order_direction.value == "asc") {
				order_direction.value = "desc";
				thisform.submit();
			} else {
				order_direction.value = "asc";
				thisform.submit();
			}
		} else {
			order_field.value = column_name;
			order_direction.value = "asc";
			thisform.submit();
		}
	}
}

//-->
