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

// Xiaan Image Rollover Script
var imgBaseDir = '/images_main';

function imgOn( imgObj ) 
{
	var imgNm = imgObj.name;
	imgOnURL = imgBaseDir + '/' + imgNm + '_ON.gif';
	imgObj.src = imgOnURL;
}

function imgOff( imgObj ) 
{
	var imgNm = imgObj.name;
	imgOffURL = imgBaseDir + '/' + imgNm + '.gif';
	imgObj.src = imgOffURL;
}

function viewPage(that) {
		document.location = that.options[that.selectedIndex].value;
}

function openWin(url, name, w, h)
{  var options = 'toolbar=0,scrollbars=1,location=0,directories=0,status=0,menubar=0,resizable=1,width=' + w + ',height=' + h;
	window.open(url, name, options);
}

//Validation functions

function isEmpty (str,fieldName) {
	var error = "";
	if ((str == null ) || (str.length == 0)) {
		error += fieldName + " cannot be empty.\n";
		}
	return error;
	}
	
function isEmail(str) {
	var error = "";
	if ((str == null) || (str.length == 0) || (str.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == -1)) {
		error += "You didn't enter a valid e-mail address.\n";
		}
	return error;
	}

function matchPasswords (str1,str2) {
	var error = "";
	if ((str1 == null) || (str1.length == 0) || (str2 == null) || (str2.length == 0)) {
		error += "You must (re)enter the password.\n";
		}
	else if (str1 != str2) {
		error += "The passwords don't match.\n"
		}
	return error;
}

