function PaintWhite(id)
  {
	  document.getElementById(id).style.backgroundColor = '#FFFFFF';
  }
  
  function PaintWhiteRadio()
  {
	  document.getElementById("drivingY").style.backgroundColor = '#FFFFFF';
	  document.getElementById("drivingN").style.backgroundColor = '#FFFFFF';
  }
  
  function errorForm(err)
  {
    var error = getObj("error");
    error.innerHTML = err;
    show("error");
    window.scrollTo(0,0);
    return false;
  }
  
  function validForm()
  {
    //Test LastName
    var obj = getObj("lastname");
    if( obj != null && obj.value != "" )
      hide('error');
    else
	{
      document.getElementById("lastname").style.backgroundColor = '#FF8F8F';
	  //return errorForm("[CAN_ERROR_LASTNAME]");
	  return false;
	}
      
    //Test Firstname
    var obj = getObj("firstname");
    if( obj != null && obj.value != "" )
      hide('error');
    else
	{
      document.getElementById("firstname").style.backgroundColor = '#FF8F8F';
	  //return errorForm("[CAN_ERROR_FIRSTNAME]");
	  return false;
	}
    
    //Test Birthday
    var day = getObj("day");
    var month = getObj("month");
    var year = getObj("year");
    if( day != null && is_numeric(day.value) && day.value > 0 && month != null && is_numeric(month.value) && month.value > 0 && year != null && is_numeric(year.value) && year.value > 0 )
      hide('error');
    else
	{
      document.getElementById("day").style.backgroundColor = '#FF8F8F';
	  document.getElementById("month").style.backgroundColor = '#FF8F8F';
	  document.getElementById("year").style.backgroundColor = '#FF8F8F';
	  //return errorForm("[CAN_ERROR_BIRTHDAY]");
	  return false;
	}
    
    //Test sex
    var obj = getObj("sexe");
    if( obj != null && obj.selectedIndex > 0 )
      hide('error');
    else
	{
      document.getElementById("sexe").style.backgroundColor = '#FF8F8F';
	  //return errorForm("[CAN_ERROR_SEX]");
	  return false;
	}
    
    //Test Address
    var obj = getObj("address");
    if( obj != null && obj.value != "" )
      hide('error');
    else
	{
      document.getElementById("address").style.backgroundColor = '#FF8F8F';
	  //return errorForm("[CAN_ERROR_ADDRESS]");
	  return false;
	}
    
    //Test Zip
    var obj = getObj("zip");
    if( obj != null && obj.value != "" )
      hide('error');
    else
	{
      document.getElementById("zip").style.backgroundColor = '#FF8F8F';
	  //return errorForm("[CAN_ERROR_ZIP]");
	  return false;
	}
    
    //Test Location
    var obj = getObj("loc");
    if( obj != null && obj.value != "" )
      hide('error');
    else
	{
      document.getElementById("loc").style.backgroundColor = '#FF8F8F';
	  //return errorForm("[CAN_ERROR_LOCATION]");
	  return false;
	}
    
    //Test Email
    var obj = getObj("mail");
    if( obj != null && isMail(obj.value) )
      hide('error');
    else
	{
	  document.getElementById("mail").style.backgroundColor = '#FF8F8F';
      //return errorForm("[CAN_ERROR_EMAIL]");
	  return false;
	}
    
    //Test Driving Licence
    var objY = getObj("drivingY");
    var objN = getObj("drivingN");
    if( objY != null && objN != null && ( objN.checked || objY.checked ) )
      hide('error');
    else
	{
      document.getElementById("drivingY").style.backgroundColor = '#FF8F8F';
	  document.getElementById("drivingN").style.backgroundColor = '#FF8F8F';
	  //return errorForm("[CAN_ERROR_PERMIS]");
	  return false;
	}
    
    //Test MotherTongue
    var obj = getObj("tongue");
    if( obj != null && obj.value != "" )
      hide('error');
    else
	{
      document.getElementById("tongue").style.backgroundColor = '#FF8F8F';
	  //return errorForm("[CAN_ERROR_TONGUE]");
	  return false;
	}
    
    return true;
  }
  
  var currentExp = 0;
  function removeExp(id)
  {
    obj = getObj("exp"+id);
    getObj("listExp").removeChild(obj);
  }
  
  
	function addExp()
  {
    var can_entreprise = getObj("entreprise").value;
    if( can_entreprise == "" )
	{
      document.getElementById("entreprise").style.backgroundColor = '#FF8F8F';
	  //return errorForm("[CAN_ERROR_ENTREPRISE]");
	  return false;
	}

    var can_from = getObj("from_entreprise").value;
    if( can_from == "" )
	{
      document.getElementById("from_entreprise").style.backgroundColor = '#FF8F8F';
	  //return errorForm("[CAN_ERROR_FROM]");
	  return false;
	}

    var can_to = getObj("to_entreprise").value;
    if( can_to == "" )
	{
      document.getElementById("to_entreprise").style.backgroundColor = '#FF8F8F';
	  //return errorForm("[CAN_ERROR_TO]");
	  return false;
    }

    var can_function = getObj("worktitle").value;
    if( can_function == "" )
	{
      document.getElementById("worktitle").style.backgroundColor = '#FF8F8F';
	  //return errorForm("[CAN_ERROR_FUNCTION]");
	  return false;
	}

    var can_mission = getObj("workdesc").value;
    if( can_mission == "" )
	{
      document.getElementById("workdesc").style.backgroundColor = '#FF8F8F';
	  //return errorForm("[CAN_ERROR_MISSION]");
	  return false;
	}

    var newElement = '<div id="exp' + currentExp + '">\
    <table width="100%" cellpadding="0" cellspacing="0">\
  				<col width="57" \/>\
  				<col width="65" span="4" \/>\
  				<col width="272" \/>\
  				<tr height="13">\
  					<td width="300" height="25" class="standardBlack">\
  						' + document.getElementById("CAN_ENTREPRISE").value + ':\
  					<\/td>\
  					<td width="250" class="standardBlack">\
  						' + can_entreprise + '<input id="entreprise" name="entreprise' + currentExp + '" type="hidden" size="25" value="' + can_entreprise + '" \/>\
  					<\/td>\
  					<td width="400" height="25" class="standardBlack">\
  						' + document.getElementById("CAN_FROM").value + ':\
  						' + can_from + '<input id="from_entreprise" value="' + can_from + '" name="from_entreprise' + currentExp + '" type="hidden" size="5" maxlength="4" \/>\
  						' + document.getElementById("CAN_TO").value + ':\
  						' + can_to + '<input id="to_entreprise" value="' + can_to + '" name="to_entreprise' + currentExp + '" type="hidden" size="5" maxlength="4" \/>\
  					<\/td>\
  				<\/tr>\
  				<tr height="12">\
  					<td width="300" height="25" bgcolor="#D9E8F3" class="standardBlack">\
  						' + document.getElementById("CAN_WORKTITLE").value + ':\
  					<\/td>\
  					<td width="250" height="25" bgcolor="#D9E8F3" class="standardBlack">\
  						' + can_function + '<input id="worktitle" value="' + can_function + '" name="worktitle' + currentExp + '" type="hidden" size="25" \/>\
  					<\/td>\
  					<td width="400" height="25" bgcolor="#D9E8F3" class="standardBlack">\
  						&nbsp;\
  					<\/td>\
  				<\/tr>\
  				<tr height="13">\
  					<td height="25" colspan="3" class="standardBlack">\
  						' + document.getElementById("CAN_WORKDESC").value + ': \
  					<\/td>\
  				<\/tr>\
  				<tr height="12">\
  					<td height="12" colspan="3" class="standardBlack">\
  						<p>' + can_mission + '<\/p><textarea style="display:none;" id="workdesc" name="workdesc' + currentExp + '" cols="45" rows="5">' + can_mission + '<\/textarea>\
  					<\/td>\
  				<\/tr>\
  				<tr height="12">\
  					<td height="12" colspan="3" align="center" class="standardBlack">\
  						<input name="deleteExp" onClick="removeExp(' + currentExp + ');" type="button" id="deleteExp" value="' + document.getElementById("CAN_DELETEEXP").value + '" \/><br \/>\
  					<\/td>\
  				<\/tr>\
  				<tr height="12">\
  					<td height="12" colspan="3" align="right" class="standardBlack">\
  						&nbsp;\
  					<\/td>\
  				<\/tr>\
  			<\/table>\
      <\/div>';
      getObj('maxExp').value = currentExp;
      currentExp++;
  	  getObj("entreprise").value = "";
      getObj("from_entreprise").value = "";
      getObj("to_entreprise").value = "";
      getObj("worktitle").value = "";
      getObj("workdesc").value = "";
  	  getObj('listExp').innerHTML += newElement;
  }