function delete_pic(id,num_pic){
	if(confirm("Confirmez vous la suppression de cette image?")){
		document.write("<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>");
		document.write("<html xmlns='http://www.w3.org/1999/xhtml'>");
		document.write("<html><head></head><body>");
		document.write("<form name='frm_del_pic' method='post' action='../commun/action_db.php'>");
		document.write("<input type='hidden' name='del_id' value='"+id+"'>");
		document.write("<input type='hidden' name='del_num_pic' value='"+num_pic+"'>");
		document.write("<input type='hidden' name='step' value='del_pic'>");
		document.write("</form>");
		document.write("</body></html>");
		document.close();
		document.frm_del_pic.submit();
	}
}

function delete_projet(id){
	if(confirm("Confirmez vous la suppression de ce projet?")){
		document.write("<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>");
		document.write("<html xmlns='http://www.w3.org/1999/xhtml'>");
		document.write("<html><head></head><body>");
		document.write("<form name='frm_del_projet' method='post' action='../commun/action_db.php'>");
		document.write("<input type='hidden' name='del_id' value='"+id+"'>");
		document.write("<input type='hidden' name='step' value='del_ref'>");
		document.write("</form>");
		document.write("</body></html>");
		document.close();
		document.frm_del_projet.submit();
	}
}

function Check_frm_projet(f){
	if(f.txt_titre_projet.value==""){
		alert("Merci de saisir le titre du projet.");
		f.txt_titre_projet.focus();
		return false;
	}
	if(f.txt_annee_projet.value==""){
		alert("Merci de saisir l'année du projet.");
		f.txt_annee_projet.focus();
		return false;
	}
	if(f.txt_ville_projet.value==""){
		alert("Merci de saisir la ville du projet.");
		f.txt_ville_projet.focus();
		return false;
	}
	if(f.slct_dpt.value==""){
		alert("Merci de sélectionner le département du projet.");
		f.slct_dpt.focus();
		return false;
	}
	if(f.slct_theme.value==""){
		alert("Merci de sélectionner la thématique du projet.");
		f.slct_theme.focus();
		return false;
	}
	if(f.txt_cout_projet.value==""){
		alert("Merci de saisir le coût total du projet.");
		f.txt_cout_projet.focus();
		return false;
	}
	if(f.txt_finance_projet.value==""){
		alert("Merci de saisir le montant financé par l'UE pour le projet.");
		f.txt_finance_projet.focus();
		return false;
	}
	if(f.slct_fond.value==""){
		alert("Merci de sélectionner le fond concerné.");
		f.slct_fond.focus();
		return false;
	}
	return true;
}