//Verifie si numerique positif

function checknumber(champ,nom_form)
{
	//alert(document.forms[nom_form].elements[8].value)
	var x=document.forms[''+nom_form+''].elements[0].value;
	
	
	var anum=/(^\d+$)|(^\d+.\d+$)/
	if (anum.test(x)){
		testresult=true;
	}else{
		alert("Entrez un nombre valide \n---\nEnter a valid number")
		testresult=false;
	}
	return (testresult);
}
function Verif_num_pos(champ,nom_form)
{
	if (document.layers||document.all||document.getElementById){
		return checknumber(champ,nom_form)
	}else{
		return true;
	}
}

function Verif_num_pos2(champ,champ2,nom_form)
{
	var ret;
	if (document.layers||document.all||document.getElementById){
		ret =  checknumber(champ,nom_form);
		ret =  checknumber(champ2,nom_form);
		
		return ret;
	}else{
		return true;
	}
}

function verifFormOffre()
{
	var ecart=document.form_offre.ecart;
	
	if(ecart==null){
		return true;
	}else{
		if(Verif_num_pos('ecart','form_offre')==false){
			return false;
		}else{
			return true;
		}
	}
	
}

function trim(a){
	var tmp=new Array();
	for(j=0;j<a.length;j++)
		if(a[j]!='')
			tmp[tmp.length]=a[j];
	a.length=tmp.length;
	for(j=0;j<tmp.length;j++)
		a[j]=tmp[j];
	return a;
}

function affiche_offre(id_offre)
{
	//window.open('modules/offre/afficheDetailOffre.php?langue='+langue+'&idOffre='+id,'popup'+id,'height=400,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=no,scrollbars=yes')
	//window.location.href="index.php?"+url_offre+"module=offre&action=detail_offre&langue="+langue+"&idOffre="+id;
	window.document.frm_detail.idOffre.value=id_offre;
	window.document.frm_detail.submit();
}

function affiche_report_offre(id_offre)
{
	var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_offre.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}
		window.open(jurl+'modules/entreprise/affiche_report_offre.php?idOffre='+id_offre+'&div=1','popup','height=400,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=no,scrollbars=yes')
	/*
	}else{
	window.document.frm_fiche_offre.id_offre.value=id_offre;
	window.document.frm_fiche_offre.submit();
	}	
	*/	

}

function affiche_commission_suivi(id_client)
{
	window.document.frm_comm_suivi.id_client.value=id_client;
	window.document.frm_comm_suivi.submit();
}

function affiche_fiche_individuel(id_client)
{
	window.document.frm_fiche_individuel.id_client.value=id_client;
	window.document.frm_fiche_individuel.submit();
}

function load_candidature_candidat(id_cv,langue,unique_id)
{
	//pollC(unique_id, 'load');
	window.location.href="modules/candidat/candidature_candidat.php?id_cv="+id_cv+"langue="+langue;
}

function affiche_local(id_offre, cp_offre, km_offre)
{
	window.document.frm_local.id_offre.value=id_offre;
	window.document.frm_local.cp_offre.value=cp_offre;
	window.document.frm_local.localisation_km_offre.value=km_offre;
	window.document.frm_local.submit();
}


function affiche_offre2(id_offre,p)
{
	//window.open('modules/offre/afficheDetailOffre.php?langue='+langue+'&idOffre='+id,'popup'+id,'height=400,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=no,scrollbars=yes')
	//window.location.href="index.php?"+url_offre+"module=offre&action=detail_offre&langue="+langue+"&idOffre="+id;
	window.document.frm_detail.idOffre.value=id_offre;
	window.document.frm_detail.p.value=p;
	window.document.frm_detail.submit();
}

function affiche_candidat(id_candidat)
{
	//window.open('modules/offre/afficheDetailOffre.php?langue='+langue+'&idOffre='+id,'popup'+id,'height=400,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=no,scrollbars=yes')
	//window.location.href="index.php?"+url_offre+"module=offre&action=detail_offre&langue="+langue+"&idOffre="+id;
	window.document.frm_detail.id_candidat.value=id_candidat;
	window.document.frm_detail.submit();
}


function statistique_offre(id_offre)
{
	window.document.frm_statistique.idOffre.value=id_offre;
	window.document.frm_statistique.submit();
}

function candidature_offre(id_offre)
{
	/*
	window.document.frm_candidature.idOffre.value=id_offre;
	window.document.frm_candidature.submit();
	*/
	window.open('modules/offre/candidature_offre.php?langue=fr&idOffre='+id_offre,'popup'+id_offre,'height=400,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=no,scrollbars=yes')
	
}
function candidature_candidat(id_candidat)
{
	window.document.frm_candidature.id_candidat.value=id_candidat;
	window.document.frm_candidature.submit();
}

function positionner(id_offre,id_candidat,langue)
{
	//var jurl;
	//var data = String(window.location).indexOf('affiche_liste_all_candidat.php');

	window.open("../../modules/offre/positionner.php?id_candidat="+id_candidat+"&idOffre="+id_offre+"&langue="+langue+'&div=1','popup1','height=150,toolbar=no,location=no,directories=no,status=yes,width=150,resizable=no,scrollbars=no');
	/*
	envoieRequete('../../modules/offre/positionner.php?id_candidat='+id_candidat+'&idOffre="+id_offre+"&langue='+langue+'&div=1','monDiv');
	
	if(data > 0){
		refresh_grid('','gridbox3','');
	}else{
		refresh_grid('','gridbox33','');
	}	
	*/
			
}

function positionner_multi(id_offre,t_id_candidat,langue)
{
	window.open("../../modules/offre/positionner.php?t_id_candidat="+t_id_candidat+"&idOffre="+id_offre+"&langue="+langue+'&div=1','popup1','height=150,toolbar=no,location=no,directories=no,status=yes,width=150,resizable=no,scrollbars=no');
}

function candidature_all_offre(id_candidat,langue)
{
window.open('../../modules/offre/affiche_liste_all_offre.php?langue='+langue+'&id_candidat='+id_candidat,'popup'+id_candidat,'height=600,toolbar=no,location=no,directories=no,status=no,width=820,resizable=yes,scrollbars=yes');
}

function candidature_all_offre2(id_candidat,langue)
{
			var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}
window.open(jurl+'modules/offre/affiche_liste_all_offre.php?langue='+langue+'&id_candidat='+id_candidat+'&div=1','popup'+id_candidat,'height=700,toolbar=no,location=no,directories=no,status=no,width=900,resizable=yes,scrollbars=yes');
}

function candidature_all_offre_id(id_candidature,langue)
{
			var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}
window.open(jurl+'modules/offre/affiche_liste_all_offre.php?langue='+langue+'&id_candidature='+id_candidature+'&div=1','popup'+id_candidature,'height=700,toolbar=no,location=no,directories=no,status=no,width=900,resizable=yes,scrollbars=yes');
}

function select_entreprises(form)
{
window.open('../../../modules/entreprise/select_entreprise.php?formName='+form+'','popup','height=600,toolbar=no,location=no,directories=no,status=no,width=800,resizable=yes,scrollbars=yes');
}

function select_offres(id_candidat)
{
	//id_candidat = window.document.frm_candidat.id_candidat.value;
	window.open('../../modules/entreprise/select_offre.php?id_candidat='+id_candidat+'','popup'+id_candidat,'height=400,toolbar=no,location=no,directories=no,status=no,width=600,resizable=yes,scrollbars=yes');
}

function select_clients(form)
{
window.open('../../../modules/entreprise/select_client.php?formName='+form+'','popup','height=600,toolbar=no,location=no,directories=no,status=no,width=800,resizable=yes,scrollbars=yes');
}

function candidature_all_candidat(id_offre,langue)
{
window.open('../../modules/candidat/affiche_liste_all_candidat.php?langue='+langue+'&id_offre='+id_offre,'popup'+id_offre,'height=600,toolbar=no,location=no,directories=no,status=no,width=800,resizable=yes,scrollbars=yes');
}

function candidature_all_candidat_(id_offre,langue)
{
	var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_offre.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}	
window.open(jurl+'modules/candidat/affiche_liste_all_candidat.php?langue='+langue+'&id_offre='+id_offre+'&div=1','popup'+id_offre,'height=700,toolbar=no,location=no,directories=no,status=no,width=900,resizable=yes,scrollbars=yes');
}

function matching(id_offre,langue)
{
window.open('../../modules/candidat/affiche_liste_all_candidat.php?matching=ok&langue='+langue+'&id_offre='+id_offre,'popup'+id_offre,'height=750,toolbar=no,location=no,directories=no,status=no,width=1000,resizable=yes,scrollbars=yes');
}

function matching_(id_offre,langue)
{
	var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_offre.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}		
window.open(jurl+'modules/candidat/affiche_liste_all_candidat.php?matching=ok&langue='+langue+'&id_offre='+id_offre+'&div=1','popup'+id_offre,'height=750,toolbar=no,location=no,directories=no,status=no,width=1000,resizable=yes,scrollbars=yes');
}

function matching_qtp_(id_offre,langue)
{
	var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_offre.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}		
window.open(jurl+'modules/candidat/affiche_liste_all_candidat.php?matching=qtp&langue='+langue+'&id_offre='+id_offre+'&div=1','popup'+id_offre,'height=800,toolbar=no,location=no,directories=no,status=no,width=1024,resizable=yes,scrollbars=yes');
}

function matching_qtp_can_(id_candidat,langue)
{
	var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}		
window.open(jurl+'modules/offre/affiche_liste_all_offre.php?matching=qtp&langue='+langue+'&id_candidat='+id_candidat+'&div=1','popup'+id_candidat,'height=800,toolbar=no,location=no,directories=no,status=no,width=1024,resizable=yes,scrollbars=yes');
}

function ajouter_pj(id_candidat,langue)
{
	window.open('../../modules/candidat/crea_pj_candidat.php?langue='+langue+'&id_cv='+id_candidat+'&page=resultat_candidat','popup'+id_candidat,'height=200,toolbar=no,location=no,directories=no,status=no,width=600,resizable=yes,scrollbars=yes');
}

function ajouter_pj_(id_candidat,langue)
{
	var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}
	window.open(jurl+'modules/candidat/crea_pj_candidat.php?langue='+langue+'&id_cv='+id_candidat+'&page=resultat_candidat&div=1','popup'+id_candidat,'height=200,toolbar=no,location=no,directories=no,status=no,width=600,resizable=yes,scrollbars=yes');
}

function ajouter_pj_offre(id_offre,langue)
{
	window.open('../../modules/offre/crea_pj_offre.php?langue='+langue+'&id_offre='+id_offre+'&page=fiche_offre','popup'+id_offre,'height=200,toolbar=no,location=no,directories=no,status=no,width=600,resizable=yes,scrollbars=yes');
}

function ajouter_pj_offre_(id_offre,langue)
{
			var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_offre.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}	
	window.open(jurl+'modules/offre/crea_pj_offre.php?langue='+langue+'&id_offre='+id_offre+'&page=fiche_offre&div=1','popup'+id_offre,'height=200,toolbar=no,location=no,directories=no,status=no,width=600,resizable=yes,scrollbars=yes');
}

function ajouter_pj2(id_candidat,langue)
{
	window.open('../../modules/candidat/crea_pj_candidat.php?langue='+langue+'&id_cv='+id_candidat+'&page=resultat_candidat','popup'+id_candidat,'height=200,toolbar=no,location=no,directories=no,status=no,width=600,resizable=yes,scrollbars=yes');
}

function importer_candidat(langue)
{
	window.open('modules/candidat/importer_candidat.php?langue='+langue+'','popup','height=200,toolbar=no,location=no,directories=no,status=no,width=600,resizable=yes,scrollbars=yes');
}


function sup_pj(id_pj,langue)
{
	window.open('../../modules/candidat/sup_piece_jointe.php?langue='+langue+'&id_pj='+id_pj+'&page=resultat_candidat','popup'+id_pj,'height=100,toolbar=no,location=no,directories=no,status=no,width=100,resizable=yes,scrollbars=yes');
}

function sup_pj_(id_pj,langue,id_candidat)
{
	envoieRequete('modules/candidat/sup_piece_jointe.php?langue='+langue+'&id_pj='+id_pj+'&page=resultat_candidat&div=1&id_candidat='+id_candidat,'win2');
	refresh_mon_div_candidat(id_candidat);
	//window.open('modules/candidat/sup_piece_jointe.php?langue='+langue+'&id_pj='+id_pj+'&page=resultat_candidat&div=1&id_candidat='+id_candidat,'popup'+id_pj,'height=100,toolbar=no,location=no,directories=no,status=no,width=100,resizable=yes,scrollbars=yes');
}

function upd_type_doc(id_pj,langue,id_candidat)
{
	window.open('modules/candidat/upd_type_doc.php?langue='+langue+'&id_pj='+id_pj+'&page=resultat_candidat&div=1&id_candidat='+id_candidat,'popup'+id_pj,'height=100,toolbar=no,location=no,directories=no,status=no,width=100,resizable=yes,scrollbars=yes');
}

function upd_type_doc_off(id_pj,langue,id_offre)
{
	window.open('modules/offre/upd_type_doc_off.php?langue='+langue+'&id_pj='+id_pj+'&page=liste_offre&div=1&id_offre='+id_offre,'popup'+id_pj,'height=100,toolbar=no,location=no,directories=no,status=no,width=100,resizable=yes,scrollbars=yes');
}

function sup_pj_offre(id_pj,langue)
{
	window.open('../../modules/offre/sup_piece_jointe.php?langue='+langue+'&id_pj='+id_pj+'&page=fiche_offre','popup'+id_pj,'height=100,toolbar=no,location=no,directories=no,status=no,width=100,resizable=yes,scrollbars=yes');
}

function sup_pj_offre_(id_pj,langue,id_offre)
{
	window.open('modules/offre/sup_piece_jointe.php?langue='+langue+'&id_pj='+id_pj+'&page=fiche_offre&div=1&id_offre='+id_offre,'popup'+id_pj,'height=100,toolbar=no,location=no,directories=no,status=no,width=100,resizable=yes,scrollbars=yes');
}

function sup_pj2(id_pj,langue)
{
	window.open('../../modules/candidat/sup_piece_jointe.php?langue='+langue+'&id_pj='+id_pj+'&page=resultat_candidat','popup'+id_pj,'height=100,toolbar=no,location=no,directories=no,status=no,width=100,resizable=yes,scrollbars=yes');
}

function aide(file_html,langue)
{

window.open('http://www.mycvtheque.com/clients/aide/'+langue+'/'+file_html,'popup','height=600,toolbar=no,location=no,directories=no,status=no,width=800,resizable=yes,scrollbars=yes');
}

function affiche_about(langue)
{
	var jurl;
	var data = String(window.location).indexOf('home.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";	
	}
window.open(jurl+'modules/public/apropos.php?langue='+langue,'popup','height=400,toolbar=no,location=no,directories=no,status=no,width=600,resizable=yes,scrollbars=no');
}

function transfert_candidat(langue,id_candidat)
{
window.open('../../modules/entreprise/transfert_candidat.php?langue='+langue+'&id_candidat='+id_candidat,'popup'+id_candidat,'height=400,toolbar=no,location=no,directories=no,status=no,width=500,resizable=yes,scrollbars=yes');
}

function transfert_candidat2(langue,id_candidat)
{
		var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}
window.open(jurl+'modules/entreprise/transfert_candidat.php?langue='+langue+'&id_candidat='+id_candidat+'&div=1','popup'+id_candidat,'height=400,toolbar=no,location=no,directories=no,status=no,width=500,resizable=yes,scrollbars=yes');
}

function photo_candidat(langue,id_candidat)
{
window.open('../../modules/entreprise/photo_candidat.php?langue='+langue+'&id_candidat='+id_candidat,'popup'+id_candidat,'height=100,toolbar=no,location=no,directories=no,status=no,width=100,resizable=no,scrollbars=no');
}

function photo_candidat2(langue,id_candidat)
{
			var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}
window.open(jurl+'modules/entreprise/photo_candidat.php?langue='+langue+'&id_candidat='+id_candidat+'&div=1','popup'+id_candidat,'height=100,toolbar=no,location=no,directories=no,status=no,width=100,resizable=no,scrollbars=no');
}

function declinaison(id_list,langue)
{
	window.open('modules/entreprise/affiche_declinaison.php?langue='+langue+'&id_list='+id_list,'popup'+id_list,'height=500,toolbar=no,location=no,directories=no,status=no,width=600,resizable=yes,scrollbars=yes');
}

function liste_valeur(id_liste,langue)
{
	window.open('modules/admin/affiche_liste_valeur.php?langue='+langue+'&id_liste='+id_liste,'popup'+id_liste,'height=500,toolbar=no,location=no,directories=no,status=no,width=600,resizable=yes,scrollbars=yes');
}

function enreg_short_list(nom_list)
{
	if(nom_list!=""){
	window.opener.document.form_consultcv.action="modules/entreprise/enreg_short_list2.php";
	window.opener.document.form_consultcv.nom_list.value=nom_list;
	window.opener.document.form_consultcv.submit();
	
	window.close();
	}else{
		alert("Donnez un nom a votre short list!");
	}
}

function nom_short_list(langue)
{
	window.open('modules/entreprise/nom_short_list.php?langue='+langue,'popup','height=150,toolbar=no,location=no,directories=no,status=yes,width=450,resizable=no,scrollbars=no')
}

function active_offre(id_offre)
{
	window.open('modules/entreprise/update_active_offre.php?idOffre='+id_offre,'popup','height=150,toolbar=no,location=no,directories=no,status=yes,width=150,resizable=no,scrollbars=no')

	//window.document.frm_active.idOffre.value=id_offre;
	//window.document.frm_active.submit();
}
function active_cv(id_candidat)
{
	window.document.frm_actif_cand.id_candidat.value=id_candidat;
	window.document.frm_actif_cand.submit();
}

function voir_piece_jointe(nom_cv)
{
	//window.open('../../cv/'+nom_cv,'popup','height=600,toolbar=yes,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes');
	window.open('../../modules/entreprise/visualiser_pj.php?type_pj=cv&nom_pj='+nom_cv,'popup'+Math.floor((new Date()).getTime() / 1000),'height=200,toolbar=yes,location=no,directories=no,status=yes,width=200,resizable=yes,scrollbars=yes');
	//window.location.href="cv/"+nom_cv;
}

function voir_piece_jointe_(nom_cv)
{
	var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}
	//window.open(jurl+'cv/'+nom_cv,'popup','height=600,toolbar=yes,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes');
	window.location.href=jurl+'modules/entreprise/visualiser_pj.php?type_pj=cv&nom_pj='+nom_cv;
	//window.open(jurl+'modules/entreprise/visualiser_pj.php?type_pj=cv&nom_pj='+nom_cv,'popup'+Math.floor((new Date()).getTime() / 1000),'height=200,toolbar=yes,location=no,directories=no,status=yes,width=200,resizable=yes,scrollbars=yes');
}

function voir_piece_jointe2(nom_cv)
{
	//window.open('../../cv/'+nom_cv,'popup','height=600,toolbar=yes,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes');
	window.open('../../modules/entreprise/visualiser_pj.php?type_pj=cv&nom_pj='+nom_cv,'popup','height=200,toolbar=yes,location=no,directories=no,status=yes,width=200,resizable=yes,scrollbars=yes');
	//window.location.href="cv/"+nom_cv;
}

function voir_piece_jointe_pj(nom_cv)
{
	//window.open('../../pj/'+nom_cv,'popup','height=600,toolbar=yes,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes');
	window.open('../../modules/entreprise/visualiser_pj.php?type_pj=pj&nom_pj='+nom_cv,'popup','height=200,toolbar=yes,location=no,directories=no,status=yes,width=200,resizable=yes,scrollbars=yes');
	
	//window.location.href="cv/"+nom_cv;type_pj
}

function voir_piece_jointe_pj_(nom_cv)
{
			var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}	
	//window.open(jurl+'pj/'+nom_cv,'popup','height=600,toolbar=yes,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes');
	//window.open(jurl+'modules/entreprise/visualiser_pj.php?type_pj=pj&nom_pj='+nom_cv,'popup','height=200,toolbar=yes,location=no,directories=no,status=yes,width=200,resizable=yes,scrollbars=yes');
	window.location.href=jurl+'modules/entreprise/visualiser_pj.php?type_pj=pj&nom_pj='+nom_cv;
	//window.location.href="cv/"+nom_cv;
}

function voir_piece_jointe_pj2(nom_cv)
{
	//window.open('../../pj/'+nom_cv,'popup','height=600,toolbar=yes,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes');
	window.open('../../modules/entreprise/visualiser_pj.php?type_pj=pj&nom_pj='+nom_cv,'popup','height=200,toolbar=yes,location=no,directories=no,status=yes,width=200,resizable=yes,scrollbars=yes');
	//window.location.href="cv/"+nom_cv;
}

function voir_pj(nom_pj)
{
	/*
	var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}
	//window.open(jurl+'cv/'+nom_cv,'popup','height=600,toolbar=yes,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes');
	window.location.href=jurl+'modules/entreprise/visualiser_pj.php?type_pj=cv&nom_pj='+nom_cv;
	*/
	
	//window.open('../../pj/'+nom_pj,'popup','height=600,toolbar=yes,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes');
	//window.open('../../modules/entreprise/visualiser_pj.php?type_pj=pj&nom_pj='+nom_pj,'popup','height=200,toolbar=yes,location=no,directories=no,status=yes,width=200,resizable=yes,scrollbars=yes');
	window.location.href='../../modules/entreprise/visualiser_pj.php?type_pj=pj&nom_pj='+nom_pj;
	//window.location.href="cv/"+nom_cv;
}

function voir_pj_tricona(nom_pj)
{
	window.open('../../tricona/pj/'+nom_pj,'popup','height=600,toolbar=yes,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes');
	//window.location.href="cv/"+nom_cv;
}

function voir_pj_tricona_candidat(nom_pj)
{
	window.open('tricona/pj/'+nom_pj,'popup','height=600,toolbar=yes,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes');
	//window.location.href="cv/"+nom_cv;
}

function retour_media_offre(idOffre){
	window.location.href="../../modules/offre/affiche_media_offre.php?idOffre="+idOffre;
}

function filtre_liste(parent_id_ref,id_liste,langue){
	window.location.href="index.php?module=admin&action=liste_valeur&parent_id_ref="+parent_id_ref+'&id_liste='+id_liste+'&langue='+langue;
}


function diffusion_offre(id_media_offre,id_media,idOffre,email_media_offre){
	window.location.href="../../modules/offre/diffusion_offre.php?idOffre="+idOffre+"&id_media_offre="+id_media_offre+"&id_media="+id_media+"&email_media_offre="+email_media_offre;
}

function ouvrir_pj(id_pj){
	/*
	var data = String(window.location).indexOf('selection_pj.php');
	if(data > 0){
		window.location.href="../../../cv/"+id_pj;
	}else{
		window.open('../../modules/entreprise/visualiser_pj.php?type_pj=cv&nom_pj='+id_pj,'popup','height=200,toolbar=yes,location=no,directories=no,status=yes,width=200,resizable=yes,scrollbars=yes');
	}		
	*/
	window.location.href='../../modules/entreprise/visualiser_pj.php?type_pj=cv&nom_pj='+id_pj;
	//window.open('../../modules/entreprise/visualiser_pj.php?type_pj=cv&nom_pj='+id_pj,'popup','height=200,toolbar=yes,location=no,directories=no,status=yes,width=200,resizable=yes,scrollbars=yes');
}

/*
function voir_pj(nom_cv)
{
	window.open(nom_cv,'popup167','height=600,toolbar=yes,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
	//window.location.href="cv/"+nom_cv;
}
*/

function voir_piece_jointe2(nom_cv)
{
	//window.open('../../cv/'+nom_cv,'popup','height=600,toolbar=yes,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
	window.open('../../modules/entreprise/visualiser_pj.php?type_pj=cv&nom_pj='+id_pj,'popup','height=200,toolbar=yes,location=no,directories=no,status=yes,width=200,resizable=yes,scrollbars=yes');
	//window.location.href="cv/"+nom_cv;
}

function imprime_offre(id_offre,langue)
{
	window.open('modules/offre/afficheDetailOffre.php?langue='+langue+'&idOffre='+id_offre,'popup'+id_offre,'height=500,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=no,scrollbars=yes')
}

function imprime_offre2(id_offre,langue)
{
	window.open('../../modules/offre/afficheDetailOffre.php?langue='+langue+'&idOffre='+id_offre,'popup'+id_offre,'height=500,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=no,scrollbars=yes')
}

