function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  var h = window.open(theURL,winName,features);
  h.focus();
}

function MM_popupMsg(msg) { //v1.0
  alert(msg);
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function printPage() { print(document); }

/* 
	@description Sets the value of sortBy and sortOrder properties
	of the given form, then submits the form to the server
	@author jcg
*/
function MM_sort(formName, sortby, sortorder) {
	var form = window.document.forms[formName];
	if (form.sortBy.value == sortby) { // toggle if the same orderBy
		if (sortorder=="") form.sortOrder.value = "0";
		else if (sortorder=="0") form.sortOrder.value = "1";
		else if (sortorder=="1") form.sortOrder.value = "0";
	} else { // default orderBy is 0 or ASC
		form.sortOrder.value = "0";
	}
	form.sortBy.value = sortby;
	form.submit();
}

function openParent(mylink, closeme, closeonly) {
if (!(window.focus && window.opener)) return true;
window.opener.focus();
if (!closeonly) window.opener.location.href=mylink.href;
if (closeme) window.close();
return false;
}

function underConstruction() {
	alert('This feature will be included in the next milestone.');
}
