<!-- // hide from old browsers

function focusField(element, text) { //removes default text in search field
  if (element.value == text) {
 element.value = "";
  }
}

function blurField(element, text) { //removes default text in search field if left empty
  if (element.value == "") {
 element.value = text;
  }
}


function MM_reloadPage(init) 
{  //reloads the window if Nav4 resized
  if (init==true) with (navigator) 
	{
	  if ((appName=="Netscape")&&(parseInt(appVersion)==4)) 
		  {
			document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; 
			}
	}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) 
	  location.reload();
}
MM_reloadPage(true);

function sendemail(x,y) { //email munger script
  void(top.location="\u006d\u0061\u0069\u006c\u0074\u006f\u003a"+x+"\u0040"+y);
  return false;
}


/* Liana Thomas
 * 2008 - Start modifications
 */
function trim(inputString) {
   // Removes leading and trailing spaces from the passed string. Also removes
   // consecutive spaces and replaces it with one space. If something besides
   // a string is passed in (null, custom object, etc.) then return the input.
   if (typeof inputString != "string") { return inputString; }
   var retValue = inputString;
   var ch = retValue.substring(0, 1);
   while (ch == " ") { // Check for spaces at the beginning of the string
      retValue = retValue.substring(1, retValue.length);
      ch = retValue.substring(0, 1);
   }
   ch = retValue.substring(retValue.length-1, retValue.length);
   while (ch == " ") { // Check for spaces at the end of the string
      retValue = retValue.substring(0, retValue.length-1);
      ch = retValue.substring(retValue.length-1, retValue.length);
   }
   while (retValue.indexOf("  ") != -1) { // Note that there are two spaces in the string - look for multiple spaces within the string
      retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length); // Again, there are two spaces in each of the strings
   }
   return retValue; // Return the trimmed string back to the user
} // Ends the "trim" function


function manageRelatedBox() {
	var inviteOnlyField = document.getElementById("inviteOnly");
	var notPublicField = document.getElementById("notPublic");
	
	// if we found the fields
	if (inviteOnlyField && notPublicField) {
		if (inviteOnlyField.checked) {
			notPublicField.checked = true;
		} else {
			notPublicField.checked = false;
		}
	}
}
 
function checkDate(who) {
	str = who.value;
 	
 	if (str != '') {
 		// fix the century on the year if needs be
 		if (str.substr(6, 2) == str.substr(6, 4)) {
 			year = str.substr(6, 2);
 			// make the year a number rather than a string
 			while (year.substr(0, 1) == '0') {
 				year = year.substr(1);			
 			}
 			
 			yearCheck = new Date();
 			yearCheck = yearCheck.getFullYear();
 			yearCheck = yearCheck.toString();
 			currCentury = yearCheck.substr(0, 2);
 			yearCheck = yearCheck.substr(2, 2);
 			// make the year a number rather than a string
 			while (yearCheck.substr(0, 1) == '0') {
 				yearCheck = yearCheck.substr(1);			
 			}
 			
 			if (parseInt(year) <= parseInt(yearCheck)) {
 				year = (parseInt(currCentury) * 100) + parseInt(year);
 			} else {
 				year = ((parseInt(currCentury) - 1) * 100) + parseInt(year)
 			}
 			str = str.substr(0, 6) + year;
 		}
 		
 		me = new Date(str.substr(6, 4), str.substr(3, 2) - 1, str.substr(0, 2));
 		if (!me.toDateString() || str.substr(2,1) != '/' ||	str.substr(5,1) != '/') {
 			me = new Date();
 			me.setDate(me.getDate() + 1);
 			who.value = ("0" + me.getDate()).substr(-2,2) + "/" + ("0" + (me.getMonth() + 1)).substr(-2, 2) + "/" + me.getFullYear();
 			alert("Date Format: dd/mm/yyyy.  Example: " + who.value + ".");
 			return false;
 		} else {
 			day = "0" + me.getDate();
 			month = "0"+(me.getMonth() + 1);
 			who.value = day.substr(day.length-2,2) + "/" + month.substr(month.length-2,2) + "/" + me.getFullYear();
 			return true;
 		}
 	}
 	
}


/* Liana Thomas
 * 2008 - End modifications
 */
 
// -->