function postuler_offre(id_offre,langue)
{
	window.open('modules/offre/postuler_offre.php?langue='+langue+'&idOffre='+id_offre,'popup'+id_offre,'height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
}

function postuler_offre2(id_offre,langue,id_media)
{
	window.open('modules/offre/postuler_offre.php?langue='+langue+'&idOffre='+id_offre+'&id_media='+id_media,'popup'+id_offre,'height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
}

function postuler_offre3(id_offre,langue,id_media,cl_ref1_soc)
{
	window.open('modules/offre/postuler_offre.php?langue='+langue+'&idOffre='+id_offre+'&cl_ref1_soc='+cl_ref1_soc+'&id_media='+id_media,'popup'+id_offre,'height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
}

function postuler_offre4(id_offre,langue,id_media,cl_ref1_soc)
{
	window.open('modules/offre/postuler_offre.php?langue='+langue+'&idOffre='+id_offre+'&cl_ref1_soc='+cl_ref1_soc+'&cand=new&id_media='+id_media,'popup'+id_offre,'height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
}

function postuler_all_offre(mode_envoi,langue)
{
	window.open('modules/candidat/postuler_all_offre.php?langue='+langue+'&mode_envoi='+mode_envoi,'popup1','height=400,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=no,scrollbars=yes')
}

function selectionner_offre(id,langue,action_cadd)
{
	window.open('modules/candidat/enreg_selection_offre.php?langue='+langue+'&action='+action_cadd+'&idOffre='+id,'popup'+id,'height=150,toolbar=no,location=no,directories=no,status=yes,width=400,resizable=no,scrollbars=no')
}

function selectionner_cv(id,langue,action_cadd)
{
	window.open('../../modules/entreprise/enreg_selection_cv.php?langue='+langue+'&action='+action_cadd+'&id_cv='+id,'popup'+id,'height=200,toolbar=no,location=no,directories=no,status=yes,width=400,resizable=no,scrollbars=no')
}

function selectionner_cv3(id,langue,action_cadd)
{
	window.open('modules/entreprise/enreg_selection_cv.php?langue='+langue+'&action='+action_cadd+'&id_cv='+id+'&div=1','popup'+id,'height=200,toolbar=no,location=no,directories=no,status=yes,width=400,resizable=no,scrollbars=no')
}


function selectionner_cv2(id,langue,action_cadd)
{
	window.open('../../modules/entreprise/enreg_selection_cv.php?langue='+langue+'&action='+action_cadd+'&id_cv='+id,'popup'+id,'height=200,toolbar=no,location=no,directories=no,status=yes,width=400,resizable=no,scrollbars=no')
}

function classer_cv(id,langue,id_list,id_declinaison,page)
{
	window.open('../../modules/entreprise/enreg_classer_cv.php?langue='+langue+'&id_cv='+id+'&id_list='+id_list+'&id_declinaison='+id_declinaison+'&page_retour='+page,'popup'+id,'height=350,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=yes,scrollbars=no')
}

function classer_cv2(id,langue,id_list,id_declinaison,page)
{
			var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}
	window.open(jurl+'modules/entreprise/enreg_classer_cv.php?langue='+langue+'&id_cv='+id+'&id_list='+id_list+'&id_declinaison='+id_declinaison+'&page_retour='+page+'&div=1','popup'+id,'height=350,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=yes,scrollbars=no')
}

function sup_candidature(idOffre,id_candidature,suivi,tri_cv_offre,langue)
{
	window.open('../../modules/entreprise/sup_candidature.php?idOffre='+idOffre+'&id_candidature='+id_candidature+'&suivi='+suivi+'&tri_cv_offre='+tri_cv_offre+'&langue='+langue,'popup'+idOffre,'height=100,toolbar=no,location=no,directories=no,status=yes,width=100,resizable=yes,scrollbars=no')
}

function sup_candidature3(id_candidature,langue)
{
	window.open('../../modules/entreprise/sup_candidature3.php?id_candidature='+id_candidature+'&langue='+langue,'popup'+id_candidature,'height=100,toolbar=no,location=no,directories=no,status=yes,width=100,resizable=yes,scrollbars=no')
}

function sup_tache(id_tache,langue,page)
{
	if(confirm('Etes vous sûr de vouloir supprimer ce besoin ?')){
		window.open('modules/entreprise/sup_tache.php?langue='+langue+'&page='+page+'&id_tache='+id_tache,'popup'+id_tache,'height=100,toolbar=no,location=no,directories=no,status=no,width=100,resizable=no,scrollbars=no');
	}
}


function sup_candidature2(idOffre,id_candidature,suivi,tri_cv_offre,langue)
{
	var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}	
	window.open(jurl+='modules/entreprise/sup_candidature.php?page='+tri_cv_offre+'&idOffre='+idOffre+'&id_candidature='+id_candidature+'&suivi='+suivi+'&tri_cv_offre='+tri_cv_offre+'&langue='+langue,'popup'+id_candidature,'height=100,toolbar=no,location=no,directories=no,status=yes,width=100,resizable=yes,scrollbars=no')
}




function modifier_statut(id,langue,page)
{
	window.open('../../modules/entreprise/modifier_statut.php?langue='+langue+'&id_cv='+id+'&page_retour='+page,'popup'+id,'height=350,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=yes,scrollbars=no')
}

function modifier_statut2(id,langue,page)
{
	var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}
	window.open(jurl+'modules/entreprise/modifier_statut.php?langue='+langue+'&id_cv='+id+'&page_retour='+page+'&div=1','popup'+id,'height=350,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=yes,scrollbars=no')
}

function modifier_offre(id,langue)
{
	window.open('../../modules/offre/gererOffre.php?ajout_offre=modif&langue='+langue+'&id_offre='+id+'','popup'+id,'height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
	
}

function modifier_offre_(id,langue)
{
	

		
	var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_offre.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}	
	/*
	var dhxWins = new dhtmlXWindows();
	dhxWins.enableAutoViewport(true);
	//dhxWins.setViewport(200, 50, 1024, 1000);
	dhxWins.vp.style.border = "#909090 0px solid";
	dhxWins.setImagePath(jurl+"utils/dhtmlxWindows/codebase/imgs/");
	
	var w1 = dhxWins.createWindow("fo", 10, 10, 1024, 800);

	w1.setText("Fiche offre");
	w1.button("close").show();
	w1.denyPark(); 
	w1.attachURL(jurl+'modules/offre/gererOffre.php?ajout_offre=modif&langue='+langue+'&id_offre='+id, true);	
	
*/
	window.open(jurl+'modules/offre/gererOffre.php?ajout_offre=modif&langue='+langue+'&id_offre='+id+'&div=1','popup'+id,'height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
	
}

function dupliquer_offre_(id,langue)
{
	

		
	var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_offre.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}	

	window.open(jurl+'modules/offre/gererOffre.php?ajout_offre=&langue='+langue+'&id_offre='+id+'&div=1','popup'+id,'height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
	
}

function modifier_offre_new(id,langue)
{
	window.open('modules/offre/gererOffre.php?ajout_offre=modif&langue='+langue+'&id_offre='+id+'','popup'+id,'height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
	
}

function supprimer_candidat(id,langue)
{
	window.open('../../modules/candidat/supprimerCandidat.php?page=&langue='+langue+'&id_candidat='+id+'','popup'+id,'height=150,toolbar=no,location=no,directories=no,status=yes,width=150,resizable=yes,scrollbars=yes')
	
}

function supprimer_candidat_(id,langue)
{
			var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}
	//envoieRequete(jurl+'modules/candidat/supprimerCandidat.php?page=&langue='+langue+'&id_candidat='+id+'&div=1','win2');
	window.open(jurl+'modules/candidat/supprimerCandidat.php?page=&langue='+langue+'&id_candidat='+id+'&div=1','popup'+id,'height=150,toolbar=no,location=no,directories=no,status=yes,width=150,resizable=yes,scrollbars=yes')
	
}

function modifier_candidat(id_candidat,langue)
{
	window.open('../../modules/candidat/modifier_candidat.php?ajout_candidat=modif&langue='+langue+'&id_cv='+id_candidat+'','popup'+id_candidat,'height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
	
}

function modifier_candidat2(id_candidat,langue)
{
		var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}
	window.open(jurl+'modules/candidat/modifier_candidat.php?ajout_candidat=modif&langue='+langue+'&id_cv='+id_candidat+'&div=1','popup'+id_candidat,'height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
	
}
/*
function ajout_offre(langue)
{
	window.open('modules/offre/gererOffre.php?ajout_offre=&langue='+langue+'','popup','height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
	
}
*/
function ajout_offre(langue)
{
	window.open('modules/offre/gererOffre.php?ajout_offre=&langue='+langue+'','popup','height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
	//envoieRequete('modules/offre/gererOffre.php?ajout_offre=&langue='+langue,'win2');
	/*
	new Windoo({
		//ghost: {resize: true, move: true},
		buttons: {roll: true},
		title: 'Wrapped element'
	}).wrap($('win2'), {
		position: true,			// inherit content position
		ignorePadding: false,	// = add window border padding to content block size
		resetWidth: true
	}).show();
	*/
}

function ajout_candidat(langue)
{
	window.open('modules/candidat/modifier_candidat.php?ajout_candidat=&langue='+langue+'','popup','height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
	
}

function modifier_consultant(id,langue,page)
{
	window.open('../../modules/entreprise/modifier_consultant.php?langue='+langue+'&id_cv='+id+'&page_retour='+page,'popup'+id,'height=350,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=yes,scrollbars=no')
}

function modifier_consultant_(id,langue,page)
{
			var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}
	window.open(jurl+'modules/entreprise/modifier_consultant.php?langue='+langue+'&id_cv='+id+'&page_retour='+page+'&div=1','popup'+id,'height=350,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=yes,scrollbars=no')
}

function modifier_consultant2(id,langue,page)
{
	window.open('../../modules/entreprise/modifier_consultant.php?langue='+langue+'&id_cv='+id+'&page_retour='+page,'popup'+id,'height=350,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=yes,scrollbars=no')
}

function modifier_consultant_offre(id,langue,page)
{
	window.open('../../modules/offre/modifier_consultant_offre.php?langue='+langue+'&idOffre='+id+'&page_retour='+page,'popup'+id,'height=350,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=yes,scrollbars=no')
}

function modifier_consultant_offre_(id,langue,page)
{
	var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_offre.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}
	window.open(jurl+'modules/offre/modifier_consultant_offre.php?langue='+langue+'&idOffre='+id+'&page_retour='+page+'&div=1','popup'+id,'height=350,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=yes,scrollbars=no')
}

function modifier_consultant_offre2(id,langue,page)
{
	window.open('../../modules/offre/modifier_consultant_offre.php?langue='+langue+'&idOffre='+id+'&page_retour='+page,'popup'+id,'height=350,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=yes,scrollbars=no')
}


function modifier_solution(id,langue,page)
{
	window.open('../../modules/entreprise/modifier_solution.php?langue='+langue+'&id_cv='+id+'&page_retour='+page,'popup'+id,'height=350,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=yes,scrollbars=no')
}

function modifier_solution2(id,langue,page)
{
	var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}	
	window.open(jurl+'modules/entreprise/modifier_solution.php?langue='+langue+'&id_cv='+id+'&page_retour='+page+'&div=1','popup'+id,'height=350,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=yes,scrollbars=no')
}


function modifier_dispo(id,langue,page)
{
	window.open('modules/entreprise/modifier_dispo.php?langue='+langue+'&id_cv='+id+'&page_retour='+page,'popup'+id,'height=350,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=yes,scrollbars=no')
}

function note_cv(langue,id,id_candidat)
{
	window.open('../../modules/entreprise/modif_note_cv.php?id_candidat='+id_candidat+'&langue='+langue+'&id_selection='+id+'&idOffre='+id+'','popup'+id,'height=600,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
}

function prestation(langue,id_candidat)
{
	var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}	
	window.open(jurl+'modules/entreprise/candidat_prestation.php?id_candidat='+id_candidat+'&langue='+langue,'popup'+id_candidat,'height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
}



function note_cv_(langue,id,id_candidat)
{
			var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}
	window.open(jurl+'modules/entreprise/modif_note_cv.php?id_candidat='+id_candidat+'&langue='+langue+'&id_suivi='+id+'&id_selection='+id+'&idOffre='+id+'&div=1','popup'+id,'height=600,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
}

function note_client(langue,id_suivi,id_client)
{
	window.open('modules/entreprise/modif_note_client.php?id_client='+id_client+'&langue='+langue+'&id_suivi='+id_suivi+'&div=1','popup'+id_client,'height=600,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
}

function note_cv2(langue,id,id_candidat)
{
	window.open('../../modules/entreprise/modif_note_cv2.php?id_candidat='+id_candidat+'&langue='+langue+'&id_selection='+id+'&idOffre='+id+'','popup'+id,'height=600,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
}

function note_cv2_(langue,id,id_candidat)
{
			var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}
	window.open(jurl+'modules/entreprise/modif_note_cv2.php?id_candidat='+id_candidat+'&langue='+langue+'&id_selection='+id+'&idOffre='+id+'&div=1','popup'+id,'height=600,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
}

function note_cv3(langue,id,id_candidat)
{
	window.open('../../modules/entreprise/modif_note_cv3.php?id_candidat='+id_candidat+'&langue='+langue+'&id_selection='+id+'&idOffre='+id+'&id_offre='+id+'','popup'+id,'height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
}

function note_cv3_(langue,id,id_candidat)
{
				var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}
	window.open(jurl+'modules/entreprise/modif_note_cv3.php?id_candidat='+id_candidat+'&langue='+langue+'&id_suivi='+id+'&id_selection='+id+'&idOffre='+id+'&id_offre='+id+'&div=1','popup'+id,'height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
}

function note_cv6(langue,id,id_candidat)
{
	window.open('../../modules/entreprise/modif_note_cv6.php?id_candidat='+id_candidat+'&langue='+langue+'&id_selection='+id+'&idOffre='+id+'','popup'+id,'height=600,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
}

function note_cv6_(langue,id,id_candidat)
{
	var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}
	window.open(jurl+'modules/entreprise/modif_note_cv6.php?id_candidat='+id_candidat+'&langue='+langue+'&id_selection='+id+'&idOffre='+id+'&div=1','popup'+id,'height=600,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
}

function note_cv7(langue,id,id_candidat)
{
	window.open('../../modules/entreprise/modif_note_cv7.php?id_candidat='+id_candidat+'&langue='+langue+'&id_selection='+id+'&idOffre='+id+'','popup'+id,'height=600,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
}

function note_cv7_(langue,id,id_candidat)
{
		var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}
	window.open(jurl+'modules/entreprise/modif_note_cv7.php?id_candidat='+id_candidat+'&langue='+langue+'&id_selection='+id+'&idOffre='+id+'&div=1','popup'+id,'height=600,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
}

function modif_suivi(id_suivi)
{
	window.open('modules/entreprise/modif_suivi.php?id_suivi='+id_suivi+'','popup'+id,'height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
}


function suivi_positionnement(langue,id_candidature)
{
	window.open('../../modules/entreprise/modif_note_cv3.php?id_candidature='+id_candidature+'&langue='+langue+'','popup'+id_candidature,'height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
}

function suivi_positionnement2(langue,id_candidature)
{
	window.open('../../modules/entreprise/modif_note_cv3.php?id_candidature='+id_candidature+'&langue='+langue+'','popup'+id_candidature,'height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
}

function modif_note_posi(langue,id_offre,id_suivi,id_candidat)
{
	window.open('modules/entreprise/modif_note_cv3.php?id_candidat='+id_candidat+'&idOffre='+id_offre+'&id_suivi='+id_suivi+'&langue='+langue+'&id_offre='+id_offre+'','popup'+id_suivi,'height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
}

function modif_note(langue,id_suivi,id_candidat)
{
	window.open('modules/entreprise/modif_note_cv.php?id_candidat='+id_candidat+'&id_suivi='+id_suivi+'&langue='+langue+'','popup'+id_suivi,'height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
}

function note_cv4(langue,id,id_candidat)
{
	window.open('../../modules/entreprise/modif_note_cv4.php?id_candidat='+id_candidat+'&langue='+langue+'&id_selection='+id+'&idOffre='+id+'','popup'+id,'height=600,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
}

function note_cv5(langue,id,id_candidat)
{
	window.open('../../modules/entreprise/modif_note_cv5.php?id_candidat='+id_candidat+'&langue='+langue+'&id_selection='+id+'&idOffre='+id+'','popup'+id,'height=600,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
}

function note_cv5_(langue,id,id_candidat)
{
			var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}
	window.open(jurl+'modules/entreprise/modif_note_cv5.php?id_candidat='+id_candidat+'&langue='+langue+'&id_selection='+id+'&idOffre='+id+'&div=1','popup'+id,'height=600,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
}

function note_cv_client(langue,id,id_candidat)
{
	window.open('modules/client/modif_note_cv.php?id_candidat='+id_candidat+'&langue='+langue+'&id_selection='+id+'&idOffre='+id+'','popup'+id,'height=600,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
}

function affiche_media_offre(langue,id,id_contact)
{
	window.open('../../modules/offre/affiche_media_offre.php?id_contact='+id_contact+'&langue='+langue+'&idOffre='+id+'','popup'+id,'height=300,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
}

function affiche_media_offre_(langue,id,id_contact)
{
		var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_offre.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}
	window.open(jurl+'modules/offre/affiche_media_offre.php?id_contact='+id_contact+'&langue='+langue+'&idOffre='+id+'&div=1','popup'+id,'height=300,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
}

function affiche_template_mail(langue,id_mail)
{
	if(id_mail!=""){
		window.open('../../modules/entreprise/affiche_template_mail.php?id_mail='+id_mail+'&langue='+langue,'popup'+id_mail,'height=300,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
	}else{
		alert("Choisissez un template")
	}
}

function affiche_stat_offre(langue,id)
{
	window.open('modules/offre/affiche_stat_offre.php?langue='+langue+'&idOffre='+id+'','popup'+id,'height=600,toolbar=no,location=no,directories=no,status=yes,width=700,resizable=yes,scrollbars=yes')
}

function selectionner_cv_admin(id,langue,action_cadd)
{
	window.open('modules/admin/enreg_selection_cv.php?langue='+langue+'&action='+action_cadd+'&id_cv='+id,'popup'+id,'height=150,toolbar=no,location=no,directories=no,status=yes,width=400,resizable=no,scrollbars=no')
}

function supprimer_selection(id,langue,action_cadd)
{
	window.location.href="index.php?module=candidat&action=affiche_selection_offre&langue="+langue+"&action_cadd="+action_cadd+"&idOffre="+id;
	
}

function supprimer_selection_cv(id,langue,action_cadd)
{
	//window.location.href="index.php?module=entreprise&action=resultat_candidat_ajax&langue="+langue+"&action_cadd="+action_cadd+"&id_cv="+id;
	window.open('modules/entreprise/sup_selection_cv.php?langue='+langue+'&action_cadd='+action_cadd+'&id_cv='+id,'popup'+id,'height=150,toolbar=no,location=no,directories=no,status=yes,width=400,resizable=no,scrollbars=no')
}

function supprimer_selection_cv_admin(id,langue,action_cadd)
{
	window.location.href="index.php?module=admin&action=affiche_selection_cv&langue="+langue+"&action_cadd="+action_cadd+"&id_cv="+id;
}

function imprime_cv(id_cv,langue)
{
	window.open('modules/candidat/imprimer_cv.php?langue='+langue+'&id_cv='+id_cv,'popup'+id_cv,'height=600,toolbar=yes,location=no,directories=no,status=yes,width=600,resizable=no,scrollbars=yes')
}	

function imprime_cv_lettre(id_cv,langue)
{
	window.open('modules/candidat/imprimer_cv_lettre.php?langue='+langue+'&id_cv='+id_cv,'popup'+id_cv,'height=600,toolbar=yes,location=no,directories=no,status=yes,width=600,resizable=no,scrollbars=yes')
}	


function affiche_contact(id,langue)
{
	window.open('modules/admin/afficheDetailContact.php?langue='+langue+'&idContact='+id+'','popup'+id+'','height=400,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
}

function modif_group(id,langue)
{
	window.open('modules/admin/modif_group_admin.php?langue='+langue+'&group_id='+id+'','popup'+id+'','height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
}

function ajout_group(langue)
{
	window.open('modules/admin/add_group_admin.php?langue='+langue+'&group=new','popup','height=400,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
}

function modif_lib_group(id,langue)
{
	window.open('modules/admin/add_group_admin.php?langue='+langue+'&group=modif&group_id='+id+'','popup'+id+'','height=400,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
}

function affiche_client(id,langue)
{
	window.open('modules/entreprise/affiche_detail_client.php?langue='+langue+'&id_client='+id+'','popup'+id+'','height=400,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=no,scrollbars=yes')
}

function affiche_entreprise_popup(id,langue)
{
	window.open('modules/entreprise/affiche_detail_entreprise.php?langue='+langue+'&id_entreprise='+id+'','popup'+id+'','height=400,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
}

function affiche_entreprise_popup2(id,langue)
{
	window.open('../../modules/entreprise/affiche_detail_entreprise.php?langue='+langue+'&id_entreprise='+id+'','popup'+id+'','height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
}

function affiche_entreprise(id,langue)
{
	//window.open('modules/entreprise/affiche_detail_entreprise.php?langue='+langue+'&id_entreprise='+id+'','popup'+id+'','height=400,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=no,scrollbars=yes')
	window.location.href="index.php?langue="+langue+"&module=entreprise&action=detail_entreprise&id_entreprise="+id+"&langue="+langue;
}


function affiche_client_popup(id,langue)
{
	window.open('../../modules/entreprise/affiche_detail_client.php?langue='+langue+'&id_client='+id+'','popup'+id+'','height=400,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=no,scrollbars=yes')
}

function affiche_offre_popup(id,langue)
{
	window.open('../../modules/entreprise/affiche_detail_offre.php?langue='+langue+'&idOffre='+id+'','popup'+id+'','height=400,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
}

function affiche_offre_popup2(id,langue)
{
	window.open('../../modules/offre/detail_offre_popup.php?langue='+langue+'&idOffre='+id+'','popup'+id+'','height=400,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
}

function affiche_client2_popup(id,langue)
{
	window.open('../../modules/entreprise/affiche_detail_client2.php?langue='+langue+'&id_client='+id+'','popup'+id+'','height=400,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=no,scrollbars=yes')
}


function affiche_client2(id,langue)
{
	window.open('modules/entreprise/affiche_detail_client2.php?langue='+langue+'&id_client='+id+'','popup'+id+'','height=400,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=no,scrollbars=yes')
}

function affiche_recruteur(id,langue)
{
	window.open('modules/entreprise/affiche_detail_recruteur.php?langue='+langue+'&id_contact='+id+'','popup'+id+'','height=400,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=no,scrollbars=yes')
}

function affiche_contact_client(id,langue)
{
	window.open('modules/client/affiche_detail_recruteur.php?langue='+langue+'&id_contact='+id+'','popup'+id+'','height=400,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=no,scrollbars=yes')
}


function affiche_liste(nom_categ,langue,ref,tabRef)
{
	window.location.href="index.php?langue="+langue+"&module=admin&action=modifierTabRef&ref="+ref+"&tabRef="+tabRef+"&categ_titre="+nom_categ;
	
}

function filtre_active_offre(active_offre,langue)
{
	//window.location.href="index.php?langue="+langue+"&module=entreprise&action=liste_offre&active_offre="+active_offre;
	//window.open('modules/client/affiche_detail_recruteur.php?langue='+langue+'&id_contact='+id+'','popup'+id+'','height=400,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=no,scrollbars=yes')
	
	window.document.frm_active_offre.active_offre.value=active_offre;
	window.document.frm_active_offre.submit();			
	
}

function filtre_client(id_client,langue)
{
	//window.location.href="index.php?langue="+langue+"&module=entreprise&action=liste_offre&id_client="+id_client;
	
	window.document.frm_client.id_client.value=id_client;
	window.document.frm_client.submit();		
	
}

function filtre_entreprise(id_entreprise,langue)
{
	//window.location.href="index.php?langue="+langue+"&module=entreprise&action=liste_offre&id_client="+id_client;
	
	window.document.frm_entreprise.id_entreprise.value=id_entreprise;
	window.document.frm_entreprise.submit();		
	
}

function filtre_categorie(id_categ,langue)
{
	//window.location.href="index.php?langue="+langue+"&module=entreprise&action=liste_offre&id_client="+id_client;
	
	window.document.frm_categ.categorie_titre_offre.value=id_categ;
	window.document.frm_categ.submit();		
	
}

function filtre_pays(id_pays,langue)
{
	//window.location.href="index.php?langue="+langue+"&module=entreprise&action=liste_offre&id_client="+id_client;
	
	window.document.frm_pays.region_offre.value=id_pays;
	window.document.frm_pays.submit();		
	
}

function filtre_metier(cl_metier_offre,langue)
{
	//window.location.href="index.php?langue="+langue+"&module=entreprise&action=liste_offre&id_client="+id_client;
	
	window.document.frm_metier.cl_metier_offre.value=cl_metier_offre;
	window.document.frm_metier.submit();		
	
}

function filtre_client2(id_entreprise)
{
	//window.location.href="../../modules/offre/affiche_liste_all_offre.php?langue="+langue+"&id_client="+id_client+"&id_candidat="+id_candidat;
	
	window.document.frm_client.id_entreprise.value=id_entreprise;
	window.document.frm_client.submit();	
	
}

function filtre_categ(id_categ)
{
	window.document.frm_categ.categorie_titre_offre.value=id_categ
	window.document.frm_categ.submit();	
}

function acces_categ(langue,ref,tabRef, page,categ)
{
	window.location.href="index.php?langue="+langue+"&module=admin&action="+page+"&ref="+ref+"&tabRef="+tabRef+"&categ_titre="+categ;
	
}

function contact_mail_admin(email,langue,id_cv,id_contact)
{
	if(id_cv!=""){
		window.open('modules/admin/affiche_mail.php?langue='+langue+'&id_cv='+id_cv+'&email='+email+'','popup'+id_cv+'','height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=no,scrollbars=yes')
	}else{
		window.open('modules/admin/affiche_mail.php?langue='+langue+'&id_contact='+id_contact+'&email='+email+'','popup'+id_contact+'','height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=no,scrollbars=yes')
	}
	
}

function mail_client(email,langue,id_client)
{
	window.open('modules/entreprise/affiche_mail_client.php?langue='+langue+'&id_client='+id_client+'&email='+email+'','popup'+id_client+'','height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=no,scrollbars=yes')
}

function mail_client2(email,langue,id_client)
{
	window.open('modules/entreprise/affiche_mail_client2.php?langue='+langue+'&id_client='+id_client+'&email='+email+'','popup'+id_client+'','height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=no,scrollbars=yes')
}

function mail_recruteur(email,langue,id_contact)
{
	window.open('modules/entreprise/affiche_mail_recruteur.php?langue='+langue+'&id_contact='+id_contact+'&email='+email+'','popup'+id_contact+'','height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=no,scrollbars=yes')
}

function mail_contact_client(email,langue,id_contact)
{
	window.open('modules/client/affiche_mail_recruteur.php?langue='+langue+'&id_contact='+id_contact+'&email='+email+'','popup'+id_contact+'','height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=no,scrollbars=yes')
}

function contact_mail_ent(langue,id_cv,id_candidature)
{
	//window.location.href="index.php?langue="+langue+"&module=admin&action=mail&email="+email;
	window.open('../../modules/entreprise/affiche_mail.php?langue='+langue+'&id_cv='+id_cv+'&id_candidature='+id_candidature+'&id_candidat='+id_cv+'','popup'+id_cv+'','height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=no,scrollbars=yes')
	
}

function contact_mail_ent2(langue,id_cv,id_candidature)
{
	var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');

	if(data > 0){

		jurl = "../../";

	}else{

		jurl = "";

	}	
	
	//window.location.href="index.php?langue="+langue+"&module=admin&action=mail&email="+email;
	window.open(jurl+'modules/entreprise/affiche_mail.php?langue='+langue+'&id_cv='+id_cv+'&id_candidature='+id_candidature+'&id_candidat='+id_cv+'&div=1','popup'+id_cv+'','height=600,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=no,scrollbars=yes')
	
}

function affiche_report(langue,id_candidat)
{
	//window.location.href="index.php?langue="+langue+"&module=admin&action=mail&email="+email;
	window.open('modules/entreprise/affiche_report_candidat.php?langue='+langue+'&id_candidat='+id_candidat,'popup'+id_candidat+'','height=600,toolbar=yes,location=yes,directories=yes,status=yes,width=800,resizable=yes,scrollbars=yes')
	
}

function chk_vers_txt(nom_form,nom_txt,val_txt,nom_chk)
{
	if(document.forms[nom_form].elements[nom_chk].checked == true){
		document.forms[nom_form].elements[nom_txt].value = val_txt;
	}else{
		document.forms[nom_form].elements[nom_txt].value="";
	}
}


function set_valeur_liste(nom_form,nom_element,obj_select,sep_value){
	var long_chaine_total = obj_select.length;
	var long_sep = sep_value.length;
	var result_chaine = obj_select.substring(long_sep,long_chaine_total);

	if(String(obj_select.substring(0,sep_value.length))==String(sep_value)){
		
		document.forms[nom_form].elements[nom_element].value = result_chaine;
	}else{
		document.forms[nom_form].elements[nom_element].value = "";
	}
}



function affiche_logo(logo)
{
	window.open('modules/entreprise/affiche_logo.php?logo='+logo,'popup1','height=400,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=no,scrollbars=yes')
}	

function affiche_photo(photo)
{
	window.open('modules/candidat/affiche_photo.php?photo='+photo,'popup1','height=400,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=no,scrollbars=yes')
}

function affiche_cv(id_cv,langue)
{
	//window.location.href="index.php?module=entreprise&action=affiche_cv&id_cv="+id+"&langue="+langue
	window.open('modules/entreprise/affiche_cv.php?langue='+langue+'&id_cv='+id_cv,'popup'+id_cv,'height=600,toolbar=yes,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
}	


    var popup_cv;
  var top_cv=(screen.height-800)/2;
  var left_cv=0;    
  //var left_cv=(screen.width-800)/2;    
    function Ouvrir(id_cv) {
    	//var span = document.getElementById("recfound")
    	//span.innerHTML='toto';
       //ajaxpage2('modules/entreprise/affiche_cv.php?id_cv='+id_cv+'', 'rightcolumn');
       popup_cv=window.open('modules/entreprise/affiche_cv_light.php?id_cv='+id_cv,'popup'+id_cv,'top='+top_cv+',left='+left_cv+',height=800,toolbar=yes,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
       
    }
    function Fermer() {
       if (popup_cv.document) { popup_cv.close(); }
    }
  		
function envoieRequete(url,id)
{
	var xhr_object = null;
	var position = id;
	   if(window.XMLHttpRequest)  xhr_object = new XMLHttpRequest();
	  else
	    if (window.ActiveXObject)  xhr_object = new ActiveXObject("Microsoft.XMLHTTP"); 
	// On ouvre la requete vers la page désirée
	xhr_object.open("GET", url, true);
	xhr_object.onreadystatechange = function(){
	if ( xhr_object.readyState == 4 )
	{
		// j'affiche dans la DIV spécifiées le contenu retourné par le fichier
		document.getElementById(position).innerHTML = xhr_object.responseText;
	}
	}
	// dans le cas du get
	xhr_object.send(null);
	//
	//afficheCacheDiv3(id);
}

function affiche_cv2(id_cv,langue)
{
	//window.location.href="index.php?module=entreprise&action=affiche_cv&id_cv="+id+"&langue="+langue
	window.open('../../modules/entreprise/affiche_cv.php?langue='+langue+'&id_cv='+id_cv,'popup'+id_cv,'height=600,toolbar=yes,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
}	

function affiche_cv_client(id_cv,langue)
{
	//window.location.href="index.php?module=entreprise&action=affiche_cv&id_cv="+id+"&langue="+langue
	window.open('modules/client/affiche_cv.php?langue='+langue+'&id_cv='+id_cv,'popup'+id_cv,'height=600,toolbar=yes,location=no,directories=no,status=yes,width=600,resizable=no,scrollbars=yes')
}	

function edition_courrier(id_req,langue){
	if(id_req==""){
		alert("Aucune requête choisi !");
	}else{
		window.open('modules/admin/affiche_edition.php?langue='+langue+'&id_req='+id_req,'popup'+id_req,'height=600,toolbar=yes,location=no,directories=no,status=yes,width=300,resizable=no,scrollbars=yes')
	}
}

function voir_cv(id_cv,langue)
{
	window.open('../../modules/candidat/imprimer_cv_bis.php?langue='+langue+'&id_cv='+id_cv,'popup'+id_cv,'height=600,toolbar=yes,location=no,directories=no,status=yes,width=600,resizable=no,scrollbars=yes')
}

function voir_lettre(id_cv,langue)
{
	window.open('../../modules/candidat/imprimer_lettre.php?langue='+langue+'&id_cv='+id_cv,'popup'+id_cv,'height=400,toolbar=yes,location=no,directories=no,status=yes,width=600,resizable=no,scrollbars=yes')
}	

function affiche_cv_admin(id_cv,langue,email)
{
	//window.location.href="index.php?module=admin&action=affiche_cv&id_cv="+id+"&langue="+langue;
	window.open('modules/admin/affiche_cv_admin.php?langue='+langue+'&id_cv='+id_cv,'popup'+id_cv,'height=600,toolbar=yes,location=no,directories=no,status=yes,width=600,resizable=no,scrollbars=yes')
	/*
	document.frm_detail_cv.id_cv.value=id_cv;
	document.frm_detail_cv.EMAIL_CANDIDAT2.value=email;
	document.frm_detail_cv.submit();
	*/
}	

function modif_cv_admin(id_cv,langue,email,page)
{
	window.location.href="index.php?langue="+langue+"&module=entreprise&action=resultat_candidat_ajax.php&id_cv="+id_cv+"&p="+page;
	/*
	document.frm_modif_cv.id_cv.value=id_cv;
	document.frm_modif_cv.EMAIL_CANDIDAT2.value=email;
	document.frm_modif_cv.submit();	
	*/
	
}

function acces_candidat(id_cv,langue)
{
	window.location.href="modules/entreprise/session_recherche.php?sess_ent_id_candidat="+id_cv+"&langue="+langue;
}

function acces_candidat2(id_candidature,langue)
{
	window.location.href="modules/entreprise/session_recherche.php?id_candidature="+id_candidature+"&langue="+langue;
}

function acces_candidature(id_candidature,langue)
{
	window.location.href="index.php?action=liste_candidature&module=entreprise&id_candidature="+id_candidature+"&langue="+langue;
	
	
}

function acces_fiche_candidat(id_candidat,langue){
	window.open('../../modules/entreprise/fiche_candidat.php?id_candidat='+id_candidat+'','popup'+id_candidat+'2','height=800,toolbar=no,location=no,directories=no,status=yes,width=1000,resizable=yes,scrollbars=yes')
}

function acces_offre(id_offre,langue)
{
	window.location.href="modules/entreprise/session_acces_offre.php?liste_off_id_offre="+id_offre+"&langue="+langue;
}

function acces_offre2(id_candidature,langue)
{
	window.location.href="modules/entreprise/session_acces_offre.php?id_candidature="+id_candidature+"&langue="+langue;
}

function valider_cv(id_cv_gen,langue,email,profil)
{
	window.open('../../modules/entreprise/valide_candidat.php?langue='+langue+'&id_cv='+id_cv_gen+'&EMAIL_CANDIDAT2='+email+'&profil='+profil,'popup'+id_cv_gen,'height=600,toolbar=no,location=no,directories=no,status=no,width=800,resizable=yes,scrollbars=yes,fullscreen=yes');
}

function valider_cv2(id_cv_gen,langue,email,profil)
{
		var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}	
	window.open(jurl+'modules/entreprise/valide_candidat.php?langue='+langue+'&id_cv='+id_cv_gen+'&EMAIL_CANDIDAT2='+email+'&profil='+profil+'&div=1','popup'+id_cv_gen,'height=600,toolbar=no,location=no,directories=no,status=no,width=800,resizable=yes,scrollbars=yes,fullscreen=yes');
}

function tache(id_candidat,langue,page)
{
	window.open('../../modules/entreprise/saisie_tache.php?langue='+langue+'&id_candidat='+id_candidat+'&page='+page,'popup'+id_candidat,'height=600,toolbar=no,location=no,directories=no,status=no,width=800,resizable=yes,scrollbars=yes,fullscreen=no');
}

function tache2(id_candidat,langue,page)
{
			var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}	
	window.open(jurl+'modules/entreprise/saisie_tache.php?langue='+langue+'&id_candidat='+id_candidat+'&page='+page+'&div=1','popup'+id_candidat,'height=600,toolbar=no,location=no,directories=no,status=no,width=800,resizable=yes,scrollbars=yes,fullscreen=no');
}

function qtp(id_candidat,langue,page)
{
	window.open('../../modules/entreprise/qtp.php?langue='+langue+'&id_candidat='+id_candidat+'&page='+page,'popup'+id_candidat,'height=600,toolbar=yes,location=yes,directories=yes,status=yes,width=800,resizable=yes,scrollbars=yes,fullscreen=no');
}

function qtp_(id_candidat,langue,page)
{
			var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}
	window.open(jurl+'modules/entreprise/qtp.php?langue='+langue+'&id_candidat='+id_candidat+'&page='+page+'&div=1','popup'+id_candidat,'height=600,toolbar=yes,location=yes,directories=yes,status=yes,width=800,resizable=yes,scrollbars=yes,fullscreen=no');
}

function tricona(url_tricona,email,passe)
{
	window.open(url_tricona+'?button=Inloggen&email='+email+'&wachtwoord='+passe,'popup','height=600,toolbar=yes,location=yes,directories=yes,status=yes,width=800,resizable=yes,scrollbars=yes,fullscreen=no');
}

function qtp2(id_candidat,langue,page)
{
	window.open('../../modules/entreprise/qtp.php?langue='+langue+'&id_candidat='+id_candidat+'&page='+page,'popup'+id_candidat,'height=600,toolbar=yes,location=yes,directories=yes,status=yes,width=800,resizable=yes,scrollbars=yes,fullscreen=no');
}


function modif_tache(id_tache,langue,page)
{
	window.open('modules/entreprise/saisie_tache.php?langue='+langue+'&id_tache='+id_tache+'&page='+page,'popup'+id_tache,'height=600,toolbar=no,location=no,directories=no,status=no,width=800,resizable=yes,scrollbars=yes,fullscreen=no');
}

function tri_cv_candidat(value_select)
{
	document.frm_tri.tri_cv.value=value_select;
	document.frm_tri.tri_cv2.value=value_select;
	document.frm_tri.submit();	
}

function short_list_ent(value_select)
{
		document.frm_short_list_ent.flag_id_list2.value=value_select;
		document.frm_short_list_ent.submit();
}

function profil_ent(value_select)
{
		document.frm_profil.id_list.value=value_select;
		document.frm_profil.submit();
}

function modifier_statut_id_ref(value_select)
{
		document.frm_profil.id_ref.value=value_select;
		document.frm_profil.submit();
}

function tri_cv_offre_candidat(value_select)
{
	document.frm_tri_offre.tri_cv_offre.value=value_select;
	document.frm_tri_offre.submit();	
}

function tri_perPage(value_select)
{
	document.frm_perPage.perPage.value=value_select;
	document.frm_perPage.submit();	
}

function afficher_cv_offre_candidat(value_select)
{
	document.frm_aff_offre.suivi.value=value_select;
	document.frm_aff_offre.submit();	
}

function afficher_cv_actif_candidat(value_select)
{
	document.frm_aff_cv.actif.value=value_select;
	document.frm_aff_cv.actif2.value=value_select;
	document.frm_aff_cv.submit();	
}

function afficher_msg_mail(id_mail)
{
	document.frmMail.id_mail.value=id_mail;
	document.frmMail.submit();	
}

function afficher_req(id_req)
{
	document.frm_req.id_req.value=id_req;
	document.frm_req.submit();	
}

function afficher_msg_mail_multiple(id_mail)
{
	document.frmMail.id_mail.value=id_mail;
	document.frmMail.submit();	
}


function tri_offre_entreprise(value_select)
{
	document.frm_offre.tri_offre.value=value_select;
	document.frm_offre.submit();	
}

function tri_entreprise(value_select)
{
	document.frm_ent.tri_ent.value=value_select;
	document.frm_ent.submit();	
}

function tri_recruteur(value_select)
{
	document.frm_ent.tri_contact.value=value_select;
	document.frm_ent.submit();	
}


function modif_contact_admin(id_contact,langue,acces_page,id_offre)
{
	//window.location.href="index.php?langue="+langue+"&module=entreprise&action=gererProfilEntreprise&id_contact="+id_contact;
	window.location.href="modules/admin/acces_contact.php?langue="+langue+"&acces_page="+acces_page+"&id_contact="+id_contact+"&idOffre="+id_offre;
}

function modif_rve_admin(id_rve,langue)
{
	//window.location.href="index.php?langue="+langue+"&module=entreprise&action=gererProfilEntreprise&id_contact="+id_contact;
	window.location.href="modules/admin/modif_rve.php?langue="+langue+"&id_rve="+id_rve;
}

function modif_client(id_client,langue)
{
	//window.location.href="index.php?langue="+langue+"&module=entreprise&action=gererProfilEntreprise&id_contact="+id_contact;
	window.location.href="index.php?module=entreprise&action=modif_client&langue="+langue+"&id_client="+id_client;
}

function modif_client_ajax(id_client,langue,div)
{
	//window.location.href="index.php?langue="+langue+"&module=entreprise&action=gererProfilEntreprise&id_contact="+id_contact;
	//window.location.href="index.php?module=entreprise&action=modif_client&langue="+langue+"&id_client="+id_client;
	
	envoieRequete('modules/entreprise/modif_client_popup.php?id_client='+id_client+'&langue='+langue+'&page=liste_client',div);
	
	refresh_grid('','gridbox','');		
}

function modif_client_popup(id_entreprise,langue)
{
	//window.location.href="index.php?langue="+langue+"&module=entreprise&action=gererProfilEntreprise&id_contact="+id_contact;
	//window.location.href="index.php?module=entreprise&action=modif_client&langue="+langue+"&id_client="+id_client;
	window.open('modules/entreprise/modif_client_popup.php?langue='+langue+'&id_entreprise='+id_entreprise+'&url_retour=popup2','popup'+id_entreprise,'height=600,toolbar=no,location=no,directories=no,status=no,width=800,resizable=yes,scrollbars=yes,fullscreen=no');
}

function modif_client_popup2(id_client,langue)
{
	//window.location.href="index.php?langue="+langue+"&module=entreprise&action=gererProfilEntreprise&id_contact="+id_contact;
	//window.location.href="index.php?module=entreprise&action=modif_client&langue="+langue+"&id_client="+id_client;
	window.open('modules/entreprise/modif_client_popup.php?langue='+langue+'&id_client='+id_client+'&url_retour=popup2','popup'+id_client,'height=600,toolbar=no,location=no,directories=no,status=no,width=800,resizable=yes,scrollbars=yes,fullscreen=no');
}

function modif_entreprise(id_entreprise,langue)
{
	//window.location.href="index.php?langue="+langue+"&module=entreprise&action=gererProfilEntreprise&id_contact="+id_contact;
	//window.location.href="modules/entreprise/modif_entreprise.php?langue="+langue+"&id_entreprise="+id_entreprise;
	window.open('modules/entreprise/modif_entreprise.php?langue='+langue+'&id_entreprise='+id_entreprise+'','popup'+id_entreprise,'height=600,toolbar=no,location=no,directories=no,status=no,width=800,resizable=yes,scrollbars=yes,fullscreen=no');
}

function modif_prestation(id_prestation,langue)
{
	window.open('modules/entreprise/modif_prestation.php?langue='+langue+'&id_prestation=','popup'+id_prestation,'height=800,toolbar=no,location=no,directories=no,status=yes,width=1000,resizable=yes,scrollbars=yes')
}

function client2_contacts(id_client,langue)
{
	window.open('modules/entreprise/client2_contacts.php?langue='+langue+'&id_client='+id_client+'','popup'+id_client,'height=800,toolbar=no,location=no,directories=no,status=yes,width=1000,resizable=yes,scrollbars=yes')
}

function contact_client2s(id_contact,langue)
{
	window.open('modules/entreprise/contact_client2s.php?langue='+langue+'&id_contact='+id_contact+'','popup'+id_contact,'height=800,toolbar=no,location=no,directories=no,status=yes,width=1000,resizable=yes,scrollbars=yes')
}

function modif_client2(id_client,langue)
{
	//window.location.href="index.php?langue="+langue+"&module=entreprise&action=gererProfilEntreprise&id_contact="+id_contact;
	window.location.href="index.php?module=entreprise&action=modif_client2&langue="+langue+"&id_client="+id_client;
}

function modif_client3(id_client,langue)
{
	//window.location.href="index.php?langue="+langue+"&module=entreprise&action=gererProfilEntreprise&id_contact="+id_contact;
	window.location.href="index.php?module=entreprise&action=modif_client3&langue="+langue+"&id_client="+id_client;
}

/*
function modif_contact_admin(id_contact,langue)
{
	window.location.href="index.php?langue="+langue+"&module=entreprise&action=gererProfilEntreprise&id_contact="+id_contact;
}	
*/

function affiche_offre_direct(CATEGORIE_TITRE_OFFRE,INTITULE_OFFRE,langue)
{
	window.location.href="index.php?langue="+langue+"&module=offre&action=consulterOffre&CATEGORIE_TITRE_OFFRE="+CATEGORIE_TITRE_OFFRE+"&INTITULE_OFFRE="+INTITULE_OFFRE+"&auto_exec=1";

}	

function affiche_cv_direct(CATEGORIE_TITRE_CANDIDAT,TITRE_CANDIDAT ,langue)
{
	
	window.location.href="modules/entreprise/session_recherche.php?langue="+langue+"&sess_ent_categorie_titre_candidat[]="+CATEGORIE_TITRE_CANDIDAT+"&sess_ent_titre_candidat="+TITRE_CANDIDAT+"&id_list=-";
}	

function affiche_offre_direct2(CATEGORIE_TITRE_OFFRE,INTITULE_OFFRE,langue)
{
	
	//window.location.href="modules/entreprise/session_recherche.php?langue="+langue+"&sess_ent_categorie_titre_candidat[]="+CATEGORIE_TITRE_CANDIDAT+"&sess_ent_titre_candidat="+TITRE_CANDIDAT+"&id_list=-";
	//window.location.href="index.php?langue="+langue+"&module=offre&action=consulterOffre&CATEGORIE_TITRE_OFFRE="+CATEGORIE_TITRE_OFFRE+"&INTITULE_OFFRE="+INTITULE_OFFRE+"&auto_exec=1";
	
	window.location.href="index.php?module=entreprise&action=liste_offre&langue="+langue+"&categorie_titre_offre="+CATEGORIE_TITRE_OFFRE+"&active_offre=oui&sess=ok";
}	

function affiche_profil_direct(id_candidat ,langue)
{
	
	window.location.href="modules/entreprise/session_recherche.php?langue="+langue+"&sess_ent_id_candidat="+id_candidat;
}	
function affiche_dossier(id_candidat ,langue)
{
	
	window.location.href="../../modules/entreprise/session_recherche.php?langue="+langue+"&sess_ent_id_candidat="+id_candidat;
}	

function affiche_dossier2(id_candidat)
{
	document.frm_dossier_.sess_ent_id_candidat.value=id_candidat;
	document.frm_dossier_.submit();	
}

function charge_sous_categ(nom_form,nom_element,langue,page)
{
	
	for(var i=0; i<document.forms[nom_form].elements[nom_element].length; i++)
	{
		if(document.forms[nom_form].elements[nom_element].options[i].selected){
			nom_categ = document.forms[nom_form].elements[nom_element].options[i].value;
			break;
		}
	}
	if(page=="infosGeneralesCandidatVide"){
		var annee_naissance					= "&annee_naissance="+document.forms[nom_form].elements['annee_naissance'].value;
		var mois_naissance					= "&mois_naissance="+document.forms[nom_form].elements['mois_naissance'].value;
		var jour_naissance					= "&jour_naissance="+document.forms[nom_form].elements['jour_naissance'].value;
		var nom_candidat					= "&nom_candidat="+document.forms[nom_form].elements['nom_candidat'].value;
		var prenom_candidat					= "&prenom_candidat="+document.forms[nom_form].elements['prenom_candidat'].value;
		var ville_candidat					= "&ville_candidat="+document.forms[nom_form].elements['ville_candidat'].value;
		var adresse_candidat				= "&adresse_candidat="+document.forms[nom_form].elements['adresse_candidat'].value;
		var civilite_candidat				= "&civilite_candidat="+document.forms[nom_form].elements['civilite_candidat'].value;
		var email_candidat					= "&email_candidat="+document.forms[nom_form].elements['email_candidat'].value;
		var code_postal_candidat			= "&code_postal_candidat="+document.forms[nom_form].elements['code_postal_candidat'].value;
		var telephone_candidat				= "&telephone_candidat="+document.forms[nom_form].elements['telephone_candidat'].value;
		var mobile_candidat					= "&mobile_candidat="+document.forms[nom_form].elements['mobile_candidat'].value;
		var telecopie_candidat				= "&telecopie_candidat="+document.forms[nom_form].elements['telecopie_candidat'].value;
		var site_web_candidat				= "&site_web_candidat="+document.forms[nom_form].elements['site_web_candidat'].value;
		var niveau_etudes_candidat			= "&niveau_etudes_candidat="+document.forms[nom_form].elements['niveau_etudes_candidat'].value;	
		var permis_voiture_candidat			= "&permis_voiture_candidat="+document.forms[nom_form].elements['permis_voiture_candidat'].value;
		var situation_candidat				= "&situation_candidat="+document.forms[nom_form].elements['situation_candidat'].value;
			
		var login_candidat					= "&login_candidat="+document.forms[nom_form].elements['login_candidat'].value;
		var password_candidat				= "&password_candidat="+document.forms[nom_form].elements['password_candidat'].value;
		var region_candidat					= "&region_candidat="+document.forms[nom_form].elements['region_candidat'].value;		
		var pays_candidat					= "&pays_candidat="+document.forms[nom_form].elements['pays_candidat'].value;			
		if(document.forms[nom_form].elements['cacher_infos_perso_candidat'].checked == true){
			var cacher_infos_perso_candidat		= "&cacher_infos_perso_candidat=hidden";
		}else{
			var cacher_infos_perso_candidat		= "&cacher_infos_perso_candidat=visible";
		}		
		
		var url_cand = annee_naissance+mois_naissance+jour_naissance+nom_candidat+prenom_candidat+ville_candidat+adresse_candidat+civilite_candidat+email_candidat+code_postal_candidat+telephone_candidat+mobile_candidat+telecopie_candidat+site_web_candidat+niveau_etudes_candidat+permis_voiture_candidat+situation_candidat+date_disponibilite_candidat+nb_annee_experience_candidat+objectif_candidat+login_candidat+password_candidat+region_candidat+pays_candidat+cacher_infos_perso_candidat;
		window.location.href="index.php?langue="+langue+"&module=candidat&action="+page+"&categorie_titre_candidat="+nom_categ+url_cand;
	}else if(page=="infosGeneralesCandidat"){
		var annee_naissance					= "&annee_naissance="+document.forms[nom_form].elements['annee_naissance'].value;
		var mois_naissance					= "&mois_naissance="+document.forms[nom_form].elements['mois_naissance'].value;
		var jour_naissance					= "&jour_naissance="+document.forms[nom_form].elements['jour_naissance'].value;
		var nom_candidat					= "&nom_candidat="+document.forms[nom_form].elements['nom_candidat'].value;
		var prenom_candidat					= "&prenom_candidat="+document.forms[nom_form].elements['prenom_candidat'].value;
		var ville_candidat					= "&ville_candidat="+document.forms[nom_form].elements['ville_candidat'].value;
		var adresse_candidat				= "&adresse_candidat="+document.forms[nom_form].elements['adresse_candidat'].value;
		var civilite_candidat				= "&civilite_candidat="+document.forms[nom_form].elements['civilite_candidat'].value;
		var email_candidat					= "&email_candidat="+document.forms[nom_form].elements['email_candidat'].value;
		var code_postal_candidat			= "&code_postal_candidat="+document.forms[nom_form].elements['code_postal_candidat'].value;
		var telephone_candidat				= "&telephone_candidat="+document.forms[nom_form].elements['telephone_candidat'].value;
		var mobile_candidat					= "&mobile_candidat="+document.forms[nom_form].elements['mobile_candidat'].value;
		var telecopie_candidat				= "&telecopie_candidat="+document.forms[nom_form].elements['telecopie_candidat'].value;
		var site_web_candidat				= "&site_web_candidat="+document.forms[nom_form].elements['site_web_candidat'].value;
		var niveau_etudes_candidat			= "&niveau_etudes_candidat="+document.forms[nom_form].elements['niveau_etudes_candidat'].value;	
		var permis_voiture_candidat			= "&permis_voiture_candidat="+document.forms[nom_form].elements['permis_voiture_candidat'].value;
		var situation_candidat				= "&situation_candidat="+document.forms[nom_form].elements['situation_candidat'].value;		
		var region_candidat					= "&region_candidat="+document.forms[nom_form].elements['region_candidat'].value;		
		var pays_candidat					= "&pays_candidat="+document.forms[nom_form].elements['pays_candidat'].value;
		if(document.forms[nom_form].elements['cacher_infos_perso_candidat'].checked == true){
			var cacher_infos_perso_candidat		= "&cacher_infos_perso_candidat=hidden";
		}else{
			var cacher_infos_perso_candidat		= "&cacher_infos_perso_candidat=visible";
		}
		
		
		var url_cand = annee_naissance+mois_naissance+jour_naissance+nom_candidat+prenom_candidat+ville_candidat+adresse_candidat+civilite_candidat+email_candidat+code_postal_candidat+telephone_candidat+mobile_candidat+telecopie_candidat+site_web_candidat+niveau_etudes_candidat+permis_voiture_candidat+situation_candidat+region_candidat+pays_candidat+cacher_infos_perso_candidat;
		window.location.href="index.php?langue="+langue+"&module=candidat&action="+page+"&categorie_titre_candidat="+nom_categ+url_cand;
	}else if(page=="consulterOffre"){
		var REGION_OFFRE					= "&REGION_OFFRE="+document.forms[nom_form].elements['REGION_OFFRE'].value;
		var NIVEAU_QUALIFICATION_OFFRE		= "&NIVEAU_QUALIFICATION_OFFRE="+document.forms[nom_form].elements['NIVEAU_QUALIFICATION_OFFRE'].value;
		var TYPE_CONTRAT_OFFRE				= "&TYPE_CONTRAT_OFFRE="+document.forms[nom_form].elements['TYPE_CONTRAT_OFFRE'].value;
		var competenceOffre					= "&competenceOffre="+document.forms[nom_form].elements['competenceOffre'].value;
		
		var url_cand = REGION_OFFRE+NIVEAU_QUALIFICATION_OFFRE+TYPE_CONTRAT_OFFRE+competenceOffre;
		
		window.location.href="index.php?langue="+langue+"&module=public&action="+page+"&CATEGORIE_TITRE_OFFRE="+nom_categ+url_cand;
	}else if(page=="gererOffre"){

		var toto = document.forms[nom_form].elements['description_offre'].value;
		var titi = toto.replace('\n','<br />');
		alert(titi);
		var description_offre 			= "&description_offre="+document.forms[nom_form].elements['description_offre'].value;
		var reference_offre 			= "&reference_offre="+document.forms[nom_form].elements['reference_offre'].value;
		var intitule_offre 				= "&intitule_offre="+document.forms[nom_form].elements['intitule_offre'].value;
		var lieu_offre 					= "&lieu_offre="+document.forms[nom_form].elements['lieu_offre'].value;
		var type_offre 					= "&type_offre="+document.forms[nom_form].elements['type_offre'].value;
		var recup_type_contrat 			= "&recup_type_contrat="+document.forms[nom_form].elements['type_contrat'].value;
		var annee_debut 				= "&annee_debut="+document.forms[nom_form].elements['annee_debut'].value;
		var jour_debut 					= "&jour_debut="+document.forms[nom_form].elements['jour_debut'].value;
		var mois_debut 					= "&mois_debut="+document.forms[nom_form].elements['mois_debut'].value;
		
		var profil_candidat_offre 		= "&profil_candidat_offre="+document.forms[nom_form].elements['profil_candidat_offre'].value;
		var salaire_min_offre 			= "&salaire_min_offre="+document.forms[nom_form].elements['salaire_min_offre'].value;
		var salaire_max_offre 			= "&salaire_max_offre="+document.forms[nom_form].elements['salaire_max_offre'].value;
		var recup_type_region 			= "&recup_type_region="+document.forms[nom_form].elements['region_offre'].value;
		var recup_niveau_qualification 	= "&recup_niveau_qualification="+document.forms[nom_form].elements['niveau_qualification'].value;	
		var id_offre                 	= "&id_offre="+document.forms[nom_form].elements['id_offre'].value;
		var ajout_offre                 = "&ajout_offre="+document.forms[nom_form].elements['ajout_offre'].value;
		var pays_offre                 	= "&pays_offre="+document.forms[nom_form].elements['pays_offre'].value;
		

		var url_cand = reference_offre+intitule_offre+lieu_offre+type_offre+recup_type_contrat+annee_debut+jour_debut+mois_debut+description_offre+profil_candidat_offre+salaire_min_offre+salaire_max_offre+recup_type_region+recup_niveau_qualification+id_offre+ajout_offre+pays_offre;
		
		window.location.href="index.php?langue="+langue+"&module=entreprise&action="+page+"&categorie_titre_offre="+nom_categ+url_cand;
	}else if(page=="consulterCv"){
		var NIVEAU_ETUDES_CANDIDAT					= "&NIVEAU_ETUDES_CANDIDAT="+document.forms[nom_form].elements['NIVEAU_ETUDES_CANDIDAT'].value;
		var NB_ANNEE_EXPERIENCE_CANDIDAT		= "&NB_ANNEE_EXPERIENCE_CANDIDAT="+document.forms[nom_form].elements['NB_ANNEE_EXPERIENCE_CANDIDAT'].value;
		var competenceCv					= "&competenceCv="+document.forms[nom_form].elements['competenceCv'].value;
		
		var url_cand = NIVEAU_ETUDES_CANDIDAT+NB_ANNEE_EXPERIENCE_CANDIDAT+competenceCv;
		
		window.location.href="index.php?langue="+langue+"&module=entreprise&action="+page+"&CATEGORIE_TITRE_CANDIDAT="+nom_categ+url_cand;
	}else if(page=="listeCandidatAdmin"){
		var NIVEAU_ETUDES_CANDIDAT					= "&NIVEAU_ETUDES_CANDIDAT="+document.forms[nom_form].elements['NIVEAU_ETUDES_CANDIDAT'].value;
		var NB_ANNEE_EXPERIENCE_CANDIDAT		= "&NB_ANNEE_EXPERIENCE_CANDIDAT="+document.forms[nom_form].elements['NB_ANNEE_EXPERIENCE_CANDIDAT'].value;
		var competenceCv					= "&competenceCv="+document.forms[nom_form].elements['competenceCv'].value;
		
		var url_cand = NIVEAU_ETUDES_CANDIDAT+NB_ANNEE_EXPERIENCE_CANDIDAT+competenceCv;
		
		window.location.href="index.php?langue="+langue+"&module=admin&action="+page+"&CATEGORIE_TITRE_CANDIDAT="+nom_categ+url_cand;
	}else if(page=="listeOffreAdmin"){
		var REGION_OFFRE					= "&REGION_OFFRE="+document.forms[nom_form].elements['REGION_OFFRE'].value;
		var NIVEAU_QUALIFICATION_OFFRE		= "&NIVEAU_QUALIFICATION_OFFRE="+document.forms[nom_form].elements['NIVEAU_QUALIFICATION_OFFRE'].value;
		var TYPE_CONTRAT_OFFRE				= "&TYPE_CONTRAT_OFFRE="+document.forms[nom_form].elements['TYPE_CONTRAT_OFFRE'].value;
		var competenceOffre					= "&competenceOffre="+document.forms[nom_form].elements['competenceOffre'].value;
		
		var url_cand = REGION_OFFRE+NIVEAU_QUALIFICATION_OFFRE+TYPE_CONTRAT_OFFRE+competenceOffre;
		
		window.location.href="index.php?langue="+langue+"&module=admin&action="+page+"&CATEGORIE_TITRE_OFFRE="+nom_categ+url_cand;
	}else if(page=="nouveau_candidat"){
		var annee_naissance					= "&annee_naissance="+document.forms[nom_form].elements['annee_naissance'].value;
		var mois_naissance					= "&mois_naissance="+document.forms[nom_form].elements['mois_naissance'].value;
		var jour_naissance					= "&jour_naissance="+document.forms[nom_form].elements['jour_naissance'].value;
		var nom_candidat					= "&nom_candidat="+document.forms[nom_form].elements['nom_candidat'].value;
		var prenom_candidat					= "&prenom_candidat="+document.forms[nom_form].elements['prenom_candidat'].value;
		var ville_candidat					= "&ville_candidat="+document.forms[nom_form].elements['ville_candidat'].value;
		var adresse_candidat				= "&adresse_candidat="+document.forms[nom_form].elements['adresse_candidat'].value;
		var civilite_candidat				= "&civilite_candidat="+document.forms[nom_form].elements['civilite_candidat'].value;
		var email_candidat					= "&email_candidat="+document.forms[nom_form].elements['email_candidat'].value;
		var code_postal_candidat			= "&code_postal_candidat="+document.forms[nom_form].elements['code_postal_candidat'].value;
		var telephone_candidat				= "&telephone_candidat="+document.forms[nom_form].elements['telephone_candidat'].value;
		var mobile_candidat					= "&mobile_candidat="+document.forms[nom_form].elements['mobile_candidat'].value;
		var telecopie_candidat				= "&telecopie_candidat="+document.forms[nom_form].elements['telecopie_candidat'].value;
		var site_web_candidat				= "&site_web_candidat="+document.forms[nom_form].elements['site_web_candidat'].value;
		var niveau_etudes_candidat			= "&niveau_etudes_candidat="+document.forms[nom_form].elements['niveau_etudes_candidat'].value;	
		var permis_voiture_candidat			= "&permis_voiture_candidat="+document.forms[nom_form].elements['permis_voiture_candidat'].value;
		var situation_candidat				= "&situation_candidat="+document.forms[nom_form].elements['situation_candidat'].value;
			
		var date_disponibilite_candidat		= "&date_disponibilite_candidat="+document.forms[nom_form].elements['date_disponibilite_candidat'].value;
		var nb_annee_experience_candidat	= "&nb_annee_experience_candidat="+document.forms[nom_form].elements['nb_annee_experience_candidat'].value;
		var objectif_candidat				= "&objectif_candidat="+document.forms[nom_form].elements['objectif_candidat'].value;
		var login_candidat					= "&login_candidat="+document.forms[nom_form].elements['login_candidat'].value;
		var password_candidat				= "&password_candidat="+document.forms[nom_form].elements['password_candidat'].value;
		var region_candidat					= "&region_candidat="+document.forms[nom_form].elements['region_candidat'].value;		
		var pays_candidat					= "&pays_candidat="+document.forms[nom_form].elements['pays_candidat'].value;			
		if(document.forms[nom_form].elements['cacher_infos_perso_candidat'].checked == true){
			var cacher_infos_perso_candidat		= "&cacher_infos_perso_candidat=hidden";
		}else{
			var cacher_infos_perso_candidat		= "&cacher_infos_perso_candidat=visible";
		}		
		
		var url_cand = annee_naissance+mois_naissance+jour_naissance+nom_candidat+prenom_candidat+ville_candidat+adresse_candidat+civilite_candidat+email_candidat+code_postal_candidat+telephone_candidat+mobile_candidat+telecopie_candidat+site_web_candidat+niveau_etudes_candidat+permis_voiture_candidat+situation_candidat+date_disponibilite_candidat+nb_annee_experience_candidat+objectif_candidat+login_candidat+password_candidat+region_candidat+pays_candidat+cacher_infos_perso_candidat;
		window.location.href="index.php?langue="+langue+"&module=admin&action="+page+"&categorie_titre_candidat="+nom_categ+url_cand;		
	}
	
}

function affiche_stat(format_stat,langue,mode_recrut)
{
	alerte(document.form_identification.chk_niveau_etude.checked)
	//document.form_identification.format_stat.value=format;
	//document.form_identification.submit();
	if(document.form_identification.chk_niveau_etude.checked==true){
		var chk_niveau_etude 			= "ok";
	}else{
		var chk_niveau_etude 			= "ko";
	}
	if(document.form_identification.chk_nb_an_experience.checked==true){
		var chk_nb_an_experience 			= "ok";
	}else{
		var chk_nb_an_experience 			= "ko";	
	}
	/*
	if(document.form_identification.chk_code_postal.checked==true){
		var chk_code_postal 			= "ok";
	}else{
		var chk_code_postal 			= "ko";	
	}
	*/
	if(document.form_identification.chk_age.checked==true){
		var chk_age 			= "ok";
	}else{
		var chk_age 			= "ko";	
	}
	/*
	if(document.form_identification.chk_cand_titre.checked==true){
		var chk_cand_titre 			= "ok";
	}else{
		var chk_cand_titre 			= "ko";
	}
	*/
	if(document.form_identification.chk_cand_civilite.checked==true){
		var chk_cand_civilite 			= "ok";
	}else{
		var chk_cand_civilite 			= "ko";
	}
	if(document.form_identification.chk_cand_secteur_act.checked==true){
		var chk_cand_secteur_act 			= "ok";
	}else{
		var chk_cand_secteur_act 			= "ko";
	}	
	if(document.form_identification.chk_cand_region.checked==true){
		var chk_cand_region 			= "ok";
	}else{
		var chk_cand_region 			= "ko";
	}	
	if(document.form_identification.chk_cand_pays.checked==true){
		var chk_cand_pays 			= "ok";
	}else{
		var chk_cand_pays 			= "ko";
	}		
	if(document.form_identification.chk_cand_permis.checked==true){
		var chk_cand_permis 			= "ok";
	}else{
		var chk_cand_permis 			= "ko";
	}	
	if(document.form_identification.chk_cand_situation.checked==true){
		var chk_cand_situation 			= "ok";
	}else{
		var chk_cand_situation 			= "ko";
	}					
	if(document.form_identification.chk_cand_dispo.checked==true){
		var chk_cand_dispo 			= "ok";
	}else{
		var chk_cand_dispo 			= "ko";
	}		
	if(document.form_identification.chk_cand_niv_exp.checked==true){
		var chk_cand_niv_exp 			= "ok";
	}else{
		var chk_cand_niv_exp 			= "ko";
	}								

		
	if(mode_recrut=="non"){
		/*
		if(document.form_identification.chk_contact_code_postal.checked==true){
			var chk_contact_code_postal 			= "ok";
		}else{
			var chk_contact_code_postal 			= "ko";
		}
		*/
		if(document.form_identification.chk_contact_taille.checked==true){
			var chk_contact_taille 			= "ok";
		}else{
			var chk_contact_taille 			= "ko";
		}
		if(document.form_identification.chk_contact_activite.checked==true){
			var chk_contact_activite 			= "ok";
		}else{
			var chk_contact_activite 			= "ko";
		}
	}else{
		///var chk_contact_code_postal 			= "ko";	
		var chk_contact_taille 			= "ko";
		var chk_contact_activite 			= "ko";
	}
	/*
	if(document.form_identification.chk_offre_type.checked==true){
		var chk_offre_type 			= "ok";
	}else{
		var chk_offre_type 			= "ko";
	}
	if(document.form_identification.chk_offre_region.checked==true){
		var chk_offre_region 			= "ok";
	}else{
		var chk_offre_region 			= "ko";
	}
	
	if(document.form_identification.chk_offre_intitule.checked==true){
		var chk_offre_intitule 			= "ok";
	}else{
		var chk_offre_intitule 			= "ko";
	}
	
	if(document.form_identification.chk_offre_type_contrat.checked==true){
		var chk_offre_type_contrat 			= "ok";
	}else{
		var chk_offre_type_contrat 			= "ko";
	}	
	*/
	
	
	if(format_stat=="html"){
		window.open('modules/admin/affiche_statistique.php?chk_offre_type_contrat='+chk_offre_type_contrat+'&chk_offre_region='+chk_offre_region+'&chk_offre_type='+chk_offre_type+'&chk_contact_activite='+chk_contact_activite+'&chk_contact_taille='+chk_contact_taille+'&langue='+langue+'&format_stat='+format_stat+'&chk_niveau_etude='+chk_niveau_etude+'&chk_nb_an_experience='+chk_nb_an_experience+'&chk_age='+chk_age+'&chk_cand_civilite='+chk_cand_civilite+'&chk_cand_secteur_act='+chk_cand_secteur_act+'&chk_cand_region='+chk_cand_region+'&chk_cand_pays='+chk_cand_pays+'&chk_cand_permis='+chk_cand_permis+'&chk_cand_situation='+chk_cand_situation+'&chk_cand_dispo='+chk_cand_dispo+'&chk_cand_niv_exp='+chk_cand_niv_exp+'','popup','height=600,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
	}else if(format_stat=="excel"){
		//window.open('writeexcel/excel_statistique.php?chk_offre_type_contrat='+chk_offre_type_contrat+'&chk_offre_intitule='+chk_offre_intitule+'&chk_offre_region='+chk_offre_region+'&chk_offre_type='+chk_offre_type+'&chk_contact_activite='+chk_contact_activite+'&chk_contact_taille='+chk_contact_taille+'&chk_contact_code_postal='+chk_contact_code_postal+'&chk_cand_titre='+chk_cand_titre+'&langue='+langue+'&format_stat='+format+'&chk_niveau_etude='+chk_niveau_etude+'&chk_nb_an_experience='+chk_nb_an_experience+'&chk_code_postal='+chk_code_postal+'&chk_age='+chk_age+'','popup','height=600,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
		//window.location.target="_blank"
		//window.location.href='writeexcel/excel_statistique.php?chk_offre_type_contrat='+chk_offre_type_contrat+'&chk_offre_intitule='+chk_offre_intitule+'&chk_offre_region='+chk_offre_region+'&chk_offre_type='+chk_offre_type+'&chk_contact_activite='+chk_contact_activite+'&chk_contact_taille='+chk_contact_taille+'&chk_contact_code_postal='+chk_contact_code_postal+'&chk_cand_titre='+chk_cand_titre+'&langue='+langue+'&format_stat='+format+'&chk_niveau_etude='+chk_niveau_etude+'&chk_nb_an_experience='+chk_nb_an_experience+'&chk_code_postal='+chk_code_postal+'&chk_age='+chk_age
		//window.open('writeexcel/excel_statistique.php?chk_offre_type_contrat='+chk_offre_type_contrat+'&chk_offre_intitule='+chk_offre_intitule+'&chk_offre_region='+chk_offre_region+'&chk_offre_type='+chk_offre_type+'&chk_contact_activite='+chk_contact_activite+'&chk_contact_taille='+chk_contact_taille+'&chk_contact_code_postal='+chk_contact_code_postal+'&chk_cand_titre='+chk_cand_titre+'&langue='+langue+'&chk_niveau_etude='+chk_niveau_etude);
		document.form_identification.action = "writeexcel/excel_statistique.php";
		document.form_identification.format_stat.value=format_stat;
		document.form_identification.submit();		
	}else if(format_stat=="pdf"){
		document.form_identification.action = "modules/admin/affiche_statistique.php";
		document.form_identification.format_stat.value=format_stat;
		document.form_identification.submit();			
		//window.open('modules/admin/affiche_statistique.php?chk_offre_type_contrat='+chk_offre_type_contrat+'&chk_offre_intitule='+chk_offre_intitule+'&chk_offre_region='+chk_offre_region+'&chk_offre_type='+chk_offre_type+'&chk_contact_activite='+chk_contact_activite+'&chk_contact_taille='+chk_contact_taille+'&chk_contact_code_postal='+chk_contact_code_postal+'&chk_cand_titre='+chk_cand_titre+'&langue='+langue+'&format_stat='+format_stat+'&chk_niveau_etude='+chk_niveau_etude+'&chk_nb_an_experience='+chk_nb_an_experience+'&chk_code_postal='+chk_code_postal+'&chk_age='+chk_age+'','popup','height=600,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes')
	}
}


/*
function affiche_stat_pdf(format)
{
	document.frm_gen_stat.format_stat.value=format;
	document.frm_gen_stat.submit();
}
*/


function affiche_popup(langue,format)
{
	//document.frm_gen_stat.format_stat.value=format;
	window.open('modules/admin/affiche_statistique.php?langue='+langue+'&format='+format+'','popup','height=310,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=no,scrollbars=yes')
}	


function verifFormLettre(){
	var titre_lettre=document.form_lettre.titre_lettre.value;
	var contenu_lettre=document.form_lettre.contenu_lettre.value;
	var chainealert="vous n'avez pas rempli le champ obligatoire : \n---\nyou did not fill the obligatory field ";
	
	var test=0;
	if(titre_lettre==""){
		chainealert=chainealert+" Titre de la lettre \n---\nTitrate letter ";
		test=1;
	}else if(contenu_lettre==""){
		chainealert=chainealert+" Contenu de la lettre \n---\nContents of the letter";
		test=1;
	}
	if (test==1){
		alert(chainealert);
		return false;
	}else{
		return true;
	}
}

function verif_frm_table(){
	var administrateur			= document.frm_etape_2.administrateur.value;
	var competence				= document.frm_etape_2.competence.value;
	var contact					= document.frm_etape_2.contact.value;
	var candidat				= document.frm_etape_2.candidat.value;
	var formation				= document.frm_etape_2.formation.value;
	var langue					= document.frm_etape_2.langue.value;
	var mission					= document.frm_etape_2.mission.value;
	var modeliser				= document.frm_etape_2.modeliser.value;
	var offre					= document.frm_etape_2.offre.value;
	var rubrique				= document.frm_etape_2.rubrique.value;
	var lettre					= document.frm_etape_2.lettre.value;
	
	var chainealert="Toutes les tables doivent etre renseignées : \n---\nAll the tables must be indicated :";
	
	var test=0;
	if( administrateur=="" ||  competence=="" || contact=="" || candidat=="" || formation=="" || langue=="" || formation==""  || mission=="" || modeliser=="" || offre=="" ||  rubrique=="" || lettre==""){
		
		chainealert=chainealert;
		test=1;
	}
	if (test==1){
		alert(chainealert);
		return false;
	}else{
		return true;
	}
}

function verifMail(a) 
{
	testm = false ;
	for (var j=1 ; j<(a.length) ; j++) 
	{
		if (a.charAt(j)=='@') 
		{ 
			if (j<(a.length-4))
			{ 
				for (var k=j ; k<(a.length-2) ; k++) 
				{ 
					if (a.charAt(k)=='.') testm = true; 
				} 
			} 
		} 
	} 
	
	if (testm==false) alert('Votre adresse e-mail est incorrecte. \n---\nYour address e-mail is incorrect.'); 
	
	return testm ; 
}

function verifLongeurChaine(a)
{
	//testm = false ;
	if(a.length < 35)
	{
		testm = true; 
	}else 
	{
		testm = false ;
	}
	if (testm==false) alert("Le texte ne peut excéder 35 caractères ! \n---\nThe text cannot exceed 35 characters !");
	return testm ; 
}

function trim(string) 
{
	return string.replace(/(^\s*)|(\s*$)/g,''); 
}

function verifAfficheMail(){

	var sujet_mail 	= document.frm_envoi_mail.sujet_mail2.value;
	var desc_mail 	= document.frm_envoi_mail.desc_mail.value;
	var to_mail 	= document.frm_envoi_mail.to_mail.value;
	var email 		= document.frm_envoi_mail.email.value;
	var result 		= true;
	

	result =  verifMail(email);

	if(sujet_mail=="" ){
		alert("Saisissez un sujet \n---\nSeize a subject");
		result =  false;
	}
	if(to_mail=="" ){
		alert("Saisissez un expéditeur \n---\nSeize a subject");
		result =  false;
	}	
	/*
	if(desc_mail=="" ){
		alert("Saisissez une description \n---\nSeize a description");
		result =  false;
	}	
	*/
	

	return result;
}

function verif_telephone(nom_element){
  var s;
  for(var i = 0; i < nom_element.length; i++)
  {

    // le caractuel est stocké dans s.
    s = nom_element.charAt(i);

    // Caractères valides : espace, parenthèses, "(" et ")".
    if( !((s >= 0) && (s <= 9))
     && (s != '(') && (s != ')')
     )
    {
      return(false);
    }
  }
}

var body_bgcolor;
var body_bg_img = "http://eur.i1.yimg.com/us.yimg.com";
var body_text;         
var lt_bgcolor;        
var head_bgcolor;      
var head_text_color;   
var subhead_bgcolor;   
var subhead_text_color;
var body_alink;        
var body_vlink;        
var body_text;         
var head_text_face;   
var head_text_size;
var subhead_text_face;
var subhead_text_size;

function initVars()
{
  body_bgcolor       = getRadioValue('.body_bgcolor'); 
  body_text          = getRadioValue('.body_text'); 
  lt_bgcolor         = getRadioValue('.lt_bgcolor'); 
  head_bgcolor       = getRadioValue('.head_bgcolor'); 
  head_text_color    = getRadioValue('.head_text_color'); 
  subhead_bgcolor    = getRadioValue('.subhead_bgcolor'); 
  subhead_text_color = getRadioValue('.subhead_text_color'); 
  body_alink         = getRadioValue('.body_alink'); 
  body_vlink         = getRadioValue('.body_vlink'); 
  body_text          = getRadioValue('.body_text'); 
  head_text_face     = getListboxValue('.head_text_face',true);
  head_text_size     = getListboxValue('.head_text_size',false);
  subhead_text_face  = getListboxValue('.subhead_text_face',true);
  subhead_text_size  = getListboxValue('.subhead_text_size',false);
}

function getRadioValue (property)
{
  var retVal;
  var i=0;
  while (i < 48) {
    if (document.fm[property][i].checked) {
      return document.fm[property][i].value;
    }
    i++;
  }
  if (document.fm[property][48].checked) {
    return '';
  }
  return document.fm[property + '.txt'].value;
}

function getListboxValue (property, isFont)
{
  var val = document.fm[property][document.fm[property].selectedIndex].value;
  if (val == 'def') {
    return '';
  }
  else if (val == '') {
    return 'Arial';
  } else {
    return val;
  }
}

function redrawPreview(property)
{
  var p = '<html><head></head><body ';

/*
  if (body_bgcolor != '') {
    p += 'bgcolor=' + body_bgcolor;
  }

  if (body_text != '') {
    p += ' text=' + body_text;
  }

  if (document.fm['.body_bg_img'] && document.fm['.body_bg_img'].checked) {
    p += ' background=' + body_bg_img;
  }
  
  p += '><table border=0 cellpadding=2 cellspacing=1 bgcolor=000000><tr><td bgcolor=ffffff><font face=Arial color=000000><b>' + "Aperçu" + '</b></font>&nbsp;<font face=Arial size=-1 color=000000>' + "(pour aperçu seulement)" + '</font></td></tr></table><center><table border=0 cellpadding=3 cellspacing=0 width=95%"><tr valign=top><td width=204><table border=0 cellpadding=3 cellspacing=0 width="100%"';
  
  if (lt_bgcolor != '') {
    p += ' bgcolor=' + lt_bgcolor;
  }
  */
  
  p += 'bgcolor=' + property;
  p += '>';
  
  /*
  if (head_bgcolor != '') {
    p += ' bgcolor=' + head_bgcolor;
  }
  
  p += '><td><img align=right border=0 height=15 width=18 src="http://eur.i1.yimg.com/us.yimg.com/i/my/x.gif" alt="' + "Supprimer" + '"><b><font';
 
  if (head_text_face != '') {
    p += ' face="' + head_text_face + '"';
  }
  if (head_text_color != '') {
    p += ' color=' + head_text_color;
  }
  if (head_text_size != '') {
    p += ' size=' + head_text_size;
  }
  p += '>Header</font></b></td></tr><tr><td width=200 align=center nowrap><br>' + "[Couleur de fond de la marge]" + '<br><br></center></td></tr></table></td><td width="99%"><table border=0 cellpadding=3 cellspacing=0 width="100%"><tr';
 
  if (head_bgcolor != '') {
    p += ' bgcolor=' + head_bgcolor;
  }
 
  p += '><td nowrap><img align=right border=0 height=15 width=18 src="http://eur.i1.yimg.com/us.yimg.com/i/my/x.gif" alt="' + "Supprimer" + '"> <img align=right border=0 height=15 width=28 src="http://eur.i1.yimg.com/us.yimg.com/i/my/edit2.gif" alt="' + "Modifier" + '"><img align=right src="http://eur.i1.yimg.com/us.yimg.com/i/my/detach.gif" border=0 height=15 width=18 alt="' + "Détacher" + '"><b><font';
 
  if (head_text_face != '') {
    p += ' face="' + head_text_face + '"';
  }
  if (head_text_color != '') {
    p += ' color=' + head_text_color;
  }
  if (head_text_size != '') {
    p += ' size=' + head_text_size;
  }
   
  p += '>' + "Titre" + '</font></b></td></tr><tr';
 
  if (subhead_bgcolor != '') {
    p += ' bgcolor=' + subhead_bgcolor;
  }
 
  p += '><td><font';
 
  if (subhead_text_face != '') {
    p += ' face="' + subhead_text_face + '"';
  }
  if (subhead_text_color != '') {
    p += ' color=' + subhead_text_color;
  }
  if (subhead_text_size != '') {
    p += ' size=' + subhead_text_size;
  }
   
  p += '><b>' + "Sous-titre" + '</b></font></td></tr><tr><td><u><font color=';
 
  if (body_alink != '') {
    p += body_alink;
  } else {
    p += '0000ff';
  }
 
  p += '>' + "Liens non concultés" + '</font></u> &nbsp;&nbsp;&nbsp;&nbsp; <u><font color=';
 
  if (body_vlink != '') {
    p += body_vlink;
  } else {
    p += '840084';
  }
  
  p += '>' + "Liens consultés" + '</font></u> &nbsp;&nbsp;&nbsp;&nbsp; <font';
 
  if (body_text != '') {
    p += ' color=' + body_text;
  }
  */
 
  //p += '>' + "Texte" + '</font></td></tr></table></td></tr></table></body></html>\n';
  
 p +=' toto</body></html>\n';

  //var pvd = parent.frames.preview.document;
  var pvd = window.open('modules/admin/preview.php?bgcolor='+property,'popup','height=400,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=no,scrollbars=yes');
  //pvd.open();
  //pvd.writeln(p);
  //pvd.close();
}

function setTxt (property) 
{
  var val = getRadioValue(property);
  if (val == 'def') { val = ''; }
  eval(property.substr(1) + '="' + val + '";');
  //document.fm[property + '.txt'].value = val;
  redrawPreview(val);
}

function chkTxt (property)
{
  var val = document.fm[property + '.txt'].value;
  if (val != '') {
    document.fm[property][49].checked='1';
    eval(property.substr(1) + '="' + val + '";');
  }
  redrawPreview();
}

function updateListbox (property)
{
  var val = document.fm[property][document.fm[property].selectedIndex].value;
  if (val == 'def') { val = ''; }
  eval(property.substr(1) + '="' + val + '";');
  redrawPreview();
}

function check(list_form,field) 
{
		if(list_form.master_list.checked==false){
			var buttoncheck = "true";
		}else{
			var buttoncheck = "false";
		}
		
		if (buttoncheck == "false") {
			for (i = 0; i < field.length; i++) 
			{
				field[i].checked = true;
			}
			buttoncheck = "true";
			return "Désélectionner"; 
		}else{
			for (i = 0; i < field.length; i++) 
			{
				field[i].checked = false; 
			}
			buttoncheck = "false";
			return "Tout sélectionner"; 
		}

}

function upd_suivi(id_candidature,id_candidat,idOffre,langue,btn_suivi){

	var chaine = mygrid.getSelectedId()
	var tableau=chaine.split(",");
	var t_id_candidature;
	
	var cptCandidat = 0;
	for (var i=0;i<tableau.length;i++) {
		cptCandidat++;
		t_id_candidature+=tableau[i]+'_@@_';
	}	

	window.open("../../modules/entreprise/upd_candidature.php?t_id_candidature="+t_id_candidature+"&id_candidature="+id_candidature+"&id_candidat="+id_candidat+"&idOffre="+idOffre+"&langue="+langue+"&btn_suivi[]="+btn_suivi,'popup1','height=200,toolbar=no,location=no,directories=no,status=yes,width=400,resizable=no,scrollbars=no');
}

function upd_suivi2(id_candidature,id_candidat,idOffre,langue,btn_suivi){
	//window.location.href="modules/entreprise/upd_candidature.php?id_candidature="+id_candidature+"&id_candidat="+id_candidat+"&idOffre="+idOffre+"&langue="+langue+"&btn_suivi[]="+btn_suivi;
	
	window.open("../../modules/entreprise/upd_candidature.php?id_candidature="+id_candidature+"&id_candidat="+id_candidat+"&idOffre="+idOffre+"&langue="+langue+"&btn_suivi[]="+btn_suivi,'popup1','height=200,toolbar=no,location=no,directories=no,status=yes,width=400,resizable=no,scrollbars=no');
}

function upd_mail_auto(id_mail,langue,btn_suivi){
	window.open("modules/admin/upd_mail_auto.php?id_mail="+id_mail+"&langue="+langue+"&btn_suivi[]="+btn_suivi,'popup1','height=150,toolbar=no,location=no,directories=no,status=yes,width=400,resizable=no,scrollbars=no');
}

function upd_eval(id_candidat,langue,btn_eval){
	window.open("modules/entreprise/upd_eval.php?id_candidat="+id_candidat+"&langue="+langue+"&btn_eval[]="+btn_eval,'popup1','height=150,toolbar=no,location=no,directories=no,status=yes,width=400,resizable=no,scrollbars=no');
}

function sup_offre(id_offre,langue){
	if(confirm('Etes vous sûr de vouloir supprimer cette mission ?')){
		window.open("../../modules/offre/supprimerOffre.php?id_offre="+id_offre+"&langue="+langue,'popup1','height=150,toolbar=no,location=no,directories=no,status=yes,width=150,resizable=no,scrollbars=no');
	}
}

function sup_offre_(id_offre,langue){
	var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_offre.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}
	if(confirm('Etes vous sûr de vouloir supprimer cette mission ?')){
		window.open(jurl+"modules/offre/supprimerOffre.php?id_offre="+id_offre+"&langue="+langue+'&div=1','popup1','height=150,toolbar=no,location=no,directories=no,status=yes,width=150,resizable=no,scrollbars=no');
	}
}

function sup_offre2(id_offre,langue){
	if(confirm('Etes vous sûr de vouloir supprimer cette mission ?')){
		window.open("../../modules/offre/supprimerOffre.php?id_offre="+id_offre+"&langue="+langue+"&sup_ent=1",'popup1','height=150,toolbar=no,location=no,directories=no,status=yes,width=150,resizable=no,scrollbars=no');
	}
}

function mail_client_cv(id_offre,langue){
	window.open("../../modules/offre/mail_client_cv.php?id_offre="+id_offre+"&langue="+langue,'popup1','height=500,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes');
}

function mail_client_cv_(id_offre,langue){
	var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_offre.php');
	if(data > 0){
		jurl = "../../";
	}else{
		jurl = "";
	}	
	window.open(jurl+"modules/offre/mail_client_cv.php?id_offre="+id_offre+"&langue="+langue+'div=1','popup1','height=500,toolbar=no,location=no,directories=no,status=yes,width=600,resizable=yes,scrollbars=yes');
}



function sup_entreprise(id_entreprise,langue){
	window.open("modules/entreprise/sup_entreprise.php?id_entreprise="+id_entreprise+"&langue="+langue,'popup1','height=150,toolbar=no,location=no,directories=no,status=yes,width=150,resizable=no,scrollbars=no');
}

function sup_entreprise_ajax(id_entreprise,langue,div){
	envoieRequete('modules/entreprise/sup_entreprise.php?id_entreprise='+id_entreprise+'&langue='+langue+'&page=liste_entreprise',div);
	
	refresh_grid('','gridbox','');	
}



function sup_client(id_client,langue){
	//window.open("modules/entreprise/sup_client.php?id_client="+id_client+"&langue="+langue,'popup1','height=50,toolbar=no,location=no,directories=no,status=yes,width=50,resizable=no,scrollbars=no');
	//envoieRequete('modules/entreprise/sup_client.php?langue=<?php print $langue; ?>&id_client='+id_client,'popup1','height=300,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=yes,scrollbars=no','monDiv');
	envoieRequete('modules/entreprise/sup_client.php?id_client='+id_client+'&langue='+langue+'&page=liste_client','monDiv');
	
	refresh_grid('','gridbox','');	
	
}

function sup_client_ajax(id_client,langue,div){
	//window.open("modules/entreprise/sup_client.php?id_client="+id_client+"&langue="+langue,'popup1','height=50,toolbar=no,location=no,directories=no,status=yes,width=50,resizable=no,scrollbars=no');
	//envoieRequete('modules/entreprise/sup_client.php?langue=<?php print $langue; ?>&id_client='+id_client,'popup1','height=300,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=yes,scrollbars=no','monDiv');
	envoieRequete('modules/entreprise/sup_client.php?id_client='+id_client+'&langue='+langue+'&page=liste_client',div);
	
	refresh_grid('','gridbox','');	
	
}

function get_msg_infos(div,msg_titre,msg_desc){
	//document.getElementById(div).innerHTML = '<p><span align="left">'+msg_titre+'</span>&nbsp;&nbsp;'+msg_desc+'</p>';
	//document.getElementById(div).style.display = "block";
	//setTimeout("close_div('"+div+"')",2000);
}

function close_div(div){
	document.getElementById(div).style.display = "none";
}

function sup_client2(id_client,langue){
	if(confirm('Etes vous sûr de vouloir supprimer cette valeur ?')){
		window.open("modules/entreprise/sup_client2.php?id_client="+id_client+"&langue="+langue,'popup1','height=50,toolbar=no,location=no,directories=no,status=yes,width=50,resizable=no,scrollbars=no');
	}	
	
}

function selection_multiple(type_action, field,langue)
{
	var id_candidat="";
	if(type_action=='mail'){
		if(field.length > 0){	
			for (i = 0; i < field.length; i++) 
			{
				eval(field[i])
				if(field[i].checked == true && field[i].value!="" ){
					id_candidat = id_candidat+field[i].value+'_@@_';
				}
			}
			if(id_candidat!=""){
				window.open('modules/entreprise/affiche_mail_multiple.php?langue='+langue+'&t_id_candidat='+id_candidat,'popup1','height=650,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=no,scrollbars=yes')
			}else{
				alert("Aucun candidats sélectionnés");
			}
		}	
	}else if(type_action=='profil'){
		if(field.length > 0){	
			for (i = 0; i < field.length; i++) 
			{
				eval(field[i])
				if(field[i].checked == true && field[i].value!="" ){
					id_candidat = id_candidat+field[i].value+'_@@_';
				}
			}
			if(id_candidat!=""){
				window.open('modules/entreprise/enreg_classer_cv.php?langue='+langue+'&t_id_candidat='+id_candidat,'popup1','height=300,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=yes,scrollbars=no')
			}else{
				alert("Aucun candidats sélectionnés");
			}
		}	
	}else if(type_action=='sup_can'){
		if(field.length > 0){	
			for (i = 0; i < field.length; i++) 
			{
				eval(field[i])
				if(field[i].checked == true && field[i].value!="" ){
					id_candidat = id_candidat+field[i].value+'_@@_';
				}
			}
			if(id_candidat!=""){
				//window.open('modules/candidat/supprimerCandidat.php?langue='+langue+'&t_id_candidat='+id_candidat,'popup1','height=300,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=yes,scrollbars=no')
				window.location.href='modules/candidat/supprimerCandidat.php?langue='+langue+'&t_id_candidat='+id_candidat;
			}else{
				alert("Aucun candidats sélectionnés");
			}
		}	
	}else if(type_action=='report_eurydice'){
		if(field.length > 0){	
			for (i = 0; i < field.length; i++) 
			{
				eval(field[i])
				if(field[i].checked == true && field[i].value!="" ){
					id_candidat = id_candidat+field[i].value+'_@@_';
				}
			}
			if(id_candidat!=""){
				document.frm_report.t_id_candidat.value=id_candidat;
				document.frm_report.submit();					
				//window.open('modules/entreprise/affiche_report_acc_eurydice.php?langue='+langue+'&t_id_candidat='+id_candidat'popup1','height=300,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=yes,scrollbars=no');
			}else{
				alert("Aucun candidats sélectionnés");
			}
		}	
	}		
}

function selection_multiple_admin(type_action, field,langue)
{
	var id_candidat="";
	if(type_action=='mail'){
		if(field.length > 0){	
			for (i = 0; i < field.length; i++) 
			{
				eval(field[i])
				if(field[i].checked == true && field[i].value!="" ){
					id_candidat = id_candidat+field[i].value+'_@@_';
				}
			}
			if(id_candidat!=""){
				window.open('../../modules/entreprise/affiche_mail_multiple.php?langue='+langue+'&t_id_candidat='+id_candidat,'popup1','height=650,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=no,scrollbars=yes')
			}else{
				alert("Aucun candidats sélectionnés");
			}
		}	
	}else if(type_action=='profil'){
		if(field.length > 0){	
			for (i = 0; i < field.length; i++) 
			{
				eval(field[i])
				if(field[i].checked == true && field[i].value!="" ){
					id_candidat = id_candidat+field[i].value+'_@@_';
				}
			}
			if(id_candidat!=""){
				window.open('../../modules/entreprise/enreg_classer_cv.php?langue='+langue+'&t_id_candidat='+id_candidat,'popup1','height=300,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=yes,scrollbars=no')
			}else{
				alert("Aucun candidats sélectionnés");
			}
		}	
	}	
}

function selection_multiple2(type_action, field,langue,idOffre,suivi,tri_cv_offre,perPage)
{
	var id_candidat="";
	
	if(type_action=='sup_cand'){
		if(field.length > 0){	
			for (i = 0; i < field.length; i++) 
			{
				eval(field[i])
				if(field[i].checked == true && field[i].value!="" ){
					id_candidat = id_candidat+field[i].value+'_@@_';
				}
			}
			if(id_candidat!=""){
				window.location.href='modules/entreprise/sup_candidature.php?langue='+langue+'&t_id_candidat='+id_candidat+'&idOffre='+idOffre+'&suivi='+suivi+'&tri_cv_offre='+tri_cv_offre+'&perPage='+perPage;
			}else{
				alert("Aucun candidats sélectionnés");
			}
		}			
	}
}

function selection_multiple_recruteur(type_action, field,langue)
{
	var id_contact="";
	if(type_action=='mail'){
		if(field.length > 0){	
			for (i = 0; i < field.length; i++) 
			{
				eval(field[i])
				if(field[i].checked == true && field[i].value!="" ){
					id_contact = id_contact+field[i].value+'_@@_';
				}
			}
			if(id_contact!=""){
				window.open('modules/entreprise/affiche_mail_multiple_recruteur.php?langue='+langue+'&t_id_contact='+id_contact,'popup1','height=650,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=no,scrollbars=yes')
			}else{
				alert("Aucun recruteurs sélectionnés");
			}
		}	
	}
}

function selection_multiple_client(type_action, field,langue)
{
	var id_client="";
	if(type_action=='mail'){
		if(field.length > 0){	
			for (i = 0; i < field.length; i++) 
			{
				eval(field[i])
				if(field[i].checked == true && field[i].value!="" ){
					id_client = id_client+field[i].value+'_@@_';
				}
			}
			if(id_client!=""){
				window.open('modules/entreprise/affiche_mail_multiple_client.php?langue='+langue+'&t_id_client='+id_client,'popup1','height=650,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=no,scrollbars=yes')
			}else{
				alert("Aucune entreprise sélectionnés");
			}
		}	
	}
	if(type_action=='report8'){
		if(field.length > 0){	
			for (i = 0; i < field.length; i++) 
			{
				eval(field[i])
				if(field[i].checked == true && field[i].value!="" ){
					id_client = id_client+field[i].value+'_@@_';
				}
			}
			if(id_client!=""){
				//window.location.href = "modules/entreprise/affiche_report8.php?id_client="+id_client;
				window.document.frm_report8.id_client.value=id_client
				window.document.frm_report8.submit();						
				//window.open('modules/entreprise/affiche_report8.php?id_client='+id_client,'popup1','height=650,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
			}else{
				alert("Aucune entreprise sélectionnés");
			}
		}	
	}	
	if(type_action=='report9'){
		if(field.length > 0){	
			for (i = 0; i < field.length; i++) 
			{
				eval(field[i])
				if(field[i].checked == true && field[i].value!="" ){
					id_client = id_client+field[i].value+'_@@_';
				}
			}
			if(id_client!=""){
				//window.location.href = "modules/entreprise/affiche_report9.php?t_id_client="+id_client;
				window.document.frm_report9.t_id_client.value=id_client
				window.document.frm_report9.submit();					
				//window.open('modules/entreprise/affiche_report8.php?id_client='+id_client,'popup1','height=650,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
			}else{
				alert("Aucune entreprise sélectionnés");
			}
		}	
	}		
	if(type_action=='report10'){
		if(field.length > 0){	
			for (i = 0; i < field.length; i++) 
			{
				eval(field[i])
				if(field[i].checked == true && field[i].value!="" ){
					id_client = id_client+field[i].value+'_@@_';
				}
			}
			if(id_client!=""){
				//window.location.href = "modules/entreprise/affiche_report10.php?t_id_client="+id_client;
				window.document.frm_report10.t_id_client.value=id_client
				window.document.frm_report10.submit();					
				//window.open('modules/entreprise/affiche_report8.php?id_client='+id_client,'popup1','height=650,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=yes,scrollbars=yes')
			}else{
				alert("Aucune entreprise sélectionnés");
			}
		}	
	}		
	if(type_action=='report11'){
		if(field.length > 0){	
			for (i = 0; i < field.length; i++) 
			{
				eval(field[i])
				if(field[i].checked == true && field[i].value!="" ){
					id_client = id_client+field[i].value+'_@@_';
				}
			}
			if(id_client!=""){
				
				window.document.frm_report11.t_id_client.value=id_client
				window.document.frm_report11.submit();					
				
			}else{
				alert("Aucune entreprise sélectionnés");
			}
		}	
	}		
	if(type_action=='comm'){
		if(field.length > 0){	
			for (i = 0; i < field.length; i++) 
			{
				eval(field[i])
				if(field[i].checked == true && field[i].value!="" ){
					id_client = id_client+field[i].value+'_@@_';
				}
			}
			if(id_client!=""){
				//window.open('modules/entreprise/affiche_commission_suivi.php?langue='+langue+'&t_id_client='+id_client,'popup1','height=650,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=no,scrollbars=yes')
				window.document.frm_comm_suivi.t_id_client.value=id_client;
				window.document.frm_comm_suivi.submit();				
			}else{
				alert("Aucune entreprise sélectionnés");
			}
		}	
	}	
	
	if(type_action=='fi'){
		if(field.length > 0){	
			for (i = 0; i < field.length; i++) 
			{
				eval(field[i])
				if(field[i].checked == true && field[i].value!="" ){
					id_client = id_client+field[i].value+'_@@_';
				}
			}
			if(id_client!=""){
				//window.open('modules/entreprise/affiche_all_fiche_individuel.php?langue='+langue+'&t_id_client='+id_client,'popup1','height=650,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=no,scrollbars=yes')
				window.document.frm_fiche_individuel.t_id_client.value=id_client;
				window.document.frm_fiche_individuel.submit();				
			}else{
				alert("Aucune entreprise sélectionnés");
			}
		}	
	}		
}

function selection_multiple_offre(type_action, field,langue)
{
	var id_offre="";
	if(type_action=='print'){
		if(field.length > 0){	
			for (i = 0; i < field.length; i++) 
			{
				eval(field[i])
				if(field[i].checked == true && field[i].value!="" ){
					id_offre = id_offre+field[i].value+'_@@_';
				}
			}
			if(id_offre!=""){
				window.document.frm_fiche_offre.t_id_offre.value=id_offre;
				window.document.frm_fiche_offre.submit();						
			}else{
				alert("Aucune entreprise sélectionnés");
			}
		}	
	}
}

function selection_multiple_client2(type_action, field,langue)
{
	var id_client="";
	if(type_action=='mail'){
		if(field.length > 0){	
			for (i = 0; i < field.length; i++) 
			{
				eval(field[i])
				if(field[i].checked == true && field[i].value!="" ){
					id_client = id_client+field[i].value+'_@@_';
				}
			}
			if(id_client!=""){
				window.open('modules/entreprise/affiche_mail_multiple_client2.php?langue='+langue+'&t_id_client='+id_client,'popup1','height=650,toolbar=no,location=no,directories=no,status=yes,width=800,resizable=no,scrollbars=yes')
			}else{
				alert("Aucun clients sélectionnés");
			}
		}	
	}
}

function attente2()
{

var valpage="";
valpage=valpage+'\n'+'var largeur=-1;'
valpage=valpage+'\n'+'var tps=0;'
valpage=valpage+'\n'+'var temps=0;'
valpage=valpage+'\n'+'tempo="0";'
valpage=valpage+'\n'+'largeur=largeur+1;'
valpage=valpage+'\n'+'function lancer()'
valpage=valpage+'\n'+'{ largeur=largeur+1;'
valpage=valpage+'\n'+'largeur2=largeur*5+10;'
valpage=valpage+'\n'+'temps=temps+0.2;'
valpage=valpage+'\n'+'var rech=".";'
valpage=valpage+'\n'+'var vattemp=\'"\'+temps+\'"\';'
valpage=valpage+'\n'+'var a=vattemp.indexOf(rech,0);'

valpage=valpage+'\n'+'if(a!=-1) {var tempo=vattemp.substring(1,a);}'
valpage=valpage+'\n'+'else{ var tempo=vattemp.replace(\'"\',\'\');;'
valpage=valpage+'\n'+'      var tempo=tempo.replace(\'"\',\'\');};'


valpage=valpage+'\n'+'text=\'<font face=tahoma style="font-size:10px">\'+tempo+\' s</font><br><table width=100 height=5 border=1 cellspacing=0 cellpadding=0  bordercolordark=#0088bb bordercolorligth=#0088dd><tr><td width=100>\''
valpage=valpage+'\n'+'text=text+\'<table width=100 height=5 border=0 cellspacing=1 cellpadding=0 ><tr>\''
valpage=valpage+'\n'+'for(var i=0;i<30;i++)'
valpage=valpage+'\n'+'{if(largeur<=i){text=text+\'<td bgcolor=#ffffff width=\'+largeur2+\'><font size=1px>&nbsp;</font></td>\'}'
valpage=valpage+'\n'+'else'
valpage=valpage+'\n'+'{text=text+\'<td bgcolor=#00aadd width=\'+largeur2+\'><font size=1px>&nbsp;</font></td>\'}'
valpage=valpage+'\n'+'}'
valpage=valpage+'\n'+'text=text+\'</tr></table></td></tr></table>\''
valpage=valpage+'\n'+'document.getElementById("pouet").innerHTML=text'


valpage=valpage+'\n'+'tps=tps+1;'
valpage=valpage+'\n'+'if(tps<1000)'
valpage=valpage+'\n'+'{if(largeur<=30){'
valpage=valpage+'\n'+'setTimeout(\'lancer()\',200)}'
valpage=valpage+'\n'+'else{'
valpage=valpage+'\n'+'largeur=-1;'
valpage=valpage+'\n'+'setTimeout(\'lancer()\',200)}'
valpage=valpage+'\n'+'}'
valpage=valpage+'\n'+'}'


 return valpage

}

function attente()
{
valpage=valpage='<html><head></head><body onload="lancer()">'
valpage=valpage+'\n'+'<table id=att border=0>'
valpage=valpage+'\n'+'<tr><td align=center><div id=pouet></div></td></tr>'
valpage=valpage+'\n'+'<tr><td align=center><font face=tahoma style="font-size:10px">Analyse du CV ...</font></td></tr></table>'
valpage=valpage+'\n'+'<scr'+'ipt>'
valpage=valpage+'\n'+'var largeur=-1;'
valpage=valpage+'\n'+'var tps=0;'
valpage=valpage+'\n'+'var temps=0;'
valpage=valpage+'\n'+'tempo="0";'
valpage=valpage+'\n'+'largeur=largeur+1;'
valpage=valpage+'\n'+'function lancer()'
valpage=valpage+'\n'+'{ largeur=largeur+1;'
valpage=valpage+'\n'+'largeur2=largeur*5+10;'
valpage=valpage+'\n'+'temps=temps+0.2;'
valpage=valpage+'\n'+'var rech=".";'
valpage=valpage+'\n'+'var vattemp=\'"\'+temps+\'"\';'
valpage=valpage+'\n'+'var a=vattemp.indexOf(rech,0);'

valpage=valpage+'\n'+'if(a!=-1) {var tempo=vattemp.substring(1,a);}'
valpage=valpage+'\n'+'else{ var tempo=vattemp.replace(\'"\',\'\');;'
valpage=valpage+'\n'+'      var tempo=tempo.replace(\'"\',\'\');};'


valpage=valpage+'\n'+'text=\'<font face=tahoma style="font-size:10px">\'+tempo+\' s</font><br><table width=100 height=5 border=1 cellspacing=0 cellpadding=0  bordercolordark=#0088bb bordercolorligth=#0088dd><tr><td width=100>\''
valpage=valpage+'\n'+'text=text+\'<table width=100 height=5 border=0 cellspacing=1 cellpadding=0 ><tr>\''
valpage=valpage+'\n'+'for(var i=0;i<30;i++)'
valpage=valpage+'\n'+'{if(largeur<=i){text=text+\'<td bgcolor=#ffffff width=\'+largeur2+\'><font size=1px>&nbsp;</font></td>\'}'
valpage=valpage+'\n'+'else'
valpage=valpage+'\n'+'{text=text+\'<td bgcolor=#00aadd width=\'+largeur2+\'><font size=1px>&nbsp;</font></td>\'}'
valpage=valpage+'\n'+'}'
valpage=valpage+'\n'+'text=text+\'</tr></table></td></tr></table>\''
valpage=valpage+'\n'+'document.getElementById("pouet").innerHTML=text'


valpage=valpage+'\n'+'tps=tps+1;'
valpage=valpage+'\n'+'if(tps<1000)'
valpage=valpage+'\n'+'{if(largeur<=30){'
valpage=valpage+'\n'+'setTimeout(\'lancer()\',200)}'
valpage=valpage+'\n'+'else{'
valpage=valpage+'\n'+'largeur=-1;'
valpage=valpage+'\n'+'setTimeout(\'lancer()\',200)}'
valpage=valpage+'\n'+'}'
valpage=valpage+'\n'+'}'
valpage=valpage+'\n'+'</scr'+'ipt>'
valpage=valpage+'\n'+'</body>'
valpage=valpage+'\n'+'</html>'

 return valpage

}
var att=""
function appelattente()
{
 valpage=valpage=attente()
 att=window.open('','la_blank','width=160px,height=2px,left=220,top=60,toolbar=no,location=no,menubar=no,directories=no,status=no,scrollbars=no,resizable=no,copyhistory=no,menuBar=no'); 
 att.document.open()
 att.document.write(valpage)
 att.document.close()
}

function appelattente2()
{
 return attente2()

}
 
 function fermeattente()
 {att.close()
 }

function cache(idf) {
	  if (document.getElementById) {
		  document.getElementById(idf).style.visibility="hidden";
		} else if (document.all) {
		  document.all[idf].style.visibility="hidden";
		} else if (document.layers) {
		  document.layers[idf].visibility="hidden";
		} }	
function analyse_cv(langue,user_file)
{
	//document.frm_gen_stat.format_stat.value=format;
	window.open('modules/candidat/upload_cv_emanation.php?langue='+langue+'&user_file='+user_file+'','popup','height=310,toolbar=no,location=no,directories=no,status=yes,width=500,resizable=no,scrollbars=yes')
}			
function NewResume() {
	clig( 'UploadWait' , 5000 ) ;
	/*
	document.formu.action='ResumeUpload.php' ;
	document.formu.encoding=  'multipart/form-data' ;
	document.formu.submit();
	*/
}
function clig( id , tim){
	document.getElementById(id).style.visibility == 'hidden' ?
		document.getElementById(id).style.visibility = 'visible' :
		document.getElementById(id).style.visibility = 'hidden'  ;
	setTimeout( "clig('"+id+"',"+tim+") ;" , tim ) ; 
}
function limite(zone,max) 
{ 
if(zone.value.length>=max){zone.value=zone.value.substring(0,max);} 
} 

function passe_perdu()
{
	window.open('modules/public/passe_perdu.php','popup','height=200,toolbar=no,location=no,directories=no,status=yes,width=350,resizable=yes,scrollbars=yes')
}

function recherche_multi(){
	window.location.href="index.php?module=entreprise&action=consulterCv";	
}

function multiClass(eltId) {
	arrLinkId = new Array('_0','_1','_2');
	intNbLinkElt = new Number(arrLinkId.length);
	arrClassLink = new Array('current','ghost');
	strContent = new String()
	for (i=0; i<intNbLinkElt; i++) {
		strContent = "menu"+arrLinkId[i];
		if ( arrLinkId[i] == eltId ) {
			document.getElementById(arrLinkId[i]).className = arrClassLink[0];
			document.getElementById(strContent).className = 'on content';
		} else {
			document.getElementById(arrLinkId[i]).className = arrClassLink[1];
			document.getElementById(strContent).className = 'off content';
		}
	}	
}
/* d衵t onglet */
function Onglet(nom, tailleX, tailleY, tailleXOg, tailleYOg, initOg ){
		this.nom = nom;
		this.tailleX = tailleX;
		this.tailleY = tailleY;
		this.tailleXOg = tailleXOg;
		this.tailleYOg = tailleYOg;
		this.onglets = new Array();
		this.currentOnglet = null;
		this.currentSelOnglet = null;
		this.initOg = initOg;
		this.clsEna = "ongletTextEna";
		this.clsDis = "ongletTextDis";
		this.clsSp = "ongletSpace";
		this.clsMiddle = "ongletMiddle";
		this.clsMain = "ongletMain";
		this.colorOver = "#F7810F";
		this.add = addOnglet;		
		this.displayHeader = displayOngletHeader;
		this.displayFooter = displayOngletFooter;

		this.changeOnglet = changeOnglet;
		this.onOngletOver = onOngletOver;
		this.onOngletOut = onOngletOut;
}
	
function addOnglet( og ){
	this.onglets[this.onglets.length] = og;
}
	
function displayOngletHeader(){
	var html = "";
	html += "<TABLE width=" + this.tailleX + " height=" + this.tailleY + " cellspacing=0 cellpadding=0>";
	html += "<TR><TD><TABLE cellpadding=0 cellspacing=0 height=" + this.tailleYOg + " width=100%><TR>";
		
	for( var i=0; i < this.onglets.length; i++ ){
	    html += "<TD width=" + this.tailleXOg + " height=" + this.tailleYOg + " title=\"" + this.onglets[i].libOg + "\" id=ogO" + this.nom + i + " class=" + ((this.initOg == i)?this.clsEna:this.clsDis) + " onclick=\"" + this.nom + ".changeOnglet(this, 'og_" + this.nom + i + "')\" onmouseover=\"" + this.nom + ".onOngletOver(this)\" onmouseout=\"" + this.nom + ".onOngletOut(this)\">" + this.onglets[i].titreOg + "</TD>";
	    html += "<TD class=" + this.clsSp + " width=5>&nbsp;</TD>";
	}
	html += "<TD class=" + this.clsSp + ">&nbsp;</TD></TR><TR><TD height=5 colspan=" + (this.onglets.length*2 + 1) + " class=" + this.clsMiddle + ">&nbsp;</TD></TR></TABLE></TD></TR><TR><TD class=" + this.clsMain + " height=" + (this.tailleY - this.tailleYOg)+ ">";
	document.write(html);
}
	
function displayOngletFooter(){
	var html = "";
	html += "</TD></TR></TABLE>";
	document.getElementById("og_" + this.nom + this.initOg).style.display = "";
	this.currentOnglet = document.getElementById("og_" + this.nom + this.initOg);
	this.currentSelOnglet = document.getElementById("ogO" + this.nom + this.initOg);
	document.write(html);
}
	
function OngletItem(titreOg, libOg ){
	this.titreOg = titreOg;
	this.libOg = libOg;
}
	
function changeOnglet( srcOg, srcTab ){
	this.currentSelOnglet.className = this.clsDis;
	this.currentOnglet.style.display = "none";
	this.currentSelOnglet.style.color="";
	this.currentSelOnglet = srcOg;
	this.currentOnglet = document.getElementById(srcTab);
	this.currentSelOnglet.className = this.clsEna;
	this.currentOnglet.style.display = "";
}
	
function onOngletOver( srcOg ){
	if( srcOg != this.currentSelOnglet ){
		srcOg.style.cursor = "hand";
		srcOg.style.color = this.colorOver;
	}else{
		srcOg.style.cursor='default';
		srcOg.style.color = "";
	}
}

function onOngletOut( srcOg ){
	srcOg.style.color="";
}


function ongletstyle(){
	/*
mystyle="<STYLE>";
mystyle +=".clsAction {FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #053c6d; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif}";
mystyle +=".ongletTextEna {BORDER-RIGHT: #80add6 2px solid; BORDER-TOP: #80add6 2px solid; FONT-WEIGHT: bold; FONT-SIZE: 10px; BORDER-LEFT: #80add6 2px solid; COLOR: #005386; BORDER-BOTTOM: medium none; FONT-FAMILY: verdana; BACKGROUND-COLOR: #feb302; TEXT-ALIGN: center}";
mystyle +=".ongletTextDis {BORDER-RIGHT: #c5c5c5 1px solid; BORDER-TOP: #c5c5c5 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 10px; BORDER-LEFT: #c5c5c5 1px solid; COLOR: #80add6; BORDER-BOTTOM: #80add6 2px solid; FONT-FAMILY: verdana; BACKGROUND-COLOR: #e6e6e6; TEXT-ALIGN: center}";
mystyle +=".ongletSpace {BORDER-BOTTOM: #80add6 2px solid}";
mystyle +=".ongletMiddle {BORDER-RIGHT: #80add6 2px solid; BORDER-TOP: medium none; FONT-SIZE: 1px; BORDER-LEFT: #80add6 2px solid; BORDER-BOTTOM: medium none; BACKGROUND-COLOR: #feb302}";
mystyle +=".ongletMain {BORDER-RIGHT: #80add6 2px solid; BORDER-TOP: medium none; BORDER-LEFT: #80add6 2px solid; BORDER-BOTTOM: #80add6 2px solid; BACKGROUND-COLOR: #feb302}";
mystyle +=".ongletTextEna2 {BORDER-RIGHT: medium none; BORDER-TOP: #f7810f 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 9px; BORDER-LEFT: #f7810f 1px solid; COLOR: #005386; BORDER-BOTTOM: #f7810f 1px solid; FONT-FAMILY: verdana; BACKGROUND-COLOR: #fef4e9; TEXT-ALIGN: center}";
mystyle +=".ongletTextDis2 {BORDER-RIGHT: #f7810f 1px solid; BORDER-TOP: #c5c5c5 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 9px; BORDER-LEFT: #c5c5c5 1px solid; COLOR: #80add6; BORDER-BOTTOM: #c5c5c5 1px solid; FONT-FAMILY: verdana; BACKGROUND-COLOR: #e6e6e6; TEXT-ALIGN: center}";
mystyle +=".ongletSpace2 {BORDER-RIGHT: #f7810f 1px solid; FONT-SIZE: 1px}";
mystyle +=".ongletMiddle2 {BORDER-RIGHT: medium none; BORDER-TOP: #80add6 1px solid; FONT-SIZE: 1px; BORDER-LEFT: medium none; BORDER-BOTTOM: #80add6 1px solid; BACKGROUND-COLOR: #fef4e9}";
mystyle +=".ongletMain2 {	BORDER-RIGHT: #f7810f 1px solid; BORDER-TOP: #f7810f 1px solid; BORDER-LEFT: medium none; BORDER-BOTTOM: #f7810f 1px solid; BACKGROUND-COLOR: #fef4e9}";
mystyle +="</STYLE>";
*/
/*
mystyle="class='";
mystyle +="clsAction ";
mystyle +="ongletTextEna ";
mystyle +="ongletTextDis ";
mystyle +="ongletSpace ";
mystyle +="ongletMiddle ";
mystyle +="ongletMain ";
mystyle +="ongletTextEna2 ";
mystyle +="ongletTextDis2 ";
mystyle +="ongletSpace2 ";
mystyle +="ongletMiddle2 ";
mystyle +="ongletMain2 ";
mystyle +="'";
*/
//document.write(mystyle);
}

/* Fin onglet */

function First2UpperCase(texte) { 
var t = new Array(); 
    for(j=0 ; j < texte.length ;j++) { 
        if(j == 0) t[j] = texte.substr(j,1).toUpperCase(); 
        else t[j] = texte.substr(j,1).toLowerCase(); 
    } 
    return t.join(''); 
} 





function showCadrePermanent(){
	if(document.getElementById('convention_reclassement_candidat').value=='aec15f31c3dea'){
		return true;
	}else{
		return false;
	}
}		

function showContractuel(){
	if(document.getElementById('convention_reclassement_candidat').value=='aec15f37d3066'){
		return true;
	}else{
		return false;
	}
}		






function showActifSncf(){
	showActifContrat();
	if(document.getElementById('cycle_travail_candidat').value=='aec15b1fd17aa'){// || document.getElementById('cycle_travail_candidat').value=='aec15b25c2b01' || document.getElementById('cycle_travail_candidat').value=='aec15b2c71c6c' || document.getElementById('cycle_travail_candidat').value=='aec15b3775dd9'
		/*
		if(document.getElementById('cycle_travail_candidat').value=='aec15b2c71c6c'){
			document.getElementById('convention_reclassement_candidat').options[0] = new Option('','-------------',false,false);
			document.getElementById('convention_reclassement_candidat').options[1] = new Option('aec15f37d3066','Contractuel',false,false);
		}else{
			document.getElementById('convention_reclassement_candidat').options[0] = new Option('','-------------',false,false);
			document.getElementById('convention_reclassement_candidat').options[1] = new Option('aec15f31c3dea','Cadre Permanent',false,false);
			document.getElementById('convention_reclassement_candidat').options[2] = new Option('aec15f37d3066','Contractuel',false,false);			
		}
		*/
		
		return true;
	}else{
		return false;
	}
}		



function showActifContrat(){
	if(document.getElementById('cycle_travail_candidat').value=='aec15b1fd17aa' || document.getElementById('cycle_travail_candidat').value=='aec15b25c2b01' || document.getElementById('cycle_travail_candidat').value=='aec15b2c71c6c' || document.getElementById('cycle_travail_candidat').value=='aec15b3775dd9'){ 
		return true;
	}else{
		return false;
	}
}

function showRetraiteSncf(){
	showActifContrat();
	if(document.getElementById('cycle_travail_candidat').value=='aec15b25c2b01'){
		return true;
	}else{
		return false;
	}
}		

function showActifFiliale(){
	showActifContrat();
	if(document.getElementById('cycle_travail_candidat').value=='aec15b2c71c6c'){
		return true;
	}else{
		return false;
	}
}		

function showRetraiteFiliale(){
	showActifContrat();
	if(document.getElementById('cycle_travail_candidat').value=='aec15b3775dd9'){
		return true;
	}else{
		return false;
	}
}		

function showJobboardJeudi(){
	//alert(document.form_identification.id_job_offre.length);		
	if(document.form_identification.job_lesjeudi.value=='hidden'){
		return true;
	}else{
		return false;
	}
}		
function showJobboardCadre(){
	//alert(document.form_identification.id_job_offre.length);		
	if(document.form_identification.job_cadremploi.value=='hidden'){
		return true;
	}else{
		return false;
	}
}		


function showTypeVehicule(){	
	if(document.form_identification.cl_outils_travail.value=='hidden'){
		return true;
	}else{
		return false;
	}
}	

function show2TypeVehicule(){	
	if(document.frm_suivi.cl_outils_travail.value=='hidden'){
		return true;
	}else{
		return false;
	}
}			

function showExpPro(){	
	if(document.form_identification.cl_trans_mobilie.value=='hidden'){
		return true;
	}else{
		return false;
	}
}			

function showExpPerso(){	
	if(document.form_identification.cl_avis_accueil.value=='hidden'){
		return true;
	}else{
		return false;
	}
}			

function showLgv(){	
	if(document.form_identification.cl_aire_mobil.value=='hidden'){
		return true;
	}else{
		return false;
	}
}			

function showClassique(){	
	if(document.form_identification.cl_mode_trans.value=='hidden'){
		return true;
	}else{
		return false;
	}
}			

function showRedSecu(){	
	if(document.form_identification.cl_nature_org_presc.value=='hidden'){
		return true;
	}else{
		return false;
	}
}		

function showRedOrg(){	
	if(document.form_identification.cl_piste3_bilan.value=='hidden'){
		return true;
	}else{
		return false;
	}
}			

function showRedAudit(){	
	if(document.form_identification.cl_ref3_nom.value=='hidden'){
		return true;
	}else{
		return false;
	}
}			


function showParisNord(){	
	if(document.form_identification.cl_trans_mobilie.value=='hidden'){
		return true;
	}else{
		return false;
	}
}			

function showParisOuest(){	
	if(document.form_identification.cl_avis_accueil.value=='hidden'){
		return true;
	}else{
		return false;
	}
}			

function showParisEst(){	
	if(document.form_identification.cl_aire_mobil.value=='hidden'){
		return true;
	}else{
		return false;
	}
}		

function showParisCentre(){	
	if(document.form_identification.cl_mode_trans.value=='hidden'){
		return true;
	}else{
		return false;
	}
}		

function showParisSud(){	
	if(document.form_identification.cl_nature_org_presc.value=='hidden'){
		return true;
	}else{
		return false;
	}
}		

function showNord(){	
	if(document.form_identification.cl_piste3_bilan.value=='hidden'){
		return true;
	}else{
		return false;
	}
}		

function showNormandie(){	
	if(document.form_identification.cl_ref3_nom.value=='hidden'){
		return true;
	}else{
		return false;
	}
}		

function showOuest(){	
	if(document.form_identification.cl_client_emploi2.value=='hidden'){
		return true;
	}else{
		return false;
	}
}		

function showSudOuest(){	
	if(document.form_identification.cl_reval_qtp.value=='hidden'){
		return true;
	}else{
		return false;
	}
}		

function showCentre(){	
	if(document.form_identification.cl_competence_technique.value=='hidden'){
		return true;
	}else{
		return false;
	}
}	

function showEst(){	
	if(document.form_identification.cl_mobilite_intelec.value=='hidden'){
		return true;
	}else{
		return false;
	}
}	

function showRhoneAlpe(){	
	if(document.form_identification.cl_contexte_familiale.value=='hidden'){
		return true;
	}else{
		return false;
	}
}	

function crea_qtp_contact(id_candidat,langue)
{
	window.open('enreg_qtp_contact.php?langue='+langue+'&id_candidat='+id_candidat+'&page=resultat_candidat','popup'+id_candidat,'height=200,toolbar=no,location=no,directories=no,status=no,width=600,resizable=yes,scrollbars=yes');
}

function topElement(e)
{ 
return ((e && topElement != topElement.caller)?e.offsetTop:0) + ((e && e.offsetParent)?e.offsetParent.offsetTop + topElement(e.offsetParent):0);
}
function leftElement(e)
{
return ((e && leftElement != leftElement.caller)?e.offsetLeft:0) + ((e && e.offsetParent)?e.offsetParent.offsetLeft + leftElement(e.offsetParent):0);
}
function afficheCacheDiv(element, idDiv,title_fic)
{
	var url_img = "";
	var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_offre.php');
	var data2 = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0 || data2 > 0 || screen.width < 1025){
		url_img = "../../";
		
		jurl = (0);
		jurl_top1 = "0px";
		jurl_top2 = "25px";
	}else{
		url_img = "";
		jurl = jurl = ((screen.width - 980)/2)+150;
		jurl_top1 = "85px";
		jurl_top2 = "110px";
	}	
	
	var div = document.getElementById(idDiv);

	var div_ver = document.getElementById("cadre_barre" )
		if (div_ver) {
			
				var ns4 = (document.layers)? true:false;
				var ie4 = (document.all)? true:false;
				var dom = (document.getElementById)? true:false;
			
					start();
					var div_cadre = document.getElementById('cadre_barre');
					//div_cadre.innerHTML = "<div align='center'><input type='button' class='boutton'  onClick=\"javascript:document.getElementById('monDiv').style.display='none';showElement( 'SELECT' );refresh_grid('','gridbox','')\" value='Fermer' name='button' ></div>";
					//div_cadre.innerHTML = "<div align='right'><img src='"+url_img+"images/div_r.gif' border='0' title='Restaurer' onMouseOut=\"this.src='"+url_img+"images/div_r.gif'\" onMouseOver=\"this.src='"+url_img+"images/div_r_over.gif'\" onClick=\"javascript:reduir_div('monDiv','cadre_barre')\"><img src='"+url_img+"images/div_a.gif' border='0' title='Plein écran' onMouseOut=\"this.src='"+url_img+"images/div_a.gif'\" onMouseOver=\"this.src='"+url_img+"images/div_a_over.gif'\" onClick=\"javascript:agrandir_div('monDiv','cadre_barre');\"><img src='"+url_img+"images/div_f.gif' border='0' title='Fermer' onMouseOut=\"this.src='"+url_img+"images/div_f.gif'\" onMouseOver=\"this.src='"+url_img+"images/div_f_over.gif'\" onClick=\"javascript:document.getElementById('monDiv').style.display='none';showElement( 'SELECT' );refresh_grid('','gridbox','');\">&nbsp;</div>";
					div_cadre.innerHTML = "<table width='100%' cellpadding=0 cellspacing=0 ><tr><td width='150' background='"+url_img+"system/static/images/title_fic.gif' valign='top'><div align='left' valign='top'><font color='#FFFFFF'>&nbsp;"+title_fic+"</font></div></td><td align='right'><div align='right'><img src='"+url_img+"images/div_r.gif' border='0' title='Restaurer' onMouseOut=\"this.src='"+url_img+"images/div_r.gif'\" onMouseOver=\"this.src='"+url_img+"images/div_r_over.gif'\" onClick=\"javascript:reduir_div('monDiv','cadre_barre')\"><img src='"+url_img+"images/div_a.gif' border='0' title='Plein écran' onMouseOut=\"this.src='"+url_img+"images/div_a.gif'\" onMouseOver=\"this.src='"+url_img+"images/div_a_over.gif'\" onClick=\"javascript:agrandir_div('monDiv','cadre_barre');\"><img src='"+url_img+"images/div_f.gif' border='0' title='Fermer' onMouseOut=\"this.src='"+url_img+"images/div_f.gif'\" onMouseOver=\"this.src='"+url_img+"images/div_f_over.gif'\" onClick=\"javascript:document.getElementById('monDiv').style.display='none';showElement( 'SELECT' );refresh_grid('','gridbox','');\">&nbsp;</div></td></tr></table>";
					div_cadre.style.top = jurl_top1;
					div_cadre.style.left = jurl+"px";
					div_cadre.style.height = "25px";
					div_cadre.style.position = "Absolute";
					div_cadre.style.width = "900px";
					div_cadre.style.background = "#c6d3de";
					if ((dom) || (ie4)) {
					div_cadre.style.cursor = "hand";
					}
					//div_cadre.style.index=2;
					div_cadre.style.display = "block";
		
	}
	
	
	if (div.style.display=="block"){
	//div.style.display = "none";
	//showElement( 'SELECT' );
	}else{
	//div.style.top = (topElement(element) + element.offsetHeight - 300)+"px";
	div.style.top = jurl_top2;
	//div.style.left = (leftElement(element) - 630)+"px";
	//div.style.left = (leftElement(element) + 200)+"px";
	div.style.left = jurl+"px";
	
	div.style.height = "600px";
	div.style.position = "Absolute";
	div.style.width = "900px";
	div.style.bgColor = "#FFFFFF";
	div.style.index=2;
	
	div.style.display = "block";
	
	
	}
	hideElement( 'SELECT', document.getElementById(idDiv) );
	if(screen.width < 1025){
		agrandir_div('monDiv','cadre_barre')
	}
	
	if (div_ver) {
		  document.getElementById('vertical_slide').style.display = "none";
	}
}

function agrandir_div(div1,div2){
	var div_1 = document.getElementById(div1);
	var div_2 = document.getElementById(div2);
	
	div_2.style.top = "0";
	div_2.style.left = "0";
	div_2.style.width = screen.width-20;
	div_2.style.height = "25px";
	
	div_1.style.top = "25px";
	div_1.style.left = "0";
	div_1.style.width = screen.width-20;
	div_1.style.height = screen.height;

}

function reduir_div(div1,div2){
	var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_offre.php');
	var data2 = String(window.location).indexOf('affiche_liste_all_candidat.php');
	if(data > 0 || data2 > 0 || screen.width < 1025){
		jurl = (0);
		jurl_top1 = "0px";
		jurl_top2 = "25px";		
	}else{
		jurl = jurl = ((screen.width - 980)/2)+150;
		jurl_top1 = "85px";
		jurl_top2 = "110px";		
	}
	
	var div_1 = document.getElementById(div1);
	var div_2 = document.getElementById(div2);
	div_1.style.top = jurl_top2;
	div_1.style.left = jurl+"px";
	div_1.style.width = "900px";
	div_1.style.height = "700px";
	
	div_2.style.top = jurl_top1;
	div_2.style.left = jurl+"px";
	div_2.style.width = "900px";
	div_2.style.height = "25px";	
}
function afficheCacheDiv3( idDiv,title_fic)
{
	var url_img;
	var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	var data2 = String(window.location).indexOf('affiche_liste_all_offre.php');
	if(data > 0 || data2 > 0 || screen.width < 1025){
		jurl = (0);
		url_img = "../../";
		jurl_top1 = "0px";
		jurl_top2 = "25px";				
	}else{
		jurl = jurl = ((screen.width - 980)/2)+150;
		url_img = "";
		jurl_top1 = "85px";
		jurl_top2 = "110px";			
	}	
	
	var div_ver = document.getElementById("cadre_barre" )
		if (div_ver) {
			
				var ns4 = (document.layers)? true:false;
				var ie4 = (document.all)? true:false;
				var dom = (document.getElementById)? true:false;
			
					start();
					var div_cadre = document.getElementById('cadre_barre');
						
					//div_cadre.innerHTML = "<div align='center'><input type='button' class='boutton'  onClick=\"javascript:document.getElementById('monDiv').style.display='none';showElement( 'SELECT' );refresh_grid('','gridbox','')\" value='Fermer' name='button' ></div>";
					//div_cadre.innerHTML = "<div align='right'><img src='"+url_img+"images/div_r.gif' border='0' title='Restaurer' onMouseOut=\"this.src='"+url_img+"images/div_r.gif'\" onMouseOver=\"this.src='"+url_img+"images/div_r_over.gif'\" onClick=\"javascript:reduir_div('monDiv','cadre_barre')\"><img src='"+url_img+"images/div_a.gif' border='0' title='Plein écran' onMouseOut=\"this.src='"+url_img+"images/div_a.gif'\" onMouseOver=\"this.src='"+url_img+"images/div_a_over.gif'\" onClick=\"javascript:agrandir_div('monDiv','cadre_barre');\"><img src='"+url_img+"images/div_f.gif' border='0' title='Fermer' onMouseOut=\"this.src='"+url_img+"images/div_f.gif'\" onMouseOver=\"this.src='"+url_img+"images/div_f_over.gif'\" onClick=\"javascript:document.getElementById('monDiv').style.display='none';showElement( 'SELECT' );refresh_grid('','gridbox','');\">&nbsp;</div>";
					div_cadre.innerHTML = "<table width='100%' cellpadding=0 cellspacing=0 ><tr><td width='150' background='"+url_img+"system/static/images/title_fic.gif' valign='top'><div align='left' valign='top'><font color='#FFFFFF'>&nbsp;"+title_fic+"</font></div></td><td align='right'><div align='right'><img src='"+url_img+"images/div_r.gif' border='0' title='Restaurer' onMouseOut=\"this.src='"+url_img+"images/div_r.gif'\" onMouseOver=\"this.src='"+url_img+"images/div_r_over.gif'\" onClick=\"javascript:reduir_div('monDiv','cadre_barre')\"><img src='"+url_img+"images/div_a.gif' border='0' title='Plein écran' onMouseOut=\"this.src='"+url_img+"images/div_a.gif'\" onMouseOver=\"this.src='"+url_img+"images/div_a_over.gif'\" onClick=\"javascript:agrandir_div('monDiv','cadre_barre');\"><img src='"+url_img+"images/div_f.gif' border='0' title='Fermer' onMouseOut=\"this.src='"+url_img+"images/div_f.gif'\" onMouseOver=\"this.src='"+url_img+"images/div_f_over.gif'\" onClick=\"javascript:document.getElementById('monDiv').style.display='none';showElement( 'SELECT' );refresh_grid('','gridbox','');\">&nbsp;</div></td></tr></table>";
					div_cadre.style.top = jurl_top1;
					div_cadre.style.left = jurl+"px";
					//div.style.left = (leftElement(element) - 630)+"px";
					div_cadre.style.height = "25px";
					div_cadre.style.position = "Absolute";
					div_cadre.style.width = "900px";
					div_cadre.style.background = "#c6d3de";
					if ((dom) || (ie4)) {
					div_cadre.style.cursor = "hand";
					}
					//div_cadre.style.index=2;
					div_cadre.style.display = "block";
		
	}
		var div = document.getElementById(idDiv);
		//if (div.style.display=="block"){
		//div.style.display = "none";
		//showElement( 'SELECT' );
		//}else{
			
		//div.style.top = (topElement(element) + element.offsetHeight - 300)+"px";
		div.style.top = jurl_top2;
		//div.style.left = (leftElement(element) - 630)+"px";
		div.style.left = jurl+"px";
		
		div.style.height = "600px";
		div.style.position = "Absolute";
		div.style.width = "900px";
		div.style.bgColor = "#FFFFFF";
		div.style.index=2;
		div.style.display = "block";
		
		hideElement( 'SELECT', document.getElementById(idDiv) );
		
		
		var div_ver = document.getElementById("vertical_slide" )
		if (div_ver) {
		  document.getElementById('vertical_slide').style.display = "none";
		}
		
		
		

	/*
	var div = document.getElementById(idDiv);
	//if (div.style.display=="block"){
	//div.style.display = "none";
	//showElement( 'SELECT' );
	//}else{
		
	//div.style.top = (topElement(element) + element.offsetHeight - 300)+"px";
	div.style.top = "110px";
	//div.style.left = (leftElement(element) - 630)+"px";
	div.style.left = ( 300)+"px";
	
	div.style.height = "600px";
	div.style.position = "Absolute";
	div.style.width = "900px";
	div.style.bgColor = "#FFFFFF";
	div.style.index=2;
	div.style.display = "block";
*/	
	/*
	var div = document.getElementById(idDiv);
	//if (div.style.display=="block"){
	//div.style.display = "none";
	//showElement( 'SELECT' );
	//}else{
		
	//div.style.top = (topElement(element) + element.offsetHeight - 300)+"px";
	//div.style.top = "110px";
	//div.style.left = (leftElement(element) - 630)+"px";
	//div.style.left = ( 300)+"px";
	
	div.style.height = "100%";
	div.style.position = "Absolute";
	div.style.width = "100%";
	div.style.bgColor = "#FFFFFF";
	div.style.index=2;
	div.style.display = "block";
	*/
	/*
	
	new Windoo({
		width: 300,
		height: 222,
		title: 'IFrame window',
		type: 'ajax',
		//shadow: false,
		//container: false,
		buttons: {menu: true},
		ghost: {resize: true, move: true},
		//content: $(div),
		onBeforeClose: function(){
			refresh_grid('','gridbox','')
			//document.getElementById('monDiv').style.display='none';
			//this.preventClose( !confirm('Have you already visited mootools.net?') );
			}
	}).adopt(idDiv).show();
		//doOnLoadCandidature();
	
		*/
	
	
	

//}
		
		if(screen.width < 1025){
			agrandir_div('monDiv','cadre_barre')
		}
}


function afficheCacheDiv2(element, idDiv)
{
	var jurl;
	var data = String(window.location).indexOf('affiche_liste_all_candidat.php');
	var data2 = String(window.location).indexOf('affiche_liste_all_offre.php');
	if(data > 0 || data2 > 0 || screen.width < 1025){
		jurl = (0);
	}else{
		jurl = jurl = ((screen.width - 980)/2)+50;
	}	
var div = document.getElementById(idDiv);
if (div.style.display=="block"){
//div.style.display = "none";
showElement( 'SELECT' );

}else{
//div.style.top = (topElement(element) + element.offsetHeight - 300)+"px";
div.style.top = "0px";
//div.style.left = (leftElement(element) - 980)+"px";
//div.style.left = (leftElement(element) + 200)+"px";
div.style.left = jurl+"px";

div.style.height = "710px";
div.style.position = "Absolute";
div.style.width = "980px";
div.style.bgColor = "#FFFFFF";
div.style.index=2;
div.style.display = "block";

hideElement( 'SELECT', document.getElementById(idDiv) );

var div_ver = document.getElementById("vertical_slide" )
if (div_ver) {
  document.getElementById('vertical_slide').style.display = "none";
}

}

}

function CacheDiv(element, idDiv)
{
var div = document.getElementById(idDiv);
if (div.style.display=="block"){
div.style.display = "none";
showElement( 'SELECT' );
}else{
	var div_ver = document.getElementById("vertical_slide" )
	if (div_ver) {
	  document.getElementById('vertical_slide').style.display = "none";
	}
}
}

function sCacheDiv(element, idDiv)
{

}


function limite_textarea(textarea, max){
	if(textarea.value.length >= max){
		textarea.value = textarea.value.substring(0,max);
	}
	var reste = max - textarea.value.length;
	var affichage_reste =  reste +' caractères restants';
	document.getElementById('max_desc').innerHTML = affichage_reste;
}

/* hides <select> and <applet> objects (for IE only) */

function hideElement( elmID, overDiv )
{
	
	  // Internet Explorer 6
    var IE6 = false /*@cc_on || @_jscript_version < 5.7 @*/;
   // exactly Internet Explorer 7
    var IE7 = false /*@cc_on || @_jscript_version == 5.7 @*/;
   // at least Internet Explorer 7
    var gteIE7 = false /*@cc_on || @_jscript_version >= 5.7 @*/;
  // any Internet Explorer (thanks to Dean)
    var isMSIE = /*@cc_on!@*/false;

	if(IE6==true){
		$$('select').setStyle('visibility','hidden');
	}
	/*
	var ie;
  if( ie )
  {
    for( i = 0; i < document.all.tags( elmID ).length; i++ )
    {
      obj = document.all.tags( elmID )[i];
      if( !obj || !obj.offsetParent )
      {
        continue;
      }
  
      // Find the element's offsetTop and offsetLeft relative to the BODY tag.
      objLeft   = obj.offsetLeft;
      objTop    = obj.offsetTop;
      objParent = obj.offsetParent;
      
      while( objParent.tagName.toUpperCase() != "BODY" )
      {
        objLeft  += objParent.offsetLeft;
        objTop   += objParent.offsetTop;
        objParent = objParent.offsetParent;
      }
  
      objHeight = obj.offsetHeight;
      objWidth = obj.offsetWidth;
  
      if(( overDiv.offsetLeft + overDiv.offsetWidth ) <= objLeft );
      else if(( overDiv.offsetTop + overDiv.offsetHeight ) <= objTop );
      else if( overDiv.offsetTop >= ( objTop + objHeight ));
      else if( overDiv.offsetLeft >= ( objLeft + objWidth ));
      else
      {
        obj.style.visibility = "hidden";
      }
    }
  }
  */
  

}



/*
function hideElement(id,hide)
{
	var elt = document.getElementById(id);
	
	if (hide)
	{
		elt.style.visibility = "hidden";
	}
	else
	{
		elt.style.visibility = "visible";	
	}
}
*/

/*
* unhides <select> and <applet> objects (for IE only)
*/
function showElement( elmID )
{
	
	  // Internet Explorer 6
    var IE6 = false /*@cc_on || @_jscript_version < 5.7 @*/;
   // exactly Internet Explorer 7
    var IE7 = false /*@cc_on || @_jscript_version == 5.7 @*/;
   // at least Internet Explorer 7
    var gteIE7 = false /*@cc_on || @_jscript_version >= 5.7 @*/;
  // any Internet Explorer (thanks to Dean)
    var isMSIE = /*@cc_on!@*/false;

	if(IE6==true){
		$$('select').setStyle('visibility','visible');
	}
	/*
	var ie;
  if( ie )
  {
    for( i = 0; i < document.all.tags( elmID ).length; i++ )
    {
      obj = document.all.tags( elmID )[i];
      
      if( !obj || !obj.offsetParent )
      {
        continue;
      }
    
      obj.style.visibility = "";
    }
  }
  */
	var div_ver = document.getElementById("vertical_slide" )
	if (div_ver) {
	  document.getElementById('vertical_slide').style.display = "block";
	}
	
	var div_c = document.getElementById("cadre_barre" )
	if (div_c) {
	  document.getElementById('cadre_barre').style.display = "none";
	}		  	
}

//v1.7
// Flash Player Version Detection
// Detect Client Browser type
// Copyright 2005-2007 Adobe Systems Incorporated.  All rights reserved.
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function ControlVersion()
{
	var version;
	var axo;
	var e;

	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry

	try {
		// version will be set for 7.X or greater players
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}

	if (!version)
	{
		try {
			// version will be set for 6.X players only
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
			// installed player is some revision of 6.0
			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
			// so we have to be careful. 
			
			// default to the first public version
			version = "WIN 6,0,21,0";

			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
			axo.AllowScriptAccess = "always";

			// safe to call for 6.0r47 or greater
			version = axo.GetVariable("$version");

		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 4.X or 5.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 3.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 2.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = -1;
		}
	}
	
	return version;
}

// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	var flashVer = -1;
	
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			var descArray = flashDescription.split(" ");
			var tempArrayMajor = descArray[2].split(".");			
			var versionMajor = tempArrayMajor[0];
			var versionMinor = tempArrayMajor[1];
			var versionRevision = descArray[3];
			if (versionRevision == "") {
				versionRevision = descArray[4];
			}
			if (versionRevision[0] == "d") {
				versionRevision = versionRevision.substring(1);
			} else if (versionRevision[0] == "r") {
				versionRevision = versionRevision.substring(1);
				if (versionRevision.indexOf("d") > 0) {
					versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
				}
			}
			var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	else if ( isIE && isWin && !isOpera ) {
		flashVer = ControlVersion();
	}	
	return flashVer;
}

// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
	versionStr = GetSwfVer();
	if (versionStr == -1 ) {
		return false;
	} else if (versionStr != 0) {
		if(isIE && isWin && !isOpera) {
			// Given "WIN 2,0,0,11"
			tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
			tempString        = tempArray[1];			// "2,0,0,11"
			versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
		} else {
			versionArray      = versionStr.split(".");
		}
		var versionMajor      = versionArray[0];
		var versionMinor      = versionArray[1];
		var versionRevision   = versionArray[2];

        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
		if (versionMajor > parseFloat(reqMajorVer)) {
			return true;
		} else if (versionMajor == parseFloat(reqMajorVer)) {
			if (versionMinor > parseFloat(reqMinorVer))
				return true;
			else if (versionMinor == parseFloat(reqMinorVer)) {
				if (versionRevision >= parseFloat(reqRevision))
					return true;
			}
		}
		return false;
	}
}

function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '';
  if (isIE && isWin && !isOpera)
  {
    str += '<object ';
    for (var i in objAttrs)
    {
      str += i + '="' + objAttrs[i] + '" ';
    }
    str += '>';
    for (var i in params)
    {
      str += '<param name="' + i + '" value="' + params[i] + '" /> ';
    }
    str += '</object>';
  }
  else
  {
    str += '<embed ';
    for (var i in embedAttrs)
    {
      str += i + '="' + embedAttrs[i] + '" ';
    }
    str += '> </embed>';
  }

  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs(  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000", null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
      case "id":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}

	  function expandCollapse(elem,_url)
	{
		if (document.getElementById)
		{
			e = document.getElementById(elem);
			i = document.getElementById("img_" + elem);
			if (e.style.display == "none" | e.style.display == null | e.style.display == "")
			{
					e.style.display = "block";
					i.src = _url+"images/dhtmlgoodies_minus.gif";
			}
			else if (e.style.display == "block")
			{
					e.style.display = "none";
					i.src = _url+"images/dhtmlgoodies_plus.gif";				
				   
			}
			else
			{
					alert(e.style.display);
					e.style.display = "block";
			//        i.src = "img/arrow_down.gif";
			}
			   
		}
	}
	
function affiche_condition()
{
window.open('modules/public/conditions.php','popup','height=400,toolbar=no,location=no,directories=no,status=no,width=600,resizable=yes,scrollbars=yes');
}	

function groupement(value){
	if(value==""){
		mygrid.unGroup();
	}else{
		mygrid.groupBy(value);
	}
}	

var down = 0;
//défini l'état de la souris sur le bloc, mouseDown : 'down = 1' sinon 'down = 0'
function setD(a,b,e)
{
	down = a;
	//initialise les variables
	
	//position initiale de la souris lorsqu'on clique sur le bloc
	if(e.pageX) // selon le navigateur (ici pour firefox et peut-être autre...)
	{
		init_x = e.pageX;
		init_y = e.pageY;
	}
	else if(e.clientX) // (ici pour Internet Explorer et peut-être autre...)
	{
		init_x = e.clientX;
		init_y = e.clientY;
	}
	else // (ici pour Internet Explorer et peut-être autre...)
	{
		init_x = e.x;
		init_y = e.y;
	}
	 div_x = document.getElementById(b).offsetLeft;
	 div_y = document.getElementById(b).offsetTop;
}
//fonction qui exécute le déplacement du bloc
function drag(b,e)
{
	//si la souris est 'cliquée' sur le bloc
	if(down==1)
	{
		//on récupère la position de la souris au moment de l'appel de la fontion
		if(e.pageX) // selon le navigateur (ici pour firefox et peut-être autre...)
		{
			pos_x = e.pageX;
			pos_y = e.pageY;
		}
		else if(e.clientX) // (ici pour Internet Explorer et peut-être autre...)
		{
			pos_x = e.clientX;
			pos_y = e.clientY;
		}
		else // (ici pour Internet Explorer et peut-être autre...)
		{
			pos_x = e.x;
			pos_y = e.y;
		}
		
		dx = pos_x - init_x; //distance entre la position initiale et la position actuelle en x
		dy = pos_y - init_y; //distance entre la position initiale et la position actuelle en y
		//déplace le bloc à sa nouvelle position ( -1 +1 pour qu'il reconnaisse que c'est un calcul...)
		document.getElementById(b).style.left = div_x + dx+ "px";
		document.getElementById(b).style.top = div_y + dy+ "px";
		//affiche la position dans les champs de texte
		//document.getElementById(b).value = document.getElementById(b).offsetLeft;
		//document.getElementById(b).value = document.getElementById(b).offsetTop;
	}
}


var dom = (document.getElementById)? true:false;
var ns4 = (document.layers)? true:false;
var ie4 = (document.all)? true:false;
var dd_mode="";

function onoffdisplay(){	//Affchiage-Désaffichage du menu
	if (ie4) {
		if (monDiv.style.display=='') monDiv.style.display='none'
		else monDiv.style.display=''
	}else	if (dom) {
		if (document.getElementById('monDiv').style.display=='') document.getElementById('monDiv').style.display='none' 
		else document.getElementById('monDiv').style.display=''
	}else	if (ns4) {
		if (document.layers.monDiv.visibility=='show') document.layers.monDiv.visibility='hide' 
		else document.layers.monDiv.visibility='show'
	}
}

function start() {			//Init des variables,des Divs-Layers, et du onmousedown
	var h=0;
 	if (ie4) {
		var w=document.body.clientWidth-200;
		cadre_barre.style.left=w;
		cadre_barre.style.top=h;
		monDiv.style.left=w;
		monDiv.style.top=h+25;
		monDiv.style.display='none';
		cadre_barre.onmousedown=beginDrag;
	}else if (dom) {
		var w=window.outerWidth-200;
		document.getElementById('cadre_barre').style.left=w;
		document.getElementById('cadre_barre').style.top=h;
		document.getElementById('monDiv').style.left=w;
		document.getElementById('monDiv').style.top=h+25;
		document.getElementById('monDiv').style.display='none';
		document.getElementById("cadre_barre").addEventListener("mousedown",beginDrag, false);
	}else if (ns4) {
		var w=window.outerWidth-200;
		document.layers.cadre_barre.left=w;
		document.layers.cadre_barre.top=h;
		document.layers.monDiv.left=w;
		document.layers.monDiv.top=h+25;
		document.captureEvents(Event.MOUSEDOWN);
		document.onmousedown=beginDrag;
	}
}

function doDrag(e) {			// Déplacement des Divs-Layers
	if (ie4) {
		var difX=event.clientX-window.lastX;
	   var difY=event.clientY-window.lastY;
		var newX1 = parseInt(cadre_barre.style.left)+difX;
	   var newY1 = parseInt(cadre_barre.style.top)+difY;
	   cadre_barre.style.left=newX1+"px";
	   cadre_barre.style.top=newY1+"px";
	   monDiv.style.left=newX1+"px";
	   monDiv.style.top=newY1+25+"px";
	   window.lastX=event.clientX;
	   window.lastY=event.clientY;
	}else if (dom) {
		var difX=e.clientX-window.lastX;
	   var difY=e.clientY-window.lastY;
		var newX1 = parseInt(document.getElementById("cadre_barre").style.left)+difX;
	   var newY1 = parseInt(document.getElementById("cadre_barre").style.top)+difY;
	   document.getElementById("cadre_barre").style.left=newX1+"px";
	   document.getElementById("cadre_barre").style.top=newY1+"px";
	   document.getElementById("monDiv").style.left=newX1+"px";
	   document.getElementById("monDiv").style.top=newY1+25+"px";
	   window.lastX=e.clientX;
	   window.lastY=e.clientY;
	}else if (ns4) {
		var difX=e.pageX-window.lastX;
	   var difY=e.pageY-window.lastY;
		var newX1 = parseInt(document.layers.cadre_barre.left)+difX;
	   var newY1 = parseInt(document.layers.cadre_barre.top)+difY;
	   document.layers.cadre_barre.left=newX1;
	   document.layers.cadre_barre.top=newY1;
	   document.layers.monDiv.left=newX1;
	   document.layers.monDiv.top=newY1+25;
	   window.lastX=e.pageX;
	   window.lastY=e.pageY;
	} 
}

function beginDrag(e) {		// Paramétrage du déplacement des Divs-Layers et des onmousemove & onmouseup
	if (ie4) {
		window.lastX=event.clientX;
	   window.lastY=event.clientY;
	   document.onmousemove=doDrag;
	   document.onmouseup=endDrag;
//		if (event.srcElement.id=="cadre_barre"){
//			Récup de l'Id d'un élément sous IE
//		}
	}else if (dom) {
		window.lastX=e.clientX;
	   window.lastY=e.clientY;
	   window.onmousemove=doDrag;
	   window.onmouseup=endDrag;
		myattr=e.target.getAttribute("ID");
//		if(myattr=="cadre_barre") {
//			Récup de l'ID d'un élément sous NS6
//		}
	}else if (ns4) {
		window.lastX=e.pageX;
	   window.lastY=e.pageY;
	   document.captureEvents(Event.MOUSEMOVE)
	   document.onmousemove=doDrag;
	   document.captureEvents(Event.MOUSEUP)
	   document.onmouseup=endDrag;
	}
}

function endDrag(e) {		// Stabilisation des Divs-Layers dans la fenetre
	 if (ie4 || ns4) {
	 	document.onmousemove=null;
	 }else if (dom) {
		window.onmousemove=null;
	}else if (ns4) {
		alert("endDrag");
		document.onmousemove=null;
	}
}

function stat_graph(width,height,path_chart,xml_source,id,name){
	if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
		alert("This page requires AC_RunActiveContent.js.");
	} else {
		var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
		if(hasRightVersion) {
			AC_FL_RunContent(
				'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0',
				'width', width,
				'height', height,
				'scale', 'noscale',
				'salign', 'TL',
				'bgcolor', '#777788',
				'wmode', 'opaque',
				'movie', 'charts',
				'src', path_chart,
				'FlashVars', 'library_path=utils/charts/charts_library&xml_source='+xml_source,
				'id', id,
				'name', name,
				'menu', 'true',
				'allowFullScreen', 'true',
				'allowScriptAccess','sameDomain',
				'quality', 'high',
				'align', 'middle',
				'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
				'play', 'true',
				'devicefont', 'false'
				);
		} else {
			var alternateContent = 'This content requires the Adobe Flash Player. '
			+ '<u><a href=http://www.macromedia.com/go/getflash/>Get Flash</a></u>.';
			document.write(alternateContent);
		}
	}
}

function ical(){
	var action_suivi = document.getElementById("action_suivi").value;
	var heure_suivi = document.getElementById("heure_suivi").value;
	var date_suivi = document.getElementById("date_suivi").value;
	var description_action_suivi = document.getElementById("description_action_suivi").value;
	var id_suivi = document.getElementById("id_suivi").value;
	var id_candidat = "";;
	if(document.getElementById("id_candidat")){
		id_candidat = document.getElementById("id_candidat").value;
	}
	var id_client = "";
	if(document.getElementById("id_client")){
		id_client = document.getElementById("id_client").value;
	}	
	var id_offre = "";;
	if(document.getElementById("id_offre")){
		id_offre = document.getElementById("id_offre").value;
	}	

	window.location.href='ical.php?action_suivi='+action_suivi+'&heure_suivi='+heure_suivi+'&date_suivi='+date_suivi+'&description_action_suivi='+description_action_suivi+'&id_suivi='+id_suivi+'&id_candidat='+id_candidat+'&id_client='+id_client+'&id_offre='+id_offre+'';
}
	
