/**
 * Add the trim( ) function to the native String Object
 */
String.prototype.trim = function( ) 
{
  return this.replace( /^\s*(\b.*\b|)\s*$/, "$1" );
}


/**
 * form validation 
 */
function checkForm( oForm )
{
  if( oForm.sName.value.trim( ) == '' )
  {
    alert( 'Vult u a.u.b. een naam in.' );
    return false;
  }
  
  if( oForm.sEmail.value.trim( ) == '' )
  {
    alert( 'Vult u a.u.b. een email-adres in.' );
    return false;
  }
  
  if( oForm.sQuestion.value.trim( ) == '' )
  {
    alert( 'Vult u a.u.b. een vraag in.' );
    return false;
  }

  return true;
}
