
function scJQGeneralAdd() {
  scLoadScInput('input:text.sc-js-input');
  scLoadScInput('input:password.sc-js-input');
  scLoadScInput('input:checkbox.sc-js-input');
  scLoadScInput('input:radio.sc-js-input');
  scLoadScInput('select.sc-js-input');
  scLoadScInput('textarea.sc-js-input');

} // scJQGeneralAdd

function scFocusField(sField) {
  var $oField = $('#id_sc_field_' + sField);

  if (0 == $oField.length) {
    $oField = $('input[name=' + sField + ']');
  }

  if (0 == $oField.length && document.F1.elements[sField]) {
    $oField = $(document.F1.elements[sField]);
  }

  if ($("#id_ac_" + sField).length > 0) {
    if ($oField.hasClass("select2-hidden-accessible")) {
      if (false == scSetFocusOnField($oField)) {
        setTimeout(function() { scSetFocusOnField($oField); }, 500);
      }
    }
    else {
      if (false == scSetFocusOnField($oField)) {
        if (false == scSetFocusOnField($("#id_ac_" + sField))) {
          setTimeout(function() { scSetFocusOnField($("#id_ac_" + sField)); }, 500);
        }
      }
      else {
        setTimeout(function() { scSetFocusOnField($oField); }, 500);
      }
    }
  }
  else {
    setTimeout(function() { scSetFocusOnField($oField); }, 500);
  }
} // scFocusField

function scSetFocusOnField($oField) {
  if ($oField.length > 0 && $oField[0].offsetHeight > 0 && $oField[0].offsetWidth > 0 && !$oField[0].disabled) {
    $oField[0].focus();
    return true;
  }
  return false;
} // scSetFocusOnField

function scEventControl_init(iSeqRow) {
  scEventControl_data["code_fiche" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["date_declaration" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["structure" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["user_fk" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["maladie_confirmee_labo" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["nin" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["prenom_malade" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["nom_malade" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["age_malade" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["unite_age_nm_fk" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["sexe_nm_fk" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["wilaya" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["commune" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["adresse_malade" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["lieu_travail" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["tel_malade" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["email_malade" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["pays_origine" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["symptomes" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["autres_symptomes" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["maladie_suspectee_by_ia" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["maladie_suspectee_nm_fk" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["antecedent_medicaux" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["lieux_frequentes" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["hospitalisation" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["date_hospitalisation" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["spacer1" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["evacuation" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["date_evacuation" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["structure_evacuation" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["labo_destination" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["evolution_nm_fk" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["date_sortie" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["date_deces" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["autre_evolution" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["commentaires" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["commentaires_labo" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["commentaires_semep" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["cas_similaires" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["type_prelevement_nm_fk" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["date_reception_prelevement" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["date_resultats_labo" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["resultats_labo" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
  scEventControl_data["attached_file" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""};
}

function scEventControl_active(iSeqRow) {
  if (scEventControl_data["code_fiche" + iSeqRow] && scEventControl_data["code_fiche" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["code_fiche" + iSeqRow] && scEventControl_data["code_fiche" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["date_declaration" + iSeqRow] && scEventControl_data["date_declaration" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["date_declaration" + iSeqRow] && scEventControl_data["date_declaration" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["structure" + iSeqRow] && scEventControl_data["structure" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["structure" + iSeqRow] && scEventControl_data["structure" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["user_fk" + iSeqRow] && scEventControl_data["user_fk" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["user_fk" + iSeqRow] && scEventControl_data["user_fk" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["maladie_confirmee_labo" + iSeqRow] && scEventControl_data["maladie_confirmee_labo" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["maladie_confirmee_labo" + iSeqRow] && scEventControl_data["maladie_confirmee_labo" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["nin" + iSeqRow] && scEventControl_data["nin" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["nin" + iSeqRow] && scEventControl_data["nin" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["prenom_malade" + iSeqRow] && scEventControl_data["prenom_malade" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["prenom_malade" + iSeqRow] && scEventControl_data["prenom_malade" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["nom_malade" + iSeqRow] && scEventControl_data["nom_malade" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["nom_malade" + iSeqRow] && scEventControl_data["nom_malade" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["age_malade" + iSeqRow] && scEventControl_data["age_malade" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["age_malade" + iSeqRow] && scEventControl_data["age_malade" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["unite_age_nm_fk" + iSeqRow] && scEventControl_data["unite_age_nm_fk" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["unite_age_nm_fk" + iSeqRow] && scEventControl_data["unite_age_nm_fk" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["sexe_nm_fk" + iSeqRow] && scEventControl_data["sexe_nm_fk" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["sexe_nm_fk" + iSeqRow] && scEventControl_data["sexe_nm_fk" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["wilaya" + iSeqRow] && scEventControl_data["wilaya" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["wilaya" + iSeqRow] && scEventControl_data["wilaya" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["commune" + iSeqRow] && scEventControl_data["commune" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["commune" + iSeqRow] && scEventControl_data["commune" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["adresse_malade" + iSeqRow] && scEventControl_data["adresse_malade" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["adresse_malade" + iSeqRow] && scEventControl_data["adresse_malade" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["lieu_travail" + iSeqRow] && scEventControl_data["lieu_travail" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["lieu_travail" + iSeqRow] && scEventControl_data["lieu_travail" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["tel_malade" + iSeqRow] && scEventControl_data["tel_malade" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["tel_malade" + iSeqRow] && scEventControl_data["tel_malade" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["email_malade" + iSeqRow] && scEventControl_data["email_malade" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["email_malade" + iSeqRow] && scEventControl_data["email_malade" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["pays_origine" + iSeqRow] && scEventControl_data["pays_origine" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["pays_origine" + iSeqRow] && scEventControl_data["pays_origine" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["symptomes" + iSeqRow] && scEventControl_data["symptomes" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["symptomes" + iSeqRow] && scEventControl_data["symptomes" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["autres_symptomes" + iSeqRow] && scEventControl_data["autres_symptomes" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["autres_symptomes" + iSeqRow] && scEventControl_data["autres_symptomes" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["maladie_suspectee_by_ia" + iSeqRow] && scEventControl_data["maladie_suspectee_by_ia" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["maladie_suspectee_by_ia" + iSeqRow] && scEventControl_data["maladie_suspectee_by_ia" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["maladie_suspectee_nm_fk" + iSeqRow] && scEventControl_data["maladie_suspectee_nm_fk" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["maladie_suspectee_nm_fk" + iSeqRow] && scEventControl_data["maladie_suspectee_nm_fk" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["antecedent_medicaux" + iSeqRow] && scEventControl_data["antecedent_medicaux" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["antecedent_medicaux" + iSeqRow] && scEventControl_data["antecedent_medicaux" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["lieux_frequentes" + iSeqRow] && scEventControl_data["lieux_frequentes" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["lieux_frequentes" + iSeqRow] && scEventControl_data["lieux_frequentes" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["hospitalisation" + iSeqRow] && scEventControl_data["hospitalisation" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["hospitalisation" + iSeqRow] && scEventControl_data["hospitalisation" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["date_hospitalisation" + iSeqRow] && scEventControl_data["date_hospitalisation" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["date_hospitalisation" + iSeqRow] && scEventControl_data["date_hospitalisation" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["spacer1" + iSeqRow] && scEventControl_data["spacer1" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["spacer1" + iSeqRow] && scEventControl_data["spacer1" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["evacuation" + iSeqRow] && scEventControl_data["evacuation" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["evacuation" + iSeqRow] && scEventControl_data["evacuation" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["date_evacuation" + iSeqRow] && scEventControl_data["date_evacuation" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["date_evacuation" + iSeqRow] && scEventControl_data["date_evacuation" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["structure_evacuation" + iSeqRow] && scEventControl_data["structure_evacuation" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["structure_evacuation" + iSeqRow] && scEventControl_data["structure_evacuation" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["labo_destination" + iSeqRow] && scEventControl_data["labo_destination" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["labo_destination" + iSeqRow] && scEventControl_data["labo_destination" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["evolution_nm_fk" + iSeqRow] && scEventControl_data["evolution_nm_fk" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["evolution_nm_fk" + iSeqRow] && scEventControl_data["evolution_nm_fk" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["date_sortie" + iSeqRow] && scEventControl_data["date_sortie" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["date_sortie" + iSeqRow] && scEventControl_data["date_sortie" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["date_deces" + iSeqRow] && scEventControl_data["date_deces" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["date_deces" + iSeqRow] && scEventControl_data["date_deces" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["autre_evolution" + iSeqRow] && scEventControl_data["autre_evolution" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["autre_evolution" + iSeqRow] && scEventControl_data["autre_evolution" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["commentaires" + iSeqRow] && scEventControl_data["commentaires" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["commentaires" + iSeqRow] && scEventControl_data["commentaires" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["commentaires_labo" + iSeqRow] && scEventControl_data["commentaires_labo" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["commentaires_labo" + iSeqRow] && scEventControl_data["commentaires_labo" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["commentaires_semep" + iSeqRow] && scEventControl_data["commentaires_semep" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["commentaires_semep" + iSeqRow] && scEventControl_data["commentaires_semep" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["cas_similaires" + iSeqRow] && scEventControl_data["cas_similaires" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["cas_similaires" + iSeqRow] && scEventControl_data["cas_similaires" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["type_prelevement_nm_fk" + iSeqRow] && scEventControl_data["type_prelevement_nm_fk" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["type_prelevement_nm_fk" + iSeqRow] && scEventControl_data["type_prelevement_nm_fk" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["date_reception_prelevement" + iSeqRow] && scEventControl_data["date_reception_prelevement" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["date_reception_prelevement" + iSeqRow] && scEventControl_data["date_reception_prelevement" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["date_resultats_labo" + iSeqRow] && scEventControl_data["date_resultats_labo" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["date_resultats_labo" + iSeqRow] && scEventControl_data["date_resultats_labo" + iSeqRow]["change"]) {
    return true;
  }
  if (scEventControl_data["resultats_labo" + iSeqRow] && scEventControl_data["resultats_labo" + iSeqRow]["blur"]) {
    return true;
  }
  if (scEventControl_data["resultats_labo" + iSeqRow] && scEventControl_data["resultats_labo" + iSeqRow]["change"]) {
    return true;
  }
  return false;
} // scEventControl_active

function scEventControl_onFocus(oField, iSeq) {
  var fieldId, fieldName;
  fieldId = $(oField).attr("id");
  fieldName = fieldId.substr(12);
  scEventControl_data[fieldName]["blur"] = true;
  if ("wilaya" + iSeq == fieldName) {
    scEventControl_data[fieldName]["blur"] = false;
  }
  if ("commune" + iSeq == fieldName) {
    scEventControl_data[fieldName]["blur"] = false;
  }
  if ("pays_origine" + iSeq == fieldName) {
    scEventControl_data[fieldName]["blur"] = false;
  }
  if ("symptomes" + iSeq == fieldName) {
    scEventControl_data[fieldName]["blur"] = false;
  }
  if ("maladie_suspectee_by_ia" + iSeq == fieldName) {
    scEventControl_data[fieldName]["blur"] = false;
  }
  if ("maladie_suspectee_nm_fk" + iSeq == fieldName) {
    scEventControl_data[fieldName]["blur"] = false;
  }
  if ("structure_evacuation" + iSeq == fieldName) {
    scEventControl_data[fieldName]["blur"] = false;
  }
  if ("labo_destination" + iSeq == fieldName) {
    scEventControl_data[fieldName]["blur"] = false;
  }
  if ("type_prelevement_nm_fk" + iSeq == fieldName) {
    scEventControl_data[fieldName]["blur"] = false;
  }
  scEventControl_data[fieldName]["change"] = false;
} // scEventControl_onFocus

function scEventControl_onBlur(sFieldName) {
  scEventControl_data[sFieldName]["blur"] = false;
  if (scEventControl_data[sFieldName]["change"]) {
        if (scEventControl_data[sFieldName]["original"] == $("#id_sc_field_" + sFieldName).val() || scEventControl_data[sFieldName]["calculated"] == $("#id_sc_field_" + sFieldName).val()) {
          scEventControl_data[sFieldName]["change"] = false;
        }
  }
} // scEventControl_onBlur

function scEventControl_onChange(sFieldName) {
  scEventControl_data[sFieldName]["change"] = false;
} // scEventControl_onChange

function scEventControl_onAutocomp(sFieldName) {
  scEventControl_data[sFieldName]["autocomp"] = false;
} // scEventControl_onChange

var scEventControl_data = {};

function scJQEventsAdd(iSeqRow) {
  $('#id_sc_field_id_fiche_ps' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_id_fiche_ps_onchange(this, iSeqRow) });
  $('#id_sc_field_code_fiche' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_code_fiche_onblur(this, iSeqRow) })
                                        .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_code_fiche_onchange(this, iSeqRow) })
                                        .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_code_fiche_onfocus(this, iSeqRow) });
  $('#id_sc_field_date_declaration' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_date_declaration_onblur(this, iSeqRow) })
                                              .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_date_declaration_onchange(this, iSeqRow) })
                                              .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_date_declaration_onfocus(this, iSeqRow) });
  $('#id_sc_field_date_declaration_hora' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_date_declaration_hora_onblur(this, iSeqRow) })
                                                   .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_date_declaration_hora_onchange(this, iSeqRow) })
                                                   .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_date_declaration_hora_onfocus(this, iSeqRow) });
  $('#id_sc_field_wilaya' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_wilaya_onblur(this, iSeqRow) })
                                    .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_wilaya_onchange(this, iSeqRow) })
                                    .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_wilaya_onfocus(this, iSeqRow) });
  $('#id_sc_field_commune' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_commune_onblur(this, iSeqRow) })
                                     .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_commune_onchange(this, iSeqRow) })
                                     .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_commune_onfocus(this, iSeqRow) });
  $('#id_sc_field_structure' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_structure_onblur(this, iSeqRow) })
                                       .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_structure_onchange(this, iSeqRow) })
                                       .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_structure_onfocus(this, iSeqRow) });
  $('#id_sc_field_nom_rapporteur' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_nom_rapporteur_onchange(this, iSeqRow) });
  $('#id_sc_field_tel_rapporteur' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_tel_rapporteur_onchange(this, iSeqRow) });
  $('#id_sc_field_email_rapporteur' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_email_rapporteur_onchange(this, iSeqRow) });
  $('#id_sc_field_maladie_suspectee_nm_fk' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_maladie_suspectee_nm_fk_onblur(this, iSeqRow) })
                                                     .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_maladie_suspectee_nm_fk_onchange(this, iSeqRow) })
                                                     .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_maladie_suspectee_nm_fk_onfocus(this, iSeqRow) });
  $('#id_sc_field_nom_malade' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_nom_malade_onblur(this, iSeqRow) })
                                        .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_nom_malade_onchange(this, iSeqRow) })
                                        .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_nom_malade_onfocus(this, iSeqRow) });
  $('#id_sc_field_prenom_malade' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_prenom_malade_onblur(this, iSeqRow) })
                                           .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_prenom_malade_onchange(this, iSeqRow) })
                                           .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_prenom_malade_onfocus(this, iSeqRow) });
  $('#id_sc_field_date_naissance_malade' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_date_naissance_malade_onchange(this, iSeqRow) });
  $('#id_sc_field_age_malade' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_age_malade_onblur(this, iSeqRow) })
                                        .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_age_malade_onchange(this, iSeqRow) })
                                        .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_age_malade_onfocus(this, iSeqRow) });
  $('#id_sc_field_sexe_nm_fk' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_sexe_nm_fk_onblur(this, iSeqRow) })
                                        .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_sexe_nm_fk_onchange(this, iSeqRow) })
                                        .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_sexe_nm_fk_onfocus(this, iSeqRow) });
  $('#id_sc_field_profession_malade' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_profession_malade_onchange(this, iSeqRow) });
  $('#id_sc_field_adresse_malade' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_adresse_malade_onblur(this, iSeqRow) })
                                            .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_adresse_malade_onchange(this, iSeqRow) })
                                            .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_adresse_malade_onfocus(this, iSeqRow) });
  $('#id_sc_field_wilaya_malade' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_wilaya_malade_onchange(this, iSeqRow) });
  $('#id_sc_field_commune_malade' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_commune_malade_onchange(this, iSeqRow) });
  $('#id_sc_field_lieu_travail' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_lieu_travail_onblur(this, iSeqRow) })
                                          .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_lieu_travail_onchange(this, iSeqRow) })
                                          .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_lieu_travail_onfocus(this, iSeqRow) });
  $('#id_sc_field_tel_malade' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_tel_malade_onblur(this, iSeqRow) })
                                        .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_tel_malade_onchange(this, iSeqRow) })
                                        .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_tel_malade_onfocus(this, iSeqRow) });
  $('#id_sc_field_email_malade' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_email_malade_onblur(this, iSeqRow) })
                                          .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_email_malade_onchange(this, iSeqRow) })
                                          .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_email_malade_onfocus(this, iSeqRow) });
  $('#id_sc_field_lieux_frequentes' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_lieux_frequentes_onblur(this, iSeqRow) })
                                              .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_lieux_frequentes_onchange(this, iSeqRow) })
                                              .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_lieux_frequentes_onfocus(this, iSeqRow) });
  $('#id_sc_field_date_apparition_symptomes' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_date_apparition_symptomes_onchange(this, iSeqRow) });
  $('#id_sc_field_autres_symptomes' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_autres_symptomes_onblur(this, iSeqRow) })
                                              .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_autres_symptomes_onchange(this, iSeqRow) })
                                              .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_autres_symptomes_onfocus(this, iSeqRow) });
  $('#id_sc_field_hospitalisation' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_hospitalisation_onblur(this, iSeqRow) })
                                             .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_hospitalisation_onchange(this, iSeqRow) })
                                             .bind('click', function() { sc_form_fiche_pro_sante_infirme_edit_hospitalisation_onclick(this, iSeqRow) })
                                             .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_hospitalisation_onfocus(this, iSeqRow) });
  $('#id_sc_field_date_hospitalisation' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_date_hospitalisation_onblur(this, iSeqRow) })
                                                  .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_date_hospitalisation_onchange(this, iSeqRow) })
                                                  .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_date_hospitalisation_onfocus(this, iSeqRow) });
  $('#id_sc_field_evacuation' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_evacuation_onblur(this, iSeqRow) })
                                        .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_evacuation_onchange(this, iSeqRow) })
                                        .bind('click', function() { sc_form_fiche_pro_sante_infirme_edit_evacuation_onclick(this, iSeqRow) })
                                        .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_evacuation_onfocus(this, iSeqRow) });
  $('#id_sc_field_date_evacuation' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_date_evacuation_onblur(this, iSeqRow) })
                                             .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_date_evacuation_onchange(this, iSeqRow) })
                                             .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_date_evacuation_onfocus(this, iSeqRow) });
  $('#id_sc_field_structure_evacuation' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_structure_evacuation_onblur(this, iSeqRow) })
                                                  .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_structure_evacuation_onchange(this, iSeqRow) })
                                                  .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_structure_evacuation_onfocus(this, iSeqRow) });
  $('#id_sc_field_antecedent_medicaux' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_antecedent_medicaux_onblur(this, iSeqRow) })
                                                 .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_antecedent_medicaux_onchange(this, iSeqRow) })
                                                 .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_antecedent_medicaux_onfocus(this, iSeqRow) });
  $('#id_sc_field_commentaires' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_commentaires_onblur(this, iSeqRow) })
                                          .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_commentaires_onchange(this, iSeqRow) })
                                          .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_commentaires_onfocus(this, iSeqRow) });
  $('#id_sc_field_longitude' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_longitude_onchange(this, iSeqRow) });
  $('#id_sc_field_latitude' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_latitude_onchange(this, iSeqRow) });
  $('#id_sc_field_envoie' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_envoie_onchange(this, iSeqRow) });
  $('#id_sc_field_envoie_ack' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_envoie_ack_onchange(this, iSeqRow) });
  $('#id_sc_field_valide' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_valide_onchange(this, iSeqRow) });
  $('#id_sc_field_descr_invalidite' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_descr_invalidite_onchange(this, iSeqRow) });
  $('#id_sc_field_user_fk' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_user_fk_onblur(this, iSeqRow) })
                                     .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_user_fk_onchange(this, iSeqRow) })
                                     .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_user_fk_onfocus(this, iSeqRow) });
  $('#id_sc_field_validator_fk' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_validator_fk_onchange(this, iSeqRow) });
  $('#id_sc_field_mobile' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_mobile_onchange(this, iSeqRow) });
  $('#id_sc_field_evolution_nm_fk' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_evolution_nm_fk_onblur(this, iSeqRow) })
                                             .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_evolution_nm_fk_onchange(this, iSeqRow) })
                                             .bind('click', function() { sc_form_fiche_pro_sante_infirme_edit_evolution_nm_fk_onclick(this, iSeqRow) })
                                             .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_evolution_nm_fk_onfocus(this, iSeqRow) });
  $('#id_sc_field_symptomes' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_symptomes_onblur(this, iSeqRow) })
                                       .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_symptomes_onchange(this, iSeqRow) })
                                       .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_symptomes_onfocus(this, iSeqRow) });
  $('#id_sc_field_device_id' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_device_id_onchange(this, iSeqRow) });
  $('#id_sc_field_maladie_suspectee_by_ia' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_maladie_suspectee_by_ia_onblur(this, iSeqRow) })
                                                     .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_maladie_suspectee_by_ia_onchange(this, iSeqRow) })
                                                     .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_maladie_suspectee_by_ia_onfocus(this, iSeqRow) });
  $('#id_sc_field_deleted' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_deleted_onchange(this, iSeqRow) });
  $('#id_sc_field_date_validation' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_date_validation_onchange(this, iSeqRow) });
  $('#id_sc_field_date_validation_hora' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_date_validation_hora_onchange(this, iSeqRow) });
  $('#id_sc_field_user_labo_fk' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_user_labo_fk_onchange(this, iSeqRow) });
  $('#id_sc_field_date_confirmation_labo' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_date_confirmation_labo_onchange(this, iSeqRow) });
  $('#id_sc_field_date_confirmation_labo_hora' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_date_confirmation_labo_hora_onchange(this, iSeqRow) });
  $('#id_sc_field_maladie_confirmee_labo' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_maladie_confirmee_labo_onblur(this, iSeqRow) })
                                                    .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_maladie_confirmee_labo_onchange(this, iSeqRow) })
                                                    .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_maladie_confirmee_labo_onfocus(this, iSeqRow) });
  $('#id_sc_field_statut_maladie' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_statut_maladie_onchange(this, iSeqRow) });
  $('#id_sc_field_date_sortie' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_date_sortie_onblur(this, iSeqRow) })
                                         .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_date_sortie_onchange(this, iSeqRow) })
                                         .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_date_sortie_onfocus(this, iSeqRow) });
  $('#id_sc_field_date_deces' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_date_deces_onblur(this, iSeqRow) })
                                        .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_date_deces_onchange(this, iSeqRow) })
                                        .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_date_deces_onfocus(this, iSeqRow) });
  $('#id_sc_field_date_prelevements' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_date_prelevements_onchange(this, iSeqRow) });
  $('#id_sc_field_date_reception_prelevement' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_date_reception_prelevement_onblur(this, iSeqRow) })
                                                        .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_date_reception_prelevement_onchange(this, iSeqRow) })
                                                        .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_date_reception_prelevement_onfocus(this, iSeqRow) });
  $('#id_sc_field_date_resultats_labo' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_date_resultats_labo_onblur(this, iSeqRow) })
                                                 .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_date_resultats_labo_onchange(this, iSeqRow) })
                                                 .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_date_resultats_labo_onfocus(this, iSeqRow) });
  $('#id_sc_field_type_prelevement_nm_fk' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_type_prelevement_nm_fk_onblur(this, iSeqRow) })
                                                    .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_type_prelevement_nm_fk_onchange(this, iSeqRow) })
                                                    .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_type_prelevement_nm_fk_onfocus(this, iSeqRow) });
  $('#id_sc_field_resultats_labo' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_resultats_labo_onblur(this, iSeqRow) })
                                            .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_resultats_labo_onchange(this, iSeqRow) })
                                            .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_resultats_labo_onfocus(this, iSeqRow) });
  $('#id_sc_field_labo_destination' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_labo_destination_onblur(this, iSeqRow) })
                                              .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_labo_destination_onchange(this, iSeqRow) })
                                              .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_labo_destination_onfocus(this, iSeqRow) });
  $('#id_sc_field_nin' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_nin_onblur(this, iSeqRow) })
                                 .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_nin_onchange(this, iSeqRow) })
                                 .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_nin_onfocus(this, iSeqRow) });
  $('#id_sc_field_commentaires_labo' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_commentaires_labo_onblur(this, iSeqRow) })
                                               .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_commentaires_labo_onchange(this, iSeqRow) })
                                               .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_commentaires_labo_onfocus(this, iSeqRow) });
  $('#id_sc_field_commentaires_semep' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_commentaires_semep_onblur(this, iSeqRow) })
                                                .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_commentaires_semep_onchange(this, iSeqRow) })
                                                .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_commentaires_semep_onfocus(this, iSeqRow) });
  $('#id_sc_field_statut_fiche' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_statut_fiche_onchange(this, iSeqRow) });
  $('#id_sc_field_autre_evolution' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_autre_evolution_onblur(this, iSeqRow) })
                                             .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_autre_evolution_onchange(this, iSeqRow) })
                                             .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_autre_evolution_onfocus(this, iSeqRow) });
  $('#id_sc_field_attached_file' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_attached_file_onblur(this, iSeqRow) })
                                           .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_attached_file_onchange(this, iSeqRow) })
                                           .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_attached_file_onfocus(this, iSeqRow) });
  $('#id_sc_field_cas_similaires' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_cas_similaires_onblur(this, iSeqRow) })
                                            .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_cas_similaires_onchange(this, iSeqRow) })
                                            .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_cas_similaires_onfocus(this, iSeqRow) });
  $('#id_sc_field_unite_age_nm_fk' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_unite_age_nm_fk_onblur(this, iSeqRow) })
                                             .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_unite_age_nm_fk_onchange(this, iSeqRow) })
                                             .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_unite_age_nm_fk_onfocus(this, iSeqRow) });
  $('#id_sc_field_pays_origine' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_pays_origine_onblur(this, iSeqRow) })
                                          .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_pays_origine_onchange(this, iSeqRow) })
                                          .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_pays_origine_onfocus(this, iSeqRow) });
  $('#id_sc_field_nationalite_nm_fk' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_nationalite_nm_fk_onchange(this, iSeqRow) });
  $('#id_sc_field_spacer1' + iSeqRow).bind('blur', function() { sc_form_fiche_pro_sante_infirme_edit_spacer1_onblur(this, iSeqRow) })
                                     .bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_spacer1_onchange(this, iSeqRow) })
                                     .bind('focus', function() { sc_form_fiche_pro_sante_infirme_edit_spacer1_onfocus(this, iSeqRow) });
  $('#id_sc_field_spacer2' + iSeqRow).bind('change', function() { sc_form_fiche_pro_sante_infirme_edit_spacer2_onchange(this, iSeqRow) });
  $('.sc-ui-radio-unite_age_nm_fk' + iSeqRow).on('click', function() { scMarkFormAsChanged(); });
  $('.sc-ui-radio-sexe_nm_fk' + iSeqRow).on('click', function() { scMarkFormAsChanged(); });
  $('.sc-ui-radio-hospitalisation' + iSeqRow).on('click', function() { scMarkFormAsChanged(); });
  $('.sc-ui-radio-evacuation' + iSeqRow).on('click', function() { scMarkFormAsChanged(); });
  $('.sc-ui-radio-evolution_nm_fk' + iSeqRow).on('click', function() { scMarkFormAsChanged(); });
} // scJQEventsAdd

function sc_form_fiche_pro_sante_infirme_edit_id_fiche_ps_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_code_fiche_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_code_fiche();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_code_fiche_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_code_fiche_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_date_declaration_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_date_declaration();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_date_declaration_hora_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_date_declaration();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_date_declaration_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_date_declaration_hora_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_date_declaration_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_date_declaration_hora_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_wilaya_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_wilaya();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_wilaya_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
  do_ajax_form_fiche_pro_sante_infirme_edit_refresh_wilaya();
}

function sc_form_fiche_pro_sante_infirme_edit_wilaya_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_commune_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_commune();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_commune_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_commune_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_structure_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_structure();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_structure_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
  lookup_structure();
}

function sc_form_fiche_pro_sante_infirme_edit_structure_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_nom_rapporteur_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_tel_rapporteur_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_email_rapporteur_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_maladie_suspectee_nm_fk_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_maladie_suspectee_nm_fk();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_maladie_suspectee_nm_fk_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_maladie_suspectee_nm_fk_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_nom_malade_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_nom_malade();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_nom_malade_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_nom_malade_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_prenom_malade_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_prenom_malade();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_prenom_malade_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_prenom_malade_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_date_naissance_malade_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_age_malade_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_age_malade();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_age_malade_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_age_malade_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_sexe_nm_fk_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_sexe_nm_fk();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_sexe_nm_fk_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_sexe_nm_fk_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_profession_malade_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_adresse_malade_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_adresse_malade();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_adresse_malade_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_adresse_malade_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_wilaya_malade_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_commune_malade_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_lieu_travail_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_lieu_travail();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_lieu_travail_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_lieu_travail_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_tel_malade_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_tel_malade();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_tel_malade_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_tel_malade_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_email_malade_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_email_malade();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_email_malade_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_email_malade_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_lieux_frequentes_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_lieux_frequentes();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_lieux_frequentes_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_lieux_frequentes_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_date_apparition_symptomes_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_autres_symptomes_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_autres_symptomes();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_autres_symptomes_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_autres_symptomes_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_hospitalisation_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_hospitalisation();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_hospitalisation_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_hospitalisation_onclick(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_event_hospitalisation_onclick();
}

function sc_form_fiche_pro_sante_infirme_edit_hospitalisation_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_date_hospitalisation_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_date_hospitalisation();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_date_hospitalisation_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_date_hospitalisation_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_evacuation_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_evacuation();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_evacuation_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_evacuation_onclick(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_event_evacuation_onclick();
}

function sc_form_fiche_pro_sante_infirme_edit_evacuation_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_date_evacuation_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_date_evacuation();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_date_evacuation_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_date_evacuation_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_structure_evacuation_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_structure_evacuation();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_structure_evacuation_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_structure_evacuation_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_antecedent_medicaux_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_antecedent_medicaux();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_antecedent_medicaux_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_antecedent_medicaux_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_commentaires_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_commentaires();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_commentaires_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_commentaires_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_longitude_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_latitude_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_envoie_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_envoie_ack_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_valide_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_descr_invalidite_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_user_fk_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_user_fk();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_user_fk_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
  lookup_user_fk();
}

function sc_form_fiche_pro_sante_infirme_edit_user_fk_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_validator_fk_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_mobile_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_evolution_nm_fk_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_evolution_nm_fk();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_evolution_nm_fk_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_evolution_nm_fk_onclick(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_event_evolution_nm_fk_onclick();
}

function sc_form_fiche_pro_sante_infirme_edit_evolution_nm_fk_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_symptomes_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_symptomes();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_symptomes_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_symptomes_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_device_id_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_maladie_suspectee_by_ia_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_maladie_suspectee_by_ia();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_maladie_suspectee_by_ia_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_maladie_suspectee_by_ia_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_deleted_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_date_validation_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_date_validation_hora_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_user_labo_fk_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_date_confirmation_labo_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_date_confirmation_labo_hora_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_maladie_confirmee_labo_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_maladie_confirmee_labo();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_maladie_confirmee_labo_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
  lookup_maladie_confirmee_labo();
}

function sc_form_fiche_pro_sante_infirme_edit_maladie_confirmee_labo_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_statut_maladie_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_date_sortie_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_date_sortie();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_date_sortie_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_date_sortie_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_date_deces_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_date_deces();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_date_deces_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_date_deces_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_date_prelevements_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_date_reception_prelevement_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_date_reception_prelevement();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_date_reception_prelevement_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_date_reception_prelevement_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_date_resultats_labo_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_date_resultats_labo();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_date_resultats_labo_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_date_resultats_labo_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_type_prelevement_nm_fk_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_type_prelevement_nm_fk();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_type_prelevement_nm_fk_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_type_prelevement_nm_fk_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_resultats_labo_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_resultats_labo();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_resultats_labo_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_resultats_labo_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_labo_destination_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_labo_destination();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_labo_destination_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_labo_destination_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_nin_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_nin();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_nin_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_nin_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_commentaires_labo_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_commentaires_labo();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_commentaires_labo_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_commentaires_labo_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_commentaires_semep_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_commentaires_semep();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_commentaires_semep_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_commentaires_semep_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_statut_fiche_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_autre_evolution_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_autre_evolution();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_autre_evolution_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_autre_evolution_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_attached_file_onblur(oThis, iSeqRow) {
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_attached_file_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_attached_file_onfocus(oThis, iSeqRow) {
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_cas_similaires_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_cas_similaires();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_cas_similaires_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_cas_similaires_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_unite_age_nm_fk_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_unite_age_nm_fk();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_unite_age_nm_fk_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_unite_age_nm_fk_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_pays_origine_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_pays_origine();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_pays_origine_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_pays_origine_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_nationalite_nm_fk_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_spacer1_onblur(oThis, iSeqRow) {
  do_ajax_form_fiche_pro_sante_infirme_edit_validate_spacer1();
  scCssBlur(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_spacer1_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function sc_form_fiche_pro_sante_infirme_edit_spacer1_onfocus(oThis, iSeqRow) {
  scEventControl_onFocus(oThis, iSeqRow);
  scCssFocus(oThis);
}

function sc_form_fiche_pro_sante_infirme_edit_spacer2_onchange(oThis, iSeqRow) {
  scMarkFormAsChanged();
}

function displayChange_block(block, status) {
	if ("0" == block) {
		displayChange_block_0(status);
	}
	if ("1" == block) {
		displayChange_block_1(status);
	}
	if ("2" == block) {
		displayChange_block_2(status);
	}
	if ("3" == block) {
		displayChange_block_3(status);
	}
	if ("4" == block) {
		displayChange_block_4(status);
	}
	if ("5" == block) {
		displayChange_block_5(status);
	}
	if ("6" == block) {
		displayChange_block_6(status);
	}
	if ("7" == block) {
		displayChange_block_7(status);
	}
	if ("8" == block) {
		displayChange_block_8(status);
	}
	if ("9" == block) {
		displayChange_block_9(status);
	}
	if ("10" == block) {
		displayChange_block_10(status);
	}
}

function displayChange_block_0(status) {
	displayChange_field("code_fiche", "", status);
	displayChange_field("date_declaration", "", status);
	displayChange_field("structure", "", status);
	displayChange_field("user_fk", "", status);
	displayChange_field("maladie_confirmee_labo", "", status);
}

function displayChange_block_1(status) {
	displayChange_field("nin", "", status);
	displayChange_field("prenom_malade", "", status);
	displayChange_field("nom_malade", "", status);
	displayChange_field("age_malade", "", status);
	displayChange_field("unite_age_nm_fk", "", status);
	displayChange_field("sexe_nm_fk", "", status);
}

function displayChange_block_2(status) {
	displayChange_field("wilaya", "", status);
	displayChange_field("commune", "", status);
	displayChange_field("adresse_malade", "", status);
	displayChange_field("lieu_travail", "", status);
	displayChange_field("tel_malade", "", status);
	displayChange_field("email_malade", "", status);
	displayChange_field("pays_origine", "", status);
}

function displayChange_block_3(status) {
	displayChange_field("symptomes", "", status);
	displayChange_field("autres_symptomes", "", status);
}

function displayChange_block_4(status) {
	displayChange_field("maladie_suspectee_by_ia", "", status);
	displayChange_field("maladie_suspectee_nm_fk", "", status);
}

function displayChange_block_5(status) {
	displayChange_field("antecedent_medicaux", "", status);
	displayChange_field("lieux_frequentes", "", status);
}

function displayChange_block_6(status) {
	displayChange_field("hospitalisation", "", status);
	displayChange_field("date_hospitalisation", "", status);
	displayChange_field("spacer1", "", status);
	displayChange_field("evacuation", "", status);
	displayChange_field("date_evacuation", "", status);
	displayChange_field("structure_evacuation", "", status);
	displayChange_field("labo_destination", "", status);
}

function displayChange_block_7(status) {
	displayChange_field("evolution_nm_fk", "", status);
	displayChange_field("date_sortie", "", status);
	displayChange_field("date_deces", "", status);
	displayChange_field("autre_evolution", "", status);
}

function displayChange_block_8(status) {
	displayChange_field("commentaires", "", status);
	displayChange_field("commentaires_labo", "", status);
	displayChange_field("commentaires_semep", "", status);
}

function displayChange_block_9(status) {
	displayChange_field("cas_similaires", "", status);
}

function displayChange_block_10(status) {
	displayChange_field("type_prelevement_nm_fk", "", status);
	displayChange_field("date_reception_prelevement", "", status);
	displayChange_field("date_resultats_labo", "", status);
	displayChange_field("resultats_labo", "", status);
	displayChange_field("attached_file", "", status);
}

function displayChange_row(row, status) {
	displayChange_field_code_fiche(row, status);
	displayChange_field_date_declaration(row, status);
	displayChange_field_structure(row, status);
	displayChange_field_user_fk(row, status);
	displayChange_field_maladie_confirmee_labo(row, status);
	displayChange_field_nin(row, status);
	displayChange_field_prenom_malade(row, status);
	displayChange_field_nom_malade(row, status);
	displayChange_field_age_malade(row, status);
	displayChange_field_unite_age_nm_fk(row, status);
	displayChange_field_sexe_nm_fk(row, status);
	displayChange_field_wilaya(row, status);
	displayChange_field_commune(row, status);
	displayChange_field_adresse_malade(row, status);
	displayChange_field_lieu_travail(row, status);
	displayChange_field_tel_malade(row, status);
	displayChange_field_email_malade(row, status);
	displayChange_field_pays_origine(row, status);
	displayChange_field_symptomes(row, status);
	displayChange_field_autres_symptomes(row, status);
	displayChange_field_maladie_suspectee_by_ia(row, status);
	displayChange_field_maladie_suspectee_nm_fk(row, status);
	displayChange_field_antecedent_medicaux(row, status);
	displayChange_field_lieux_frequentes(row, status);
	displayChange_field_hospitalisation(row, status);
	displayChange_field_date_hospitalisation(row, status);
	displayChange_field_spacer1(row, status);
	displayChange_field_evacuation(row, status);
	displayChange_field_date_evacuation(row, status);
	displayChange_field_structure_evacuation(row, status);
	displayChange_field_labo_destination(row, status);
	displayChange_field_evolution_nm_fk(row, status);
	displayChange_field_date_sortie(row, status);
	displayChange_field_date_deces(row, status);
	displayChange_field_autre_evolution(row, status);
	displayChange_field_commentaires(row, status);
	displayChange_field_commentaires_labo(row, status);
	displayChange_field_commentaires_semep(row, status);
	displayChange_field_cas_similaires(row, status);
	displayChange_field_type_prelevement_nm_fk(row, status);
	displayChange_field_date_reception_prelevement(row, status);
	displayChange_field_date_resultats_labo(row, status);
	displayChange_field_resultats_labo(row, status);
	displayChange_field_attached_file(row, status);
}

function displayChange_field(field, row, status) {
	if ("code_fiche" == field) {
		displayChange_field_code_fiche(row, status);
	}
	if ("date_declaration" == field) {
		displayChange_field_date_declaration(row, status);
	}
	if ("structure" == field) {
		displayChange_field_structure(row, status);
	}
	if ("user_fk" == field) {
		displayChange_field_user_fk(row, status);
	}
	if ("maladie_confirmee_labo" == field) {
		displayChange_field_maladie_confirmee_labo(row, status);
	}
	if ("nin" == field) {
		displayChange_field_nin(row, status);
	}
	if ("prenom_malade" == field) {
		displayChange_field_prenom_malade(row, status);
	}
	if ("nom_malade" == field) {
		displayChange_field_nom_malade(row, status);
	}
	if ("age_malade" == field) {
		displayChange_field_age_malade(row, status);
	}
	if ("unite_age_nm_fk" == field) {
		displayChange_field_unite_age_nm_fk(row, status);
	}
	if ("sexe_nm_fk" == field) {
		displayChange_field_sexe_nm_fk(row, status);
	}
	if ("wilaya" == field) {
		displayChange_field_wilaya(row, status);
	}
	if ("commune" == field) {
		displayChange_field_commune(row, status);
	}
	if ("adresse_malade" == field) {
		displayChange_field_adresse_malade(row, status);
	}
	if ("lieu_travail" == field) {
		displayChange_field_lieu_travail(row, status);
	}
	if ("tel_malade" == field) {
		displayChange_field_tel_malade(row, status);
	}
	if ("email_malade" == field) {
		displayChange_field_email_malade(row, status);
	}
	if ("pays_origine" == field) {
		displayChange_field_pays_origine(row, status);
	}
	if ("symptomes" == field) {
		displayChange_field_symptomes(row, status);
	}
	if ("autres_symptomes" == field) {
		displayChange_field_autres_symptomes(row, status);
	}
	if ("maladie_suspectee_by_ia" == field) {
		displayChange_field_maladie_suspectee_by_ia(row, status);
	}
	if ("maladie_suspectee_nm_fk" == field) {
		displayChange_field_maladie_suspectee_nm_fk(row, status);
	}
	if ("antecedent_medicaux" == field) {
		displayChange_field_antecedent_medicaux(row, status);
	}
	if ("lieux_frequentes" == field) {
		displayChange_field_lieux_frequentes(row, status);
	}
	if ("hospitalisation" == field) {
		displayChange_field_hospitalisation(row, status);
	}
	if ("date_hospitalisation" == field) {
		displayChange_field_date_hospitalisation(row, status);
	}
	if ("spacer1" == field) {
		displayChange_field_spacer1(row, status);
	}
	if ("evacuation" == field) {
		displayChange_field_evacuation(row, status);
	}
	if ("date_evacuation" == field) {
		displayChange_field_date_evacuation(row, status);
	}
	if ("structure_evacuation" == field) {
		displayChange_field_structure_evacuation(row, status);
	}
	if ("labo_destination" == field) {
		displayChange_field_labo_destination(row, status);
	}
	if ("evolution_nm_fk" == field) {
		displayChange_field_evolution_nm_fk(row, status);
	}
	if ("date_sortie" == field) {
		displayChange_field_date_sortie(row, status);
	}
	if ("date_deces" == field) {
		displayChange_field_date_deces(row, status);
	}
	if ("autre_evolution" == field) {
		displayChange_field_autre_evolution(row, status);
	}
	if ("commentaires" == field) {
		displayChange_field_commentaires(row, status);
	}
	if ("commentaires_labo" == field) {
		displayChange_field_commentaires_labo(row, status);
	}
	if ("commentaires_semep" == field) {
		displayChange_field_commentaires_semep(row, status);
	}
	if ("cas_similaires" == field) {
		displayChange_field_cas_similaires(row, status);
	}
	if ("type_prelevement_nm_fk" == field) {
		displayChange_field_type_prelevement_nm_fk(row, status);
	}
	if ("date_reception_prelevement" == field) {
		displayChange_field_date_reception_prelevement(row, status);
	}
	if ("date_resultats_labo" == field) {
		displayChange_field_date_resultats_labo(row, status);
	}
	if ("resultats_labo" == field) {
		displayChange_field_resultats_labo(row, status);
	}
	if ("attached_file" == field) {
		displayChange_field_attached_file(row, status);
	}
}

function displayChange_field_code_fiche(row, status) {
    var fieldId;
}

function displayChange_field_date_declaration(row, status) {
    var fieldId;
}

function displayChange_field_structure(row, status) {
    var fieldId;
}

function displayChange_field_user_fk(row, status) {
    var fieldId;
}

function displayChange_field_maladie_confirmee_labo(row, status) {
    var fieldId;
}

function displayChange_field_nin(row, status) {
    var fieldId;
}

function displayChange_field_prenom_malade(row, status) {
    var fieldId;
}

function displayChange_field_nom_malade(row, status) {
    var fieldId;
}

function displayChange_field_age_malade(row, status) {
    var fieldId;
}

function displayChange_field_unite_age_nm_fk(row, status) {
    var fieldId;
}

function displayChange_field_sexe_nm_fk(row, status) {
    var fieldId;
}

function displayChange_field_wilaya(row, status) {
    var fieldId;
	if ("on" == status) {
		if ("all" == row) {
			var fieldList = $(".css_wilaya__obj");
			for (var i = 0; i < fieldList.length; i++) {
				$($(fieldList[i]).attr("id")).select2("destroy");
			}
		}
		else {
			$("#id_sc_field_wilaya" + row).select2("destroy");
		}
		scJQSelect2Add(row, "wilaya");
	}
}

function displayChange_field_commune(row, status) {
    var fieldId;
	if ("on" == status) {
		if ("all" == row) {
			var fieldList = $(".css_commune__obj");
			for (var i = 0; i < fieldList.length; i++) {
				$($(fieldList[i]).attr("id")).select2("destroy");
			}
		}
		else {
			$("#id_sc_field_commune" + row).select2("destroy");
		}
		scJQSelect2Add(row, "commune");
	}
}

function displayChange_field_adresse_malade(row, status) {
    var fieldId;
}

function displayChange_field_lieu_travail(row, status) {
    var fieldId;
}

function displayChange_field_tel_malade(row, status) {
    var fieldId;
}

function displayChange_field_email_malade(row, status) {
    var fieldId;
}

function displayChange_field_pays_origine(row, status) {
    var fieldId;
	if ("on" == status) {
		if ("all" == row) {
			var fieldList = $(".css_pays_origine__obj");
			for (var i = 0; i < fieldList.length; i++) {
				$($(fieldList[i]).attr("id")).select2("destroy");
			}
		}
		else {
			$("#id_sc_field_pays_origine" + row).select2("destroy");
		}
		scJQSelect2Add(row, "pays_origine");
	}
}

function displayChange_field_symptomes(row, status) {
    var fieldId;
	if ("on" == status) {
		if ("all" == row) {
			var fieldList = $(".css_symptomes__obj");
			for (var i = 0; i < fieldList.length; i++) {
				$($(fieldList[i]).attr("id")).select2("destroy");
			}
		}
		else {
			$("#id_sc_field_symptomes" + row).select2("destroy");
		}
		scJQSelect2Add(row, "symptomes");
	}
}

function displayChange_field_autres_symptomes(row, status) {
    var fieldId;
}

function displayChange_field_maladie_suspectee_by_ia(row, status) {
    var fieldId;
}

function displayChange_field_maladie_suspectee_nm_fk(row, status) {
    var fieldId;
}

function displayChange_field_antecedent_medicaux(row, status) {
    var fieldId;
}

function displayChange_field_lieux_frequentes(row, status) {
    var fieldId;
}

function displayChange_field_hospitalisation(row, status) {
    var fieldId;
}

function displayChange_field_date_hospitalisation(row, status) {
    var fieldId;
}

function displayChange_field_spacer1(row, status) {
    var fieldId;
}

function displayChange_field_evacuation(row, status) {
    var fieldId;
}

function displayChange_field_date_evacuation(row, status) {
    var fieldId;
}

function displayChange_field_structure_evacuation(row, status) {
    var fieldId;
	if ("on" == status) {
		if ("all" == row) {
			var fieldList = $(".css_structure_evacuation__obj");
			for (var i = 0; i < fieldList.length; i++) {
				$($(fieldList[i]).attr("id")).select2("destroy");
			}
		}
		else {
			$("#id_sc_field_structure_evacuation" + row).select2("destroy");
		}
		scJQSelect2Add(row, "structure_evacuation");
	}
}

function displayChange_field_labo_destination(row, status) {
    var fieldId;
	if ("on" == status) {
		if ("all" == row) {
			var fieldList = $(".css_labo_destination__obj");
			for (var i = 0; i < fieldList.length; i++) {
				$($(fieldList[i]).attr("id")).select2("destroy");
			}
		}
		else {
			$("#id_sc_field_labo_destination" + row).select2("destroy");
		}
		scJQSelect2Add(row, "labo_destination");
	}
}

function displayChange_field_evolution_nm_fk(row, status) {
    var fieldId;
}

function displayChange_field_date_sortie(row, status) {
    var fieldId;
}

function displayChange_field_date_deces(row, status) {
    var fieldId;
}

function displayChange_field_autre_evolution(row, status) {
    var fieldId;
}

function displayChange_field_commentaires(row, status) {
    var fieldId;
}

function displayChange_field_commentaires_labo(row, status) {
    var fieldId;
}

function displayChange_field_commentaires_semep(row, status) {
    var fieldId;
}

function displayChange_field_cas_similaires(row, status) {
    var fieldId;
}

function displayChange_field_type_prelevement_nm_fk(row, status) {
    var fieldId;
	if ("on" == status) {
		if ("all" == row) {
			var fieldList = $(".css_type_prelevement_nm_fk__obj");
			for (var i = 0; i < fieldList.length; i++) {
				$($(fieldList[i]).attr("id")).select2("destroy");
			}
		}
		else {
			$("#id_sc_field_type_prelevement_nm_fk" + row).select2("destroy");
		}
		scJQSelect2Add(row, "type_prelevement_nm_fk");
	}
}

function displayChange_field_date_reception_prelevement(row, status) {
    var fieldId;
}

function displayChange_field_date_resultats_labo(row, status) {
    var fieldId;
}

function displayChange_field_resultats_labo(row, status) {
    var fieldId;
}

function displayChange_field_attached_file(row, status) {
    var fieldId;
}

function scRecreateSelect2() {
	displayChange_field_wilaya("all", "on");
	displayChange_field_commune("all", "on");
	displayChange_field_pays_origine("all", "on");
	displayChange_field_symptomes("all", "on");
	displayChange_field_structure_evacuation("all", "on");
	displayChange_field_labo_destination("all", "on");
	displayChange_field_type_prelevement_nm_fk("all", "on");
}
function scResetPagesDisplay() {
	$(".sc-form-page").show();
}

function scHidePage(pageNo) {
	$("#id_form_fiche_pro_sante_infirme_edit_form" + pageNo).hide();
}

function scCheckNoPageSelected() {
	if (!$(".sc-form-page").filter(".scTabActive").filter(":visible").length) {
		var inactiveTabs = $(".sc-form-page").filter(".scTabInactive").filter(":visible");
		if (inactiveTabs.length) {
			var tabNo = $(inactiveTabs[0]).attr("id").substr(41);
		}
	}
}
var sc_jq_calendar_value = {};

function scJQCalendarAdd(iSeqRow) {
  $("#id_sc_field_date_declaration" + iSeqRow).datepicker({
    beforeShow: function(input, inst) {
      var $oField = $(this),
          aParts  = $oField.val().split(" "),
          sTime   = "";
      sc_jq_calendar_value["#id_sc_field_date_declaration" + iSeqRow] = $oField.val();
      if (2 == aParts.length) {
        sTime = " " + aParts[1];
      }
      if ('' == sTime || ' ' == sTime) {
        sTime = ' <?php echo $this->jqueryCalendarTimeStart($this->field_config['date_declaration']['date_format']); ?>';
      }
      $oField.datepicker("option", "dateFormat", "<?php echo $this->jqueryCalendarDtFormat("" . str_replace(array('/', 'aaaa', 'hh', 'ii', 'ss', ':', ';', $_SESSION['scriptcase']['reg_conf']['date_sep'], $_SESSION['scriptcase']['reg_conf']['time_sep']), array('', 'yyyy', '','','', '', '', '', ''), $this->field_config['date_declaration']['date_format']) . "", "" . $_SESSION['scriptcase']['reg_conf']['date_sep'] . ""); ?>" + sTime)
<?php
if ('' != $miniCalendarFA) {
?>
    .next('button').append("<?php echo $miniCalendarFA; ?>")
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    .next('button').append("<?php echo $miniCalendarButton[0]; ?>")
<?php
}
?>
    },
    onClose: function(dateText, inst) {
      do_ajax_form_fiche_pro_sante_infirme_edit_validate_date_declaration(iSeqRow);
    },
    showWeek: true,
    numberOfMonths: 1,
    changeMonth: true,
    changeYear: true,
    yearRange: 'c-5:c+5',
    dayNames: ["<?php        echo html_entity_decode($this->Ini->Nm_lang['lang_days_sund'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_mond'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_tued'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_wend'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_thud'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_frid'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_satd'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>"],
    dayNamesMin: ["<?php     echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_sund'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_mond'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_tued'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_wend'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_thud'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_frid'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_satd'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>"],
    monthNames: ["<?php      echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_janu"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_febr"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_marc"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_apri"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_mayy"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_june"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_july"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_augu"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_sept"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_octo"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_nove"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_dece"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>"],
    monthNamesShort: ["<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_janu'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_febr'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_marc'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_apri'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_mayy'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_june'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_july'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_augu'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_sept'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_octo'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_nove'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_dece'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>"],
    weekHeader: "<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_days_sem'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>",
    firstDay: <?php echo $this->jqueryCalendarWeekInit("" . $_SESSION['scriptcase']['reg_conf']['date_week_ini'] . ""); ?>,
    dateFormat: "<?php echo $this->jqueryCalendarDtFormat("" . str_replace(array('/', 'aaaa', 'hh', 'ii', 'ss', ':', ';', $_SESSION['scriptcase']['reg_conf']['date_sep'], $_SESSION['scriptcase']['reg_conf']['time_sep']), array('', 'yyyy', '','','', '', '', '', ''), $this->field_config['date_declaration']['date_format']) . "", "" . $_SESSION['scriptcase']['reg_conf']['date_sep'] . ""); ?>",
    showOtherMonths: true,
    showOn: "button",
<?php
$miniCalendarIcon   = $this->jqueryIconFile('calendar');
$miniCalendarFA     = $this->jqueryFAFile('calendar');
$miniCalendarButton = $this->jqueryButtonText('calendar');
if ('' != $miniCalendarIcon) {
?>
    buttonImage: "<?php echo $miniCalendarIcon; ?>",
    buttonImageOnly: true,
<?php
}
elseif ('' != $miniCalendarFA) {
?>
    buttonText: "",
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    buttonText: "",
<?php
}
?>
    currentText: "<?php  echo html_entity_decode($this->Ini->Nm_lang["lang_per_today"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);       ?>",
    closeText: "<?php  echo html_entity_decode($this->Ini->Nm_lang["lang_btns_mess_clse"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);       ?>",
  })
<?php
if ('' != $miniCalendarFA) {
?>
    .next('button').append("<?php echo $miniCalendarFA; ?>")
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    .next('button').append("<?php echo $miniCalendarButton[0]; ?>")
<?php
}
?>
  $("#id_sc_field_date_hospitalisation" + iSeqRow).datepicker({
    beforeShow: function(input, inst) {
      var $oField = $(this),
          aParts  = $oField.val().split(" "),
          sTime   = "";
      sc_jq_calendar_value["#id_sc_field_date_hospitalisation" + iSeqRow] = $oField.val();
    },
    onClose: function(dateText, inst) {
      var elemName;
      if ("" != dateText) {
        elemName = $(this).attr("name");
        $("input[name=sc_clone_" + elemName + "]").hide();
        $("input[name=" + elemName + "]").show();
      }
      do_ajax_form_fiche_pro_sante_infirme_edit_validate_date_hospitalisation(iSeqRow);
    },
    showWeek: true,
    numberOfMonths: 1,
    changeMonth: true,
    changeYear: true,
    yearRange: 'c-5:c+5',
    dayNames: ["<?php        echo html_entity_decode($this->Ini->Nm_lang['lang_days_sund'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_mond'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_tued'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_wend'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_thud'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_frid'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_satd'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>"],
    dayNamesMin: ["<?php     echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_sund'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_mond'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_tued'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_wend'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_thud'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_frid'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_satd'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>"],
    monthNames: ["<?php      echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_janu"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_febr"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_marc"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_apri"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_mayy"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_june"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_july"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_augu"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_sept"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_octo"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_nove"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_dece"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>"],
    monthNamesShort: ["<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_janu'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_febr'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_marc'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_apri'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_mayy'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_june'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_july'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_augu'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_sept'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_octo'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_nove'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_dece'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>"],
    weekHeader: "<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_days_sem'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>",
    firstDay: <?php echo $this->jqueryCalendarWeekInit("" . $_SESSION['scriptcase']['reg_conf']['date_week_ini'] . ""); ?>,
    dateFormat: "<?php echo $this->jqueryCalendarDtFormat("" . str_replace(array('/', 'aaaa', $_SESSION['scriptcase']['reg_conf']['date_sep']), array('', 'yyyy', ''), $this->field_config['date_hospitalisation']['date_format']) . "", "" . $_SESSION['scriptcase']['reg_conf']['date_sep'] . ""); ?>",
    showOtherMonths: true,
    showOn: "button",
<?php
$miniCalendarIcon   = $this->jqueryIconFile('calendar');
$miniCalendarFA     = $this->jqueryFAFile('calendar');
$miniCalendarButton = $this->jqueryButtonText('calendar');
if ('' != $miniCalendarIcon) {
?>
    buttonImage: "<?php echo $miniCalendarIcon; ?>",
    buttonImageOnly: true,
<?php
}
elseif ('' != $miniCalendarFA) {
?>
    buttonText: "",
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    buttonText: "",
<?php
}
?>
    currentText: "<?php  echo html_entity_decode($this->Ini->Nm_lang["lang_per_today"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);       ?>",
    closeText: "<?php  echo html_entity_decode($this->Ini->Nm_lang["lang_btns_mess_clse"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);       ?>",
  })
<?php
if ('' != $miniCalendarFA) {
?>
    .next('button').append("<?php echo $miniCalendarFA; ?>")
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    .next('button').append("<?php echo $miniCalendarButton[0]; ?>")
<?php
}
?>
  $("#id_sc_field_date_evacuation" + iSeqRow).datepicker({
    beforeShow: function(input, inst) {
      var $oField = $(this),
          aParts  = $oField.val().split(" "),
          sTime   = "";
      sc_jq_calendar_value["#id_sc_field_date_evacuation" + iSeqRow] = $oField.val();
    },
    onClose: function(dateText, inst) {
      var elemName;
      if ("" != dateText) {
        elemName = $(this).attr("name");
        $("input[name=sc_clone_" + elemName + "]").hide();
        $("input[name=" + elemName + "]").show();
      }
      do_ajax_form_fiche_pro_sante_infirme_edit_validate_date_evacuation(iSeqRow);
    },
    showWeek: true,
    numberOfMonths: 1,
    changeMonth: true,
    changeYear: true,
    yearRange: 'c-5:c+5',
    dayNames: ["<?php        echo html_entity_decode($this->Ini->Nm_lang['lang_days_sund'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_mond'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_tued'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_wend'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_thud'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_frid'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_satd'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>"],
    dayNamesMin: ["<?php     echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_sund'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_mond'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_tued'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_wend'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_thud'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_frid'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_satd'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>"],
    monthNames: ["<?php      echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_janu"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_febr"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_marc"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_apri"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_mayy"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_june"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_july"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_augu"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_sept"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_octo"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_nove"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_dece"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>"],
    monthNamesShort: ["<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_janu'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_febr'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_marc'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_apri'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_mayy'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_june'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_july'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_augu'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_sept'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_octo'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_nove'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_dece'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>"],
    weekHeader: "<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_days_sem'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>",
    firstDay: <?php echo $this->jqueryCalendarWeekInit("" . $_SESSION['scriptcase']['reg_conf']['date_week_ini'] . ""); ?>,
    dateFormat: "<?php echo $this->jqueryCalendarDtFormat("" . str_replace(array('/', 'aaaa', $_SESSION['scriptcase']['reg_conf']['date_sep']), array('', 'yyyy', ''), $this->field_config['date_evacuation']['date_format']) . "", "" . $_SESSION['scriptcase']['reg_conf']['date_sep'] . ""); ?>",
    showOtherMonths: true,
    showOn: "button",
<?php
$miniCalendarIcon   = $this->jqueryIconFile('calendar');
$miniCalendarFA     = $this->jqueryFAFile('calendar');
$miniCalendarButton = $this->jqueryButtonText('calendar');
if ('' != $miniCalendarIcon) {
?>
    buttonImage: "<?php echo $miniCalendarIcon; ?>",
    buttonImageOnly: true,
<?php
}
elseif ('' != $miniCalendarFA) {
?>
    buttonText: "",
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    buttonText: "",
<?php
}
?>
    currentText: "<?php  echo html_entity_decode($this->Ini->Nm_lang["lang_per_today"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);       ?>",
    closeText: "<?php  echo html_entity_decode($this->Ini->Nm_lang["lang_btns_mess_clse"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);       ?>",
  })
<?php
if ('' != $miniCalendarFA) {
?>
    .next('button').append("<?php echo $miniCalendarFA; ?>")
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    .next('button').append("<?php echo $miniCalendarButton[0]; ?>")
<?php
}
?>
  $("#id_sc_field_date_sortie" + iSeqRow).datepicker({
    beforeShow: function(input, inst) {
      var $oField = $(this),
          aParts  = $oField.val().split(" "),
          sTime   = "";
      sc_jq_calendar_value["#id_sc_field_date_sortie" + iSeqRow] = $oField.val();
    },
    onClose: function(dateText, inst) {
      var elemName;
      if ("" != dateText) {
        elemName = $(this).attr("name");
        $("input[name=sc_clone_" + elemName + "]").hide();
        $("input[name=" + elemName + "]").show();
      }
      do_ajax_form_fiche_pro_sante_infirme_edit_validate_date_sortie(iSeqRow);
    },
    showWeek: true,
    numberOfMonths: 1,
    changeMonth: true,
    changeYear: true,
    yearRange: 'c-5:c+5',
    dayNames: ["<?php        echo html_entity_decode($this->Ini->Nm_lang['lang_days_sund'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_mond'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_tued'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_wend'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_thud'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_frid'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_satd'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>"],
    dayNamesMin: ["<?php     echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_sund'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_mond'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_tued'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_wend'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_thud'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_frid'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_satd'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>"],
    monthNames: ["<?php      echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_janu"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_febr"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_marc"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_apri"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_mayy"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_june"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_july"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_augu"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_sept"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_octo"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_nove"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_dece"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>"],
    monthNamesShort: ["<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_janu'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_febr'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_marc'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_apri'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_mayy'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_june'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_july'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_augu'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_sept'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_octo'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_nove'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_dece'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>"],
    weekHeader: "<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_days_sem'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>",
    firstDay: <?php echo $this->jqueryCalendarWeekInit("" . $_SESSION['scriptcase']['reg_conf']['date_week_ini'] . ""); ?>,
    dateFormat: "<?php echo $this->jqueryCalendarDtFormat("" . str_replace(array('/', 'aaaa', $_SESSION['scriptcase']['reg_conf']['date_sep']), array('', 'yyyy', ''), $this->field_config['date_sortie']['date_format']) . "", "" . $_SESSION['scriptcase']['reg_conf']['date_sep'] . ""); ?>",
    showOtherMonths: true,
    showOn: "button",
<?php
$miniCalendarIcon   = $this->jqueryIconFile('calendar');
$miniCalendarFA     = $this->jqueryFAFile('calendar');
$miniCalendarButton = $this->jqueryButtonText('calendar');
if ('' != $miniCalendarIcon) {
?>
    buttonImage: "<?php echo $miniCalendarIcon; ?>",
    buttonImageOnly: true,
<?php
}
elseif ('' != $miniCalendarFA) {
?>
    buttonText: "",
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    buttonText: "",
<?php
}
?>
    currentText: "<?php  echo html_entity_decode($this->Ini->Nm_lang["lang_per_today"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);       ?>",
    closeText: "<?php  echo html_entity_decode($this->Ini->Nm_lang["lang_btns_mess_clse"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);       ?>",
  })
<?php
if ('' != $miniCalendarFA) {
?>
    .next('button').append("<?php echo $miniCalendarFA; ?>")
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    .next('button').append("<?php echo $miniCalendarButton[0]; ?>")
<?php
}
?>
  $("#id_sc_field_date_deces" + iSeqRow).datepicker({
    beforeShow: function(input, inst) {
      var $oField = $(this),
          aParts  = $oField.val().split(" "),
          sTime   = "";
      sc_jq_calendar_value["#id_sc_field_date_deces" + iSeqRow] = $oField.val();
    },
    onClose: function(dateText, inst) {
      var elemName;
      if ("" != dateText) {
        elemName = $(this).attr("name");
        $("input[name=sc_clone_" + elemName + "]").hide();
        $("input[name=" + elemName + "]").show();
      }
      do_ajax_form_fiche_pro_sante_infirme_edit_validate_date_deces(iSeqRow);
    },
    showWeek: true,
    numberOfMonths: 1,
    changeMonth: true,
    changeYear: true,
    yearRange: 'c-5:c+5',
    dayNames: ["<?php        echo html_entity_decode($this->Ini->Nm_lang['lang_days_sund'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_mond'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_tued'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_wend'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_thud'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_frid'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_satd'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>"],
    dayNamesMin: ["<?php     echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_sund'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_mond'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_tued'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_wend'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_thud'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_frid'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_satd'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>"],
    monthNames: ["<?php      echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_janu"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_febr"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_marc"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_apri"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_mayy"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_june"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_july"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_augu"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_sept"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_octo"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_nove"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_dece"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>"],
    monthNamesShort: ["<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_janu'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_febr'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_marc'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_apri'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_mayy'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_june'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_july'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_augu'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_sept'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_octo'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_nove'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_dece'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>"],
    weekHeader: "<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_days_sem'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>",
    firstDay: <?php echo $this->jqueryCalendarWeekInit("" . $_SESSION['scriptcase']['reg_conf']['date_week_ini'] . ""); ?>,
    dateFormat: "<?php echo $this->jqueryCalendarDtFormat("" . str_replace(array('/', 'aaaa', $_SESSION['scriptcase']['reg_conf']['date_sep']), array('', 'yyyy', ''), $this->field_config['date_deces']['date_format']) . "", "" . $_SESSION['scriptcase']['reg_conf']['date_sep'] . ""); ?>",
    showOtherMonths: true,
    showOn: "button",
<?php
$miniCalendarIcon   = $this->jqueryIconFile('calendar');
$miniCalendarFA     = $this->jqueryFAFile('calendar');
$miniCalendarButton = $this->jqueryButtonText('calendar');
if ('' != $miniCalendarIcon) {
?>
    buttonImage: "<?php echo $miniCalendarIcon; ?>",
    buttonImageOnly: true,
<?php
}
elseif ('' != $miniCalendarFA) {
?>
    buttonText: "",
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    buttonText: "",
<?php
}
?>
    currentText: "<?php  echo html_entity_decode($this->Ini->Nm_lang["lang_per_today"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);       ?>",
    closeText: "<?php  echo html_entity_decode($this->Ini->Nm_lang["lang_btns_mess_clse"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);       ?>",
  })
<?php
if ('' != $miniCalendarFA) {
?>
    .next('button').append("<?php echo $miniCalendarFA; ?>")
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    .next('button').append("<?php echo $miniCalendarButton[0]; ?>")
<?php
}
?>
  $("#id_sc_field_date_reception_prelevement" + iSeqRow).datepicker({
    beforeShow: function(input, inst) {
      var $oField = $(this),
          aParts  = $oField.val().split(" "),
          sTime   = "";
      sc_jq_calendar_value["#id_sc_field_date_reception_prelevement" + iSeqRow] = $oField.val();
    },
    onClose: function(dateText, inst) {
      var elemName;
      if ("" != dateText) {
        elemName = $(this).attr("name");
        $("input[name=sc_clone_" + elemName + "]").hide();
        $("input[name=" + elemName + "]").show();
      }
      do_ajax_form_fiche_pro_sante_infirme_edit_validate_date_reception_prelevement(iSeqRow);
    },
    showWeek: true,
    numberOfMonths: 1,
    changeMonth: true,
    changeYear: true,
    yearRange: 'c-5:c+5',
    dayNames: ["<?php        echo html_entity_decode($this->Ini->Nm_lang['lang_days_sund'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_mond'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_tued'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_wend'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_thud'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_frid'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_satd'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>"],
    dayNamesMin: ["<?php     echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_sund'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_mond'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_tued'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_wend'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_thud'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_frid'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_satd'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>"],
    monthNames: ["<?php      echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_janu"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_febr"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_marc"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_apri"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_mayy"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_june"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_july"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_augu"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_sept"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_octo"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_nove"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_dece"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>"],
    monthNamesShort: ["<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_janu'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_febr'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_marc'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_apri'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_mayy'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_june'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_july'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_augu'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_sept'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_octo'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_nove'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_dece'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>"],
    weekHeader: "<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_days_sem'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>",
    firstDay: <?php echo $this->jqueryCalendarWeekInit("" . $_SESSION['scriptcase']['reg_conf']['date_week_ini'] . ""); ?>,
    dateFormat: "<?php echo $this->jqueryCalendarDtFormat("" . str_replace(array('/', 'aaaa', $_SESSION['scriptcase']['reg_conf']['date_sep']), array('', 'yyyy', ''), $this->field_config['date_reception_prelevement']['date_format']) . "", "" . $_SESSION['scriptcase']['reg_conf']['date_sep'] . ""); ?>",
    showOtherMonths: true,
    showOn: "button",
<?php
$miniCalendarIcon   = $this->jqueryIconFile('calendar');
$miniCalendarFA     = $this->jqueryFAFile('calendar');
$miniCalendarButton = $this->jqueryButtonText('calendar');
if ('' != $miniCalendarIcon) {
?>
    buttonImage: "<?php echo $miniCalendarIcon; ?>",
    buttonImageOnly: true,
<?php
}
elseif ('' != $miniCalendarFA) {
?>
    buttonText: "",
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    buttonText: "",
<?php
}
?>
    currentText: "<?php  echo html_entity_decode($this->Ini->Nm_lang["lang_per_today"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);       ?>",
    closeText: "<?php  echo html_entity_decode($this->Ini->Nm_lang["lang_btns_mess_clse"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);       ?>",
  })
<?php
if ('' != $miniCalendarFA) {
?>
    .next('button').append("<?php echo $miniCalendarFA; ?>")
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    .next('button').append("<?php echo $miniCalendarButton[0]; ?>")
<?php
}
?>
  $("#id_sc_field_date_resultats_labo" + iSeqRow).datepicker({
    beforeShow: function(input, inst) {
      var $oField = $(this),
          aParts  = $oField.val().split(" "),
          sTime   = "";
      sc_jq_calendar_value["#id_sc_field_date_resultats_labo" + iSeqRow] = $oField.val();
    },
    onClose: function(dateText, inst) {
      var elemName;
      if ("" != dateText) {
        elemName = $(this).attr("name");
        $("input[name=sc_clone_" + elemName + "]").hide();
        $("input[name=" + elemName + "]").show();
      }
      do_ajax_form_fiche_pro_sante_infirme_edit_validate_date_resultats_labo(iSeqRow);
    },
    showWeek: true,
    numberOfMonths: 1,
    changeMonth: true,
    changeYear: true,
    yearRange: 'c-5:c+5',
    dayNames: ["<?php        echo html_entity_decode($this->Ini->Nm_lang['lang_days_sund'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_mond'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_tued'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_wend'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_thud'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_frid'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_satd'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>"],
    dayNamesMin: ["<?php     echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_sund'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_mond'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_tued'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_wend'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_thud'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_frid'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_satd'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>"],
    monthNames: ["<?php      echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_janu"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_febr"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_marc"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_apri"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_mayy"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_june"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_july"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_augu"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_sept"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_octo"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_nove"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_dece"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>"],
    monthNamesShort: ["<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_janu'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_febr'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_marc'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_apri'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_mayy'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_june'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_july'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_augu'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_sept'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_octo'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_nove'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_dece'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>"],
    weekHeader: "<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_days_sem'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>",
    firstDay: <?php echo $this->jqueryCalendarWeekInit("" . $_SESSION['scriptcase']['reg_conf']['date_week_ini'] . ""); ?>,
    dateFormat: "<?php echo $this->jqueryCalendarDtFormat("" . str_replace(array('/', 'aaaa', $_SESSION['scriptcase']['reg_conf']['date_sep']), array('', 'yyyy', ''), $this->field_config['date_resultats_labo']['date_format']) . "", "" . $_SESSION['scriptcase']['reg_conf']['date_sep'] . ""); ?>",
    showOtherMonths: true,
    showOn: "button",
<?php
$miniCalendarIcon   = $this->jqueryIconFile('calendar');
$miniCalendarFA     = $this->jqueryFAFile('calendar');
$miniCalendarButton = $this->jqueryButtonText('calendar');
if ('' != $miniCalendarIcon) {
?>
    buttonImage: "<?php echo $miniCalendarIcon; ?>",
    buttonImageOnly: true,
<?php
}
elseif ('' != $miniCalendarFA) {
?>
    buttonText: "",
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    buttonText: "",
<?php
}
?>
    currentText: "<?php  echo html_entity_decode($this->Ini->Nm_lang["lang_per_today"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);       ?>",
    closeText: "<?php  echo html_entity_decode($this->Ini->Nm_lang["lang_btns_mess_clse"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);       ?>",
  })
<?php
if ('' != $miniCalendarFA) {
?>
    .next('button').append("<?php echo $miniCalendarFA; ?>")
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    .next('button').append("<?php echo $miniCalendarButton[0]; ?>")
<?php
}
?>
  $("#id_sc_field_date_naissance_malade" + iSeqRow).datepicker({
    beforeShow: function(input, inst) {
      var $oField = $(this),
          aParts  = $oField.val().split(" "),
          sTime   = "";
      sc_jq_calendar_value["#id_sc_field_date_naissance_malade" + iSeqRow] = $oField.val();
    },
    onClose: function(dateText, inst) {
      do_ajax_form_fiche_pro_sante_infirme_edit_validate_date_naissance_malade(iSeqRow);
    },
    showWeek: true,
    numberOfMonths: 1,
    changeMonth: true,
    changeYear: true,
    yearRange: 'c-5:c+5',
    dayNames: ["<?php        echo html_entity_decode($this->Ini->Nm_lang['lang_days_sund'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_mond'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_tued'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_wend'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_thud'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_frid'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_satd'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>"],
    dayNamesMin: ["<?php     echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_sund'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_mond'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_tued'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_wend'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_thud'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_frid'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_satd'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>"],
    monthNames: ["<?php      echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_janu"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_febr"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_marc"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_apri"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_mayy"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_june"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_july"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_augu"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_sept"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_octo"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_nove"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_dece"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>"],
    monthNamesShort: ["<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_janu'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_febr'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_marc'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_apri'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_mayy'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_june'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_july'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_augu'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_sept'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_octo'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_nove'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_dece'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>"],
    weekHeader: "<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_days_sem'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>",
    firstDay: <?php echo $this->jqueryCalendarWeekInit("" . $_SESSION['scriptcase']['reg_conf']['date_week_ini'] . ""); ?>,
    dateFormat: "<?php echo $this->jqueryCalendarDtFormat("" . str_replace(array('/', 'aaaa', $_SESSION['scriptcase']['reg_conf']['date_sep']), array('', 'yyyy', ''), $this->field_config['date_naissance_malade']['date_format']) . "", "" . $_SESSION['scriptcase']['reg_conf']['date_sep'] . ""); ?>",
    showOtherMonths: true,
    showOn: "button",
<?php
$miniCalendarIcon   = $this->jqueryIconFile('calendar');
$miniCalendarFA     = $this->jqueryFAFile('calendar');
$miniCalendarButton = $this->jqueryButtonText('calendar');
if ('' != $miniCalendarIcon) {
?>
    buttonImage: "<?php echo $miniCalendarIcon; ?>",
    buttonImageOnly: true,
<?php
}
elseif ('' != $miniCalendarFA) {
?>
    buttonText: "",
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    buttonText: "",
<?php
}
?>
    currentText: "<?php  echo html_entity_decode($this->Ini->Nm_lang["lang_per_today"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);       ?>",
    closeText: "<?php  echo html_entity_decode($this->Ini->Nm_lang["lang_btns_mess_clse"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);       ?>",
  })
<?php
if ('' != $miniCalendarFA) {
?>
    .next('button').append("<?php echo $miniCalendarFA; ?>")
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    .next('button').append("<?php echo $miniCalendarButton[0]; ?>")
<?php
}
?>
  $("#id_sc_field_date_apparition_symptomes" + iSeqRow).datepicker({
    beforeShow: function(input, inst) {
      var $oField = $(this),
          aParts  = $oField.val().split(" "),
          sTime   = "";
      sc_jq_calendar_value["#id_sc_field_date_apparition_symptomes" + iSeqRow] = $oField.val();
    },
    onClose: function(dateText, inst) {
      do_ajax_form_fiche_pro_sante_infirme_edit_validate_date_apparition_symptomes(iSeqRow);
    },
    showWeek: true,
    numberOfMonths: 1,
    changeMonth: true,
    changeYear: true,
    yearRange: 'c-5:c+5',
    dayNames: ["<?php        echo html_entity_decode($this->Ini->Nm_lang['lang_days_sund'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_mond'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_tued'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_wend'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_thud'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_frid'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_satd'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>"],
    dayNamesMin: ["<?php     echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_sund'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_mond'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_tued'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_wend'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_thud'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_frid'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_satd'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>"],
    monthNames: ["<?php      echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_janu"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_febr"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_marc"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_apri"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_mayy"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_june"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_july"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_augu"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_sept"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_octo"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_nove"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_dece"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>"],
    monthNamesShort: ["<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_janu'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_febr'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_marc'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_apri'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_mayy'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_june'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_july'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_augu'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_sept'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_octo'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_nove'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_dece'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>"],
    weekHeader: "<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_days_sem'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>",
    firstDay: <?php echo $this->jqueryCalendarWeekInit("" . $_SESSION['scriptcase']['reg_conf']['date_week_ini'] . ""); ?>,
    dateFormat: "<?php echo $this->jqueryCalendarDtFormat("" . str_replace(array('/', 'aaaa', $_SESSION['scriptcase']['reg_conf']['date_sep']), array('', 'yyyy', ''), $this->field_config['date_apparition_symptomes']['date_format']) . "", "" . $_SESSION['scriptcase']['reg_conf']['date_sep'] . ""); ?>",
    showOtherMonths: true,
    showOn: "button",
<?php
$miniCalendarIcon   = $this->jqueryIconFile('calendar');
$miniCalendarFA     = $this->jqueryFAFile('calendar');
$miniCalendarButton = $this->jqueryButtonText('calendar');
if ('' != $miniCalendarIcon) {
?>
    buttonImage: "<?php echo $miniCalendarIcon; ?>",
    buttonImageOnly: true,
<?php
}
elseif ('' != $miniCalendarFA) {
?>
    buttonText: "",
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    buttonText: "",
<?php
}
?>
    currentText: "<?php  echo html_entity_decode($this->Ini->Nm_lang["lang_per_today"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);       ?>",
    closeText: "<?php  echo html_entity_decode($this->Ini->Nm_lang["lang_btns_mess_clse"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);       ?>",
  })
<?php
if ('' != $miniCalendarFA) {
?>
    .next('button').append("<?php echo $miniCalendarFA; ?>")
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    .next('button').append("<?php echo $miniCalendarButton[0]; ?>")
<?php
}
?>
  $("#id_sc_field_date_validation" + iSeqRow).datepicker({
    beforeShow: function(input, inst) {
      var $oField = $(this),
          aParts  = $oField.val().split(" "),
          sTime   = "";
      sc_jq_calendar_value["#id_sc_field_date_validation" + iSeqRow] = $oField.val();
      if (2 == aParts.length) {
        sTime = " " + aParts[1];
      }
      if ('' == sTime || ' ' == sTime) {
        sTime = ' <?php echo $this->jqueryCalendarTimeStart($this->field_config['date_validation']['date_format']); ?>';
      }
      $oField.datepicker("option", "dateFormat", "<?php echo $this->jqueryCalendarDtFormat("" . str_replace(array('/', 'aaaa', 'hh', 'ii', 'ss', ':', ';', $_SESSION['scriptcase']['reg_conf']['date_sep'], $_SESSION['scriptcase']['reg_conf']['time_sep']), array('', 'yyyy', '','','', '', '', '', ''), $this->field_config['date_validation']['date_format']) . "", "" . $_SESSION['scriptcase']['reg_conf']['date_sep'] . ""); ?>" + sTime)
<?php
if ('' != $miniCalendarFA) {
?>
    .next('button').append("<?php echo $miniCalendarFA; ?>")
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    .next('button').append("<?php echo $miniCalendarButton[0]; ?>")
<?php
}
?>
    },
    onClose: function(dateText, inst) {
      do_ajax_form_fiche_pro_sante_infirme_edit_validate_date_validation(iSeqRow);
    },
    showWeek: true,
    numberOfMonths: 1,
    changeMonth: true,
    changeYear: true,
    yearRange: 'c-5:c+5',
    dayNames: ["<?php        echo html_entity_decode($this->Ini->Nm_lang['lang_days_sund'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_mond'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_tued'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_wend'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_thud'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_frid'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_satd'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>"],
    dayNamesMin: ["<?php     echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_sund'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_mond'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_tued'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_wend'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_thud'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_frid'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_satd'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>"],
    monthNames: ["<?php      echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_janu"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_febr"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_marc"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_apri"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_mayy"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_june"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_july"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_augu"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_sept"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_octo"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_nove"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_dece"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>"],
    monthNamesShort: ["<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_janu'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_febr'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_marc'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_apri'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_mayy'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_june'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_july'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_augu'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_sept'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_octo'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_nove'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_dece'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>"],
    weekHeader: "<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_days_sem'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>",
    firstDay: <?php echo $this->jqueryCalendarWeekInit("" . $_SESSION['scriptcase']['reg_conf']['date_week_ini'] . ""); ?>,
    dateFormat: "<?php echo $this->jqueryCalendarDtFormat("" . str_replace(array('/', 'aaaa', 'hh', 'ii', 'ss', ':', ';', $_SESSION['scriptcase']['reg_conf']['date_sep'], $_SESSION['scriptcase']['reg_conf']['time_sep']), array('', 'yyyy', '','','', '', '', '', ''), $this->field_config['date_validation']['date_format']) . "", "" . $_SESSION['scriptcase']['reg_conf']['date_sep'] . ""); ?>",
    showOtherMonths: true,
    showOn: "button",
<?php
$miniCalendarIcon   = $this->jqueryIconFile('calendar');
$miniCalendarFA     = $this->jqueryFAFile('calendar');
$miniCalendarButton = $this->jqueryButtonText('calendar');
if ('' != $miniCalendarIcon) {
?>
    buttonImage: "<?php echo $miniCalendarIcon; ?>",
    buttonImageOnly: true,
<?php
}
elseif ('' != $miniCalendarFA) {
?>
    buttonText: "",
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    buttonText: "",
<?php
}
?>
    currentText: "<?php  echo html_entity_decode($this->Ini->Nm_lang["lang_per_today"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);       ?>",
    closeText: "<?php  echo html_entity_decode($this->Ini->Nm_lang["lang_btns_mess_clse"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);       ?>",
  })
<?php
if ('' != $miniCalendarFA) {
?>
    .next('button').append("<?php echo $miniCalendarFA; ?>")
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    .next('button').append("<?php echo $miniCalendarButton[0]; ?>")
<?php
}
?>
  $("#id_sc_field_date_confirmation_labo" + iSeqRow).datepicker({
    beforeShow: function(input, inst) {
      var $oField = $(this),
          aParts  = $oField.val().split(" "),
          sTime   = "";
      sc_jq_calendar_value["#id_sc_field_date_confirmation_labo" + iSeqRow] = $oField.val();
      if (2 == aParts.length) {
        sTime = " " + aParts[1];
      }
      if ('' == sTime || ' ' == sTime) {
        sTime = ' <?php echo $this->jqueryCalendarTimeStart($this->field_config['date_confirmation_labo']['date_format']); ?>';
      }
      $oField.datepicker("option", "dateFormat", "<?php echo $this->jqueryCalendarDtFormat("" . str_replace(array('/', 'aaaa', 'hh', 'ii', 'ss', ':', ';', $_SESSION['scriptcase']['reg_conf']['date_sep'], $_SESSION['scriptcase']['reg_conf']['time_sep']), array('', 'yyyy', '','','', '', '', '', ''), $this->field_config['date_confirmation_labo']['date_format']) . "", "" . $_SESSION['scriptcase']['reg_conf']['date_sep'] . ""); ?>" + sTime)
<?php
if ('' != $miniCalendarFA) {
?>
    .next('button').append("<?php echo $miniCalendarFA; ?>")
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    .next('button').append("<?php echo $miniCalendarButton[0]; ?>")
<?php
}
?>
    },
    onClose: function(dateText, inst) {
      do_ajax_form_fiche_pro_sante_infirme_edit_validate_date_confirmation_labo(iSeqRow);
    },
    showWeek: true,
    numberOfMonths: 1,
    changeMonth: true,
    changeYear: true,
    yearRange: 'c-5:c+5',
    dayNames: ["<?php        echo html_entity_decode($this->Ini->Nm_lang['lang_days_sund'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_mond'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_tued'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_wend'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_thud'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_frid'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_satd'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>"],
    dayNamesMin: ["<?php     echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_sund'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_mond'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_tued'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_wend'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_thud'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_frid'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_satd'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>"],
    monthNames: ["<?php      echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_janu"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_febr"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_marc"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_apri"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_mayy"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_june"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_july"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_augu"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_sept"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_octo"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_nove"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_dece"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>"],
    monthNamesShort: ["<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_janu'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_febr'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_marc'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_apri'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_mayy'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_june'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_july'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_augu'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_sept'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_octo'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_nove'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_dece'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>"],
    weekHeader: "<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_days_sem'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>",
    firstDay: <?php echo $this->jqueryCalendarWeekInit("" . $_SESSION['scriptcase']['reg_conf']['date_week_ini'] . ""); ?>,
    dateFormat: "<?php echo $this->jqueryCalendarDtFormat("" . str_replace(array('/', 'aaaa', 'hh', 'ii', 'ss', ':', ';', $_SESSION['scriptcase']['reg_conf']['date_sep'], $_SESSION['scriptcase']['reg_conf']['time_sep']), array('', 'yyyy', '','','', '', '', '', ''), $this->field_config['date_confirmation_labo']['date_format']) . "", "" . $_SESSION['scriptcase']['reg_conf']['date_sep'] . ""); ?>",
    showOtherMonths: true,
    showOn: "button",
<?php
$miniCalendarIcon   = $this->jqueryIconFile('calendar');
$miniCalendarFA     = $this->jqueryFAFile('calendar');
$miniCalendarButton = $this->jqueryButtonText('calendar');
if ('' != $miniCalendarIcon) {
?>
    buttonImage: "<?php echo $miniCalendarIcon; ?>",
    buttonImageOnly: true,
<?php
}
elseif ('' != $miniCalendarFA) {
?>
    buttonText: "",
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    buttonText: "",
<?php
}
?>
    currentText: "<?php  echo html_entity_decode($this->Ini->Nm_lang["lang_per_today"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);       ?>",
    closeText: "<?php  echo html_entity_decode($this->Ini->Nm_lang["lang_btns_mess_clse"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);       ?>",
  })
<?php
if ('' != $miniCalendarFA) {
?>
    .next('button').append("<?php echo $miniCalendarFA; ?>")
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    .next('button').append("<?php echo $miniCalendarButton[0]; ?>")
<?php
}
?>
  $("#id_sc_field_date_prelevements" + iSeqRow).datepicker({
    beforeShow: function(input, inst) {
      var $oField = $(this),
          aParts  = $oField.val().split(" "),
          sTime   = "";
      sc_jq_calendar_value["#id_sc_field_date_prelevements" + iSeqRow] = $oField.val();
    },
    onClose: function(dateText, inst) {
      do_ajax_form_fiche_pro_sante_infirme_edit_validate_date_prelevements(iSeqRow);
    },
    showWeek: true,
    numberOfMonths: 1,
    changeMonth: true,
    changeYear: true,
    yearRange: 'c-5:c+5',
    dayNames: ["<?php        echo html_entity_decode($this->Ini->Nm_lang['lang_days_sund'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_mond'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_tued'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_wend'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_thud'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_frid'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_satd'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);        ?>"],
    dayNamesMin: ["<?php     echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_sund'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_mond'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_tued'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_wend'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_thud'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_frid'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_satd'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>"],
    monthNames: ["<?php      echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_janu"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_febr"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_marc"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_apri"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_mayy"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_june"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_july"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_augu"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_sept"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_octo"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_nove"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>","<?php echo html_entity_decode($this->Ini->Nm_lang["lang_mnth_dece"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);      ?>"],
    monthNamesShort: ["<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_janu'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_febr'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_marc'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_apri'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_mayy'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_june'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_july'], ENT_COMPAT, $_SESSION['scriptcase']['charset']);   ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_augu'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_sept'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_octo'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_nove'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>","<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_dece'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>"],
    weekHeader: "<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_days_sem'], ENT_COMPAT, $_SESSION['scriptcase']['charset']); ?>",
    firstDay: <?php echo $this->jqueryCalendarWeekInit("" . $_SESSION['scriptcase']['reg_conf']['date_week_ini'] . ""); ?>,
    dateFormat: "<?php echo $this->jqueryCalendarDtFormat("" . str_replace(array('/', 'aaaa', $_SESSION['scriptcase']['reg_conf']['date_sep']), array('', 'yyyy', ''), $this->field_config['date_prelevements']['date_format']) . "", "" . $_SESSION['scriptcase']['reg_conf']['date_sep'] . ""); ?>",
    showOtherMonths: true,
    showOn: "button",
<?php
$miniCalendarIcon   = $this->jqueryIconFile('calendar');
$miniCalendarFA     = $this->jqueryFAFile('calendar');
$miniCalendarButton = $this->jqueryButtonText('calendar');
if ('' != $miniCalendarIcon) {
?>
    buttonImage: "<?php echo $miniCalendarIcon; ?>",
    buttonImageOnly: true,
<?php
}
elseif ('' != $miniCalendarFA) {
?>
    buttonText: "",
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    buttonText: "",
<?php
}
?>
    currentText: "<?php  echo html_entity_decode($this->Ini->Nm_lang["lang_per_today"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);       ?>",
    closeText: "<?php  echo html_entity_decode($this->Ini->Nm_lang["lang_btns_mess_clse"], ENT_COMPAT, $_SESSION["scriptcase"]["charset"]);       ?>",
  })
<?php
if ('' != $miniCalendarFA) {
?>
    .next('button').append("<?php echo $miniCalendarFA; ?>")
<?php
}
elseif ('' != $miniCalendarButton[0]) {
?>
    .next('button').append("<?php echo $miniCalendarButton[0]; ?>")
<?php
}
?>
} // scJQCalendarAdd

function scJQSpinAdd(iSeqRow) {
  $("#id_sc_field_age_malade" + iSeqRow).spinner({
    max: 120,
    min: 0,
    step: 1,
    page: 5,
    change: function(event, ui) {
      $(this).trigger("change");
    },
    stop: function(event, ui) {
      $(this).trigger("change");
    }
  });
} // scJQSpinAdd

function scJQUploadAdd(iSeqRow) {
  $("#id_sc_field_attached_file" + iSeqRow).fileupload({
    datatype: "json",
    url: "form_fiche_pro_sante_infirme_edit_ul_save.php",
    dropZone: $("#hidden_field_data_attached_file" + iSeqRow),
    formData: function() {
      return [
        {name: 'param_field', value: 'attached_file'},
        {name: 'param_seq', value: '<?php echo $this->Ini->sc_page; ?>'},
        {name: 'upload_file_row', value: iSeqRow}
      ];
    },
    progress: function(e, data) {
      var loader, progress;
      if (data.lengthComputable && window.FormData !== undefined) {
        loader = $("#id_img_loader_attached_file" + iSeqRow);
        loaderContent = $("#id_img_loader_attached_file" + iSeqRow + " .scProgressBarLoading");
        loaderContent.html("&nbsp;");
        progress = parseInt(data.loaded / data.total * 100, 10);
        loader.show().find("div").css("width", progress + "%");
      }
      else {
        loader = $("#id_ajax_loader_attached_file" + iSeqRow);
        loader.show();
      }
    },
    change: function(e, data) {
      var checkUploadSize = scCheckUploadExtensionSize_attached_file(data);
      if ('ok' != checkUploadSize) {
        e.preventDefault();
        scJs_alert(scFormatExtensionSizeErrorMsg(checkUploadSize), function() {}, {'type': 'error'});
      }
    },
    drop: function(e, data) {
      var checkUploadSize = scCheckUploadExtensionSize_attached_file(data);
      if ('ok' != checkUploadSize) {
        scJs_alert(scFormatExtensionSizeErrorMsg(checkUploadSize), function() {}, {'type': 'error'});
      }
    },
    done: function(e, data) {
      var fileData, respData, respPos, respMsg, thumbDisplay, checkDisplay, var_ajax_img_thumb, oTemp;
      fileData = null;
      respMsg = "";
      if (data && data.result && data.result[0] && data.result[0].body) {
        respData = data.result[0].body.innerText;
        respPos = respData.indexOf("[{");
        if (-1 !== respPos) {
          respMsg = respData.substr(0, respPos);
          respData = respData.substr(respPos);
          fileData = $.parseJSON(respData);
        }
        else {
          respMsg = respData;
        }
      }
      else {
        respData = data.result;
        respPos = respData.indexOf("[{");
        if (-1 !== respPos) {
          respMsg = respData.substr(0, respPos);
          respData = respData.substr(respPos);
          fileData = eval(respData);
        }
        else {
          respMsg = respData;
        }
      }
      if (window.FormData !== undefined)
      {
        $("#id_img_loader_attached_file" + iSeqRow).hide();
      }
      else
      {
        $("#id_ajax_loader_attached_file" + iSeqRow).hide();
      }
      if (null == fileData) {
        if ("" != respMsg) {
          oTemp = {"htmOutput" : "<?php echo $this->Ini->Nm_lang['lang_errm_upld_admn']; ?>"};
          scAjaxShowDebug(oTemp);
        }
        return;
      }
      if (fileData[0].error && "" != fileData[0].error) {
        var uploadErrorMessage = "";
        oResp = {};
        if ("acceptFileTypes" == fileData[0].error) {
          uploadErrorMessage = "<?php echo $this->form_encode_input($this->Ini->Nm_lang['lang_errm_file_invl']) ?>";
        }
        else if ("maxFileSize" == fileData[0].error) {
          uploadErrorMessage = "<?php echo $this->form_encode_input($this->Ini->Nm_lang['lang_errm_file_size']) ?>";
        }
        else if ("minFileSize" == fileData[0].error) {
          uploadErrorMessage = "<?php echo $this->form_encode_input($this->Ini->Nm_lang['lang_errm_file_size']) ?>";
        }
        else if ("emptyFile" == fileData[0].error) {
          uploadErrorMessage = "<?php echo $this->form_encode_input($this->Ini->Nm_lang['lang_errm_file_empty']) ?>";
        }
        scAjaxShowErrorDisplay("table", uploadErrorMessage);
        return;
      }
      $("#id_sc_field_attached_file" + iSeqRow).val("");
      $("#id_sc_field_attached_file_ul_name" + iSeqRow).val(fileData[0].sc_ul_name);
      $("#id_sc_field_attached_file_ul_type" + iSeqRow).val(fileData[0].type);
      var_ajax_img_attached_file = '<?php echo $this->Ini->path_imag_temp; ?>/' + fileData[0].sc_image_source;
      var_ajax_img_thumb = '<?php echo $this->Ini->path_imag_temp; ?>/' + fileData[0].sc_thumb_prot;
      thumbDisplay = ("" == var_ajax_img_attached_file) ? "none" : "";
      $("#id_ajax_img_attached_file" + iSeqRow).attr("src", var_ajax_img_thumb);
      $("#id_ajax_img_attached_file" + iSeqRow).css("display", thumbDisplay);
      if (document.F1.temp_out1_attached_file) {
        document.F1.temp_out_attached_file.value = var_ajax_img_thumb;
        document.F1.temp_out1_attached_file.value = var_ajax_img_attached_file;
      }
      else if (document.F1.temp_out_attached_file) {
        document.F1.temp_out_attached_file.value = var_ajax_img_attached_file;
      }
      checkDisplay = ("" == fileData[0].sc_random_prot.substr(12)) ? "none" : "";
      $("#chk_ajax_img_attached_file" + iSeqRow).css("display", checkDisplay);
      $("#txt_ajax_img_attached_file" + iSeqRow).html(fileData[0].name);
      $("#txt_ajax_img_attached_file" + iSeqRow).css("display", checkDisplay);
      $("#id_ajax_link_attached_file" + iSeqRow).html(fileData[0].sc_random_prot.substr(12));
    }
  });

} // scJQUploadAdd

var api_cache_requests = [];
function ajax_check_file(img_name, field  ,t, p, p_cache, iSeqRow, hasRun, img_before){
    setTimeout(function(){
        if(img_name == '') return;
        iSeqRow= iSeqRow !== undefined && iSeqRow !== null ? iSeqRow : '';
        var hasVar = p.indexOf('_@NM@_') > -1 || p_cache.indexOf('_@NM@_') > -1 ? true : false;

        p = p.split('_@NM@_');
        $.each(p, function(i,v){
            try{
                p[i] = $('[name='+v+iSeqRow+']').val();
            }
            catch(err){
                p[i] = v;
            }
        });
        p = p.join('');

        p_cache = p_cache.split('_@NM@_');
        $.each(p_cache, function(i,v){
            try{
                p_cache[i] = $('[name='+v+iSeqRow+']').val();
            }
            catch(err){
                p_cache[i] = v;
            }
        });
        p_cache = p_cache.join('');

        img_before = img_before !== undefined ? img_before : $(t).attr('src');
        var str_key_cache = '<?php echo $this->Ini->sc_page; ?>' + img_name+field+p+p_cache;
        if(api_cache_requests[ str_key_cache ] !== undefined && api_cache_requests[ str_key_cache ] !== null){
            if(api_cache_requests[ str_key_cache ] != false){
                do_ajax_check_file(api_cache_requests[ str_key_cache ], field  ,t, iSeqRow);
            }
            return;
        }
        //scAjaxProcOn();
        $(t).attr('src', '<?php echo $this->Ini->path_icones ?>/scriptcase__NM__ajax_load.gif');
        api_cache_requests[ str_key_cache ] = false;
        var rs =$.ajax({
                    type: "POST",
                    url: 'index.php?script_case_init=<?php echo $this->Ini->sc_page; ?>',
                    async: true,
                    data:'nmgp_opcao=ajax_check_file&AjaxCheckImg=' + encodeURI(img_name) +'&rsargs='+ field + '&p=' + p + '&p_cache=' + p_cache,
                    success: function (rs) {
                        if(rs.indexOf('</span>') != -1){
                            rs = rs.substr(rs.indexOf('</span>') + 7);
                        }
                        if(rs.indexOf('/') != -1 && rs.indexOf('/') != 0){
                            rs = rs.substr(rs.indexOf('/'));
                        }
                        rs = sc_trim(rs);

                        // if(rs == 0 && hasVar && hasRun === undefined){
                        //     delete window.api_cache_requests[ str_key_cache ];
                        //     ajax_check_file(img_name, field  ,t, p, p_cache, iSeqRow, 1, img_before);
                        //     return;
                        // }
                        window.api_cache_requests[ str_key_cache ] = rs;
                        do_ajax_check_file(rs, field  ,t, iSeqRow)
                        if(rs == 0){
                            delete window.api_cache_requests[ str_key_cache ];

                           // $(t).attr('src',img_before);
                            do_ajax_check_file(img_before+'_@@NM@@_' + img_before, field  ,t, iSeqRow)

                        }


                    }
        });
    },100);
}

function do_ajax_check_file(rs, field  ,t, iSeqRow){
    if (rs != 0) {
        rs_split = rs.split('_@@NM@@_');
        rs_orig = rs_split[0];
        rs2 = rs_split[1];
        try{
            if(!$(t).is('img')){

                if($('#id_read_on_'+field+iSeqRow).length > 0 ){
                                    var usa_read_only = false;

                switch(field){

                }
                     if(usa_read_only && $('a',$('#id_read_on_'+field+iSeqRow)).length == 0){
                         $(t).html("<a href=\"javascript:nm_mostra_doc('0', '"+rs2+"', 'form_fiche_pro_sante_infirme_edit')\">"+$('#id_read_on_'+field+iSeqRow).text()+"</a>");
                     }
                }
                if($('#id_ajax_doc_'+field+iSeqRow+' a').length > 0){
                    var target = $('#id_ajax_doc_'+field+iSeqRow+' a').attr('href').split(',');
                    target[1] = "'"+rs2+"'";
                    $('#id_ajax_doc_'+field+iSeqRow+' a').attr('href', target.join(','));
                }else{
                    var target = $(t).attr('href').split(',');
                     target[1] = "'"+rs2+"'";
                     $(t).attr('href', target.join(','));
                }
            }else{
                $(t).attr('src', rs2);
                $(t).css('display', '');
                if($('#id_ajax_doc_'+field+iSeqRow+' a').length > 0){
                    var target = $('#id_ajax_doc_'+field+iSeqRow+' a').attr('href').split(',');
                    target[1] = "'"+rs2+"'";
                    $(t).attr('href', target.join(','));
                }else{
                     var t_link = $(t).parent('a');
                     var target = $(t_link).attr('href').split(',');
                     target[0] = "javascript:nm_mostra_img('"+rs_orig+"'";
                     $(t_link).attr('href', target.join(','));
                }

            }
            eval("window.var_ajax_img_"+field+iSeqRow+" = '"+rs_orig+"';");

        } catch(err){
                        eval("window.var_ajax_img_"+field+iSeqRow+" = '"+rs_orig+"';");

        }
    }
   /* hasFalseCacheRequest = false;
    $.each(api_cache_requests, function(i,v){
        if(v == false){
            hasFalseCacheRequest = true;
        }
    });
    if(hasFalseCacheRequest == false){
        scAjaxProcOff();
    }*/
}

$(document).ready(function(){
});

function scJQPasswordToggleAdd(seqRow) {
  $(".sc-ui-pwd-toggle-icon" + seqRow).on("click", function() {
    var fieldName = $(this).attr("id").substr(17), fieldObj = $("#id_sc_field_" + fieldName), fieldFA = $("#id_pwd_fa_" + fieldName);
    if ("text" == fieldObj.attr("type")) {
      fieldObj.attr("type", "password");
      fieldFA.attr("class", "fa fa-eye sc-ui-pwd-eye");
    } else {
      fieldObj.attr("type", "text");
      fieldFA.attr("class", "fa fa-eye-slash sc-ui-pwd-eye");
    }
  });
} // scJQPasswordToggleAdd

function scJQSelect2Add(seqRow, specificField) {
  if (null == specificField || "wilaya" == specificField) {
    scJQSelect2Add_wilaya(seqRow);
  }
  if (null == specificField || "commune" == specificField) {
    scJQSelect2Add_commune(seqRow);
  }
  if (null == specificField || "pays_origine" == specificField) {
    scJQSelect2Add_pays_origine(seqRow);
  }
  if (null == specificField || "symptomes" == specificField) {
    scJQSelect2Add_symptomes(seqRow);
  }
  if (null == specificField || "structure_evacuation" == specificField) {
    scJQSelect2Add_structure_evacuation(seqRow);
  }
  if (null == specificField || "labo_destination" == specificField) {
    scJQSelect2Add_labo_destination(seqRow);
  }
  if (null == specificField || "type_prelevement_nm_fk" == specificField) {
    scJQSelect2Add_type_prelevement_nm_fk(seqRow);
  }
} // scJQSelect2Add

function scJQSelect2Add_wilaya(seqRow) {
  var elemSelector = "all" == seqRow ? ".css_wilaya_obj" : "#id_sc_field_wilaya" + seqRow;
  $(elemSelector).select2(
    {
      containerCssClass: 'css_wilaya_obj',
      dropdownCssClass: 'css_wilaya_obj',
      language: {
        noResults: function() {
          return "<?php echo $this->Ini->Nm_lang['lang_autocomp_notfound'] ?>";
        },
        searching: function() {
          return "<?php echo $this->Ini->Nm_lang['lang_autocomp_searching'] ?>";
        }
      }
    }
  );
} // scJQSelect2Add

function scJQSelect2Add_commune(seqRow) {
  var elemSelector = "all" == seqRow ? ".css_commune_obj" : "#id_sc_field_commune" + seqRow;
  $(elemSelector).select2(
    {
      containerCssClass: 'css_commune_obj',
      dropdownCssClass: 'css_commune_obj',
      language: {
        noResults: function() {
          return "<?php echo $this->Ini->Nm_lang['lang_autocomp_notfound'] ?>";
        },
        searching: function() {
          return "<?php echo $this->Ini->Nm_lang['lang_autocomp_searching'] ?>";
        }
      }
    }
  );
} // scJQSelect2Add

function scJQSelect2Add_pays_origine(seqRow) {
  var elemSelector = "all" == seqRow ? ".css_pays_origine_obj" : "#id_sc_field_pays_origine" + seqRow;
  $(elemSelector).select2(
    {
      containerCssClass: 'css_pays_origine_obj',
      dropdownCssClass: 'css_pays_origine_obj',
      language: {
        noResults: function() {
          return "<?php echo $this->Ini->Nm_lang['lang_autocomp_notfound'] ?>";
        },
        searching: function() {
          return "<?php echo $this->Ini->Nm_lang['lang_autocomp_searching'] ?>";
        }
      }
    }
  );
} // scJQSelect2Add

function scJQSelect2Add_symptomes(seqRow) {
  var elemSelector = "all" == seqRow ? ".css_symptomes_obj" : "#id_sc_field_symptomes" + seqRow;
  $(elemSelector).select2(
    {
      containerCssClass: 'css_symptomes_obj',
      dropdownCssClass: 'css_symptomes_obj',
      language: {
        noResults: function() {
          return "<?php echo $this->Ini->Nm_lang['lang_autocomp_notfound'] ?>";
        },
        searching: function() {
          return "<?php echo $this->Ini->Nm_lang['lang_autocomp_searching'] ?>";
        }
      }
    }
  );
} // scJQSelect2Add

function scJQSelect2Add_structure_evacuation(seqRow) {
  var elemSelector = "all" == seqRow ? ".css_structure_evacuation_obj" : "#id_sc_field_structure_evacuation" + seqRow;
  $(elemSelector).select2(
    {
      containerCssClass: 'css_structure_evacuation_obj',
      dropdownCssClass: 'css_structure_evacuation_obj',
      language: {
        noResults: function() {
          return "<?php echo $this->Ini->Nm_lang['lang_autocomp_notfound'] ?>";
        },
        searching: function() {
          return "<?php echo $this->Ini->Nm_lang['lang_autocomp_searching'] ?>";
        }
      }
    }
  );
} // scJQSelect2Add

function scJQSelect2Add_labo_destination(seqRow) {
  var elemSelector = "all" == seqRow ? ".css_labo_destination_obj" : "#id_sc_field_labo_destination" + seqRow;
  $(elemSelector).select2(
    {
      containerCssClass: 'css_labo_destination_obj',
      dropdownCssClass: 'css_labo_destination_obj',
      language: {
        noResults: function() {
          return "<?php echo $this->Ini->Nm_lang['lang_autocomp_notfound'] ?>";
        },
        searching: function() {
          return "<?php echo $this->Ini->Nm_lang['lang_autocomp_searching'] ?>";
        }
      }
    }
  );
} // scJQSelect2Add

function scJQSelect2Add_type_prelevement_nm_fk(seqRow) {
  var elemSelector = "all" == seqRow ? ".css_type_prelevement_nm_fk_obj" : "#id_sc_field_type_prelevement_nm_fk" + seqRow;
  $(elemSelector).select2(
    {
      minimumResultsForSearch: Infinity,
      containerCssClass: 'css_type_prelevement_nm_fk_obj',
      dropdownCssClass: 'css_type_prelevement_nm_fk_obj',
      language: {
        noResults: function() {
          return "<?php echo $this->Ini->Nm_lang['lang_autocomp_notfound'] ?>";
        },
        searching: function() {
          return "<?php echo $this->Ini->Nm_lang['lang_autocomp_searching'] ?>";
        }
      }
    }
  );
} // scJQSelect2Add


function scJQElementsAdd(iLine) {
  scJQEventsAdd(iLine);
  scEventControl_init(iLine);
  scJQCalendarAdd(iLine);
  scJQSpinAdd(iLine);
  scJQUploadAdd(iLine);
  scJQPasswordToggleAdd(iLine);
  scJQSelect2Add(iLine);
  setTimeout(function () { if ('function' == typeof displayChange_field_wilaya) { displayChange_field_wilaya(iLine, "on"); } }, 150);
  setTimeout(function () { if ('function' == typeof displayChange_field_commune) { displayChange_field_commune(iLine, "on"); } }, 150);
  setTimeout(function () { if ('function' == typeof displayChange_field_pays_origine) { displayChange_field_pays_origine(iLine, "on"); } }, 150);
  setTimeout(function () { if ('function' == typeof displayChange_field_symptomes) { displayChange_field_symptomes(iLine, "on"); } }, 150);
  setTimeout(function () { if ('function' == typeof displayChange_field_structure_evacuation) { displayChange_field_structure_evacuation(iLine, "on"); } }, 150);
  setTimeout(function () { if ('function' == typeof displayChange_field_labo_destination) { displayChange_field_labo_destination(iLine, "on"); } }, 150);
  setTimeout(function () { if ('function' == typeof displayChange_field_type_prelevement_nm_fk) { displayChange_field_type_prelevement_nm_fk(iLine, "on"); } }, 150);
} // scJQElementsAdd

function scGetFileExtension(fileName)
{
    fileNameParts = fileName.split(".");

    if (1 === fileNameParts.length || (2 === fileNameParts.length && "" == fileNameParts[0])) {
        return "";
    }

    return fileNameParts.pop().toLowerCase();
}

function scFormatExtensionSizeErrorMsg(errorMsg)
{
    var msgInfo = errorMsg.split("||"), returnMsg = "";

    if ("err_size" == msgInfo[0]) {
        returnMsg = "<?php echo $this->Ini->Nm_lang['lang_errm_file_size'] ?>. <?php echo $this->Ini->Nm_lang['lang_errm_file_size_extension'] ?>".replace("{SC_EXTENSION}", msgInfo[1]).replace("{SC_LIMIT}", msgInfo[2]);
    } else if ("err_extension" == msgInfo[0]) {
        returnMsg = "<?php echo $this->Ini->Nm_lang['lang_errm_file_invl'] ?>";
    }

    return returnMsg;
}

function scCheckUploadExtensionSize_attached_file(thisField)
{
    if ("files" in thisField && thisField.files.length > 0) {
        thisFileExtension = scGetFileExtension(thisField.files[0].name);

        if ("png" == thisFileExtension && 1048576 < thisField.files[0].size) {
            return 'err_size||PNG||1 MB';
        }
        if ("jpg" == thisFileExtension && 1048576 < thisField.files[0].size) {
            return 'err_size||JPG||1 MB';
        }
        if ("jpeg" == thisFileExtension && 1048576 < thisField.files[0].size) {
            return 'err_size||JPEG||1 MB';
        }

        if (!["png", "jpg", "jpeg"].includes(thisFileExtension)) {
            return 'err_extension||' + thisFileExtension.toUpperCase();
        }
    }

    return 'ok';
}

