// Global Functions

// Popup Window Script
function popupWindow(strURL,strName,strOptions) {
	if (!strOptions) strOptions = "location=yes,resizable=yes,scrollbars=yes,status=yes,toolbar=yes,";
	else {
		//parse the strOptions variable to get width and height
		var arWidth = strOptions.match(/width=[0-9]+/i);
		var arHeight = strOptions.match(/height=[0-9]+/i);
		if (arWidth != null) {
			//Center window horizontally
			var intWidth = arWidth[0].substring(arWidth[0].lastIndexOf("=") + 1);
			var x = (screen.width - intWidth) / 2;
			x = (x<0) ? 0 : x
			strOptions += ",left=" + x;
		}
		if (arHeight != null) {
			//Center window vertically
			var intHeight = arHeight[0].substring(arHeight[0].lastIndexOf("=") + 1);
			var y = (screen.height - intHeight) / 2;
			y = (y<0) ? 0 : y
			strOptions += ",top=" + y;
		}
	}
	var popup = window.open(strURL,strName,strOptions);
}

// Jump Menus

function MM_jumpMenu(targ,selObj,restore){
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}