function mOver(tag, act){
	if(act == "over"){
		tag.style.color = "#000000";
	}
	else{
		tag.style.color = "#003399";
	}
}

function mOver2(tag, act){
	if(act == "over"){
		tag.style.color = "#003399";
	}
	else{
		tag.style.color = "#000000";
		window.status = "";
	}
}

function advisingOver(tag, text, act){
	window.status = text;
	if(act == "over"){
		tag.className = "wholeBorderRed";
	}
	else{
		tag.className = "wholeBorderBlack";
	}
}

function menuOver(tag, text, act){
	window.status = text;
	if(act == "over"){
		tag.className = "bottomBorderRed";
	}
	else{
		tag.className = "bottomBorderBlack";
	}
}

function menuOver2(tag, text, act){
	window.status = text;
	if(act == "over"){
		tag.className = "bottomBorderBlack";
	}
	else{
		tag.className = "bottomBorderRed";
	}
}

function nextPage(val){
	var url = val + ".html";
	self.location.href = url;
}

function trimAll( strValue ) {
 var objRegExp = /^(\s*)$/;

    //check for all spaces
    if(objRegExp.test(strValue)) {
       strValue = strValue.replace(objRegExp, '');
       if( strValue.length == 0)
          return strValue;
    }
    
   //check for leading & trailing spaces
   objRegExp = /^(\s*)([\W\w]*)(\b\s*$)/;
   if(objRegExp.test(strValue)) {
       //remove leading and trailing whitespace characters
       strValue = strValue.replace(objRegExp, '$2');
    }
  return strValue;
}

function validateEmail( strValue) {
var objRegExp  = /^[A-Za-z0-9_]([A-Za-z0-9_\-\.]*)@([a-z0-9_\-\.]*)(\.[a-z]{2,3}(\.[a-z]{2}){0,2})$/i;
  //check for valid email
  return objRegExp.test(strValue);
}

function validateNums(field) {
	var valid = "0123456789"
	var ok = "yes";
	var temp;
	for (var i=0; i<field.value.length; i++) {
		temp = "" + field.value.substring(i, i+1);
		if (valid.indexOf(temp) == "-1") ok = "no";
	}
	if (ok == "no") {
		return false;
	}
	else{
		return true;
	}
}