function checkIfEmpty (formName, fieldName, alertType, alertText)
 {
 fieldContent = eval('document.'+formName+'.'+fieldName+'.value');
 if ( fieldContent == '' )
  { eval(alertType+'alert(\''+alertText+'\')'); return true;  }
 else
  { return false; }
 }
 
function radioCheckIfEmpty (formName, fieldName, alertType, alertText)
 {
 myOption = -1;
 for ( i = eval('document.'+formName+'.'+fieldName+'.length-1'); i > -1; i--)
  {
  if ( eval('document.'+formName+'.'+fieldName+'[i].checked') ) { myOption = i; i = -1; }
  }
 if ( myOption == -1 )
  { eval(alertType+'alert(\''+alertText+'\')'); return true;  }
 else
  { return false; }
 }

function openWindow(url,x,y,scroll)
 {
 newwindow = window.open(url,'myWindow','width='+x+',height='+y+',scrollbars='+scroll+',resizeable=0,status=0');
 if (window.focus) { newwindow.focus(); }
 }

function emailCheck(emailAddress)
 {
 if ( /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(emailAddress) )
  {
  return false;
  }
 else
  {
  return true;
  }
 }

function makeVisible(elementId,type)
 {
 document.getElementById(elementId).style.display = type;
 }

function makeInvisible(elementId)
 {
 document.getElementById(elementId).style.display = 'none';
 }