+ $('#jobtermText').val(full_name);
+ $('#mentoring_terms').closest('tr').hide();
+ updateJobTerm(jtid, $('#country_chg select').val());
+}
+
+/** Changes job term and proposes the different countries linked */
+function updateJobTerm(jtid, country)
+{
+ $('#jobterm').val(jtid);
+ $('#country_chg').closest('tr').show();
+ $('#keywords').show();
+ $('#country_chg').load(platal_baseurl + 'search/referent/countries/' + jtid, function(response, status, xhr) {
+ if (country) {
+ if (status != "error") {
+ $('#country_chg select').val(country);
+ }
+ }
+ });
+}
+
+/** Function called when validating form */
+function validateSearchForm(f)
+{
+ if (!f.jobterm.value) {
+ alert('Il faut choisir un mot clef avant de lancer la recherche.');
+ $('#jobtermText').val('').focus();
+ return false;
+ }
+ return true;