<!-- Hide script from older browsers

// Define trim function
function stringTrim () {
  return this.replace(/^\s+/, '').replace(/\s+$/, '');
}
String.prototype.trim = stringTrim;

// Open a window
function openWin(winURL) {
  width = screen.availWidth;
  height = screen.availHeight;
  windowSpecs = "left=0,top=0,width=" + width + ",height=" + height + ",scrollbars=1,resizable=1";
  window.open(winURL, "newWin", windowSpecs);
}

// Check email address
function validEmail(email) {
  invalidChars = " /:,;+=$#%&*";
  if (email == "") {
    return false;
  }
  for (i=0; i<invalidChars.length; i++) {
    badChar = invalidChars.charAt(i);
    if (email.indexOf(badChar,1) > -1) {
       return false;
    }
  }
  atPos = email.indexOf("@",1);
  if (atPos == -1) {
    return false;
  }
  if (email.indexOf("@",atPos+1) > -1) {
    return false;
  }
  periodPos = email.indexOf(".",atPos);
  if (periodPos == -1) {
    return false;
  }
  if (periodPos+2 > email.length) {
    return false;
  }
  return true;
}

// End hiding script -->
