function goPage(url) {
  window.location = url;
}
function isEmpty(str) {
  return (str.replace(/^\s+|\s+$/g, '') == '');
}
function isNumeric(x) {
  var re = /^(-)?(\d*)(\.?)(\d*)$/;
  return re.test(x);
}
function isInteger(x) {
  var re = /^(-)?(\d*)$/;
  return re.test(x);  
}
function trim(str) {
  return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
}
function trimQuotes(str) {
  str = str.replace(/^\'\'*/, '').replace(/\'\'*$/, '');
  return str.replace(/^\"\"*/, '').replace(/\"\"*$/, '');
}
function isSimpleEmail(str) {
  var re = /^\S+@\S+\.\S+$/;
  return re.test(str);
}
function checkNotEmpty(e, ie, gc, bc) {
  if (!isEmpty(xGetElementById(ie).value)) {
    xGetElementById(e).className = gc;
    return true;
  } else {
    xGetElementById(e).className = bc;
    return false;
  }
}
function checkEmail(e, ie, gc, bc) {
  if (isSimpleEmail(xGetElementById(ie).value)) {
    xGetElementById(e).className = gc;
    return true;
  } else {
    xGetElementById(e).className = bc;
    return false;
  }
}

