/* traitement boite d'info */
$(".info-bg").css("opacity","0");
$(".info-box,.info-box2").css("opacity","0");
var Jq_V=500;
$(".info-bg").click(reinitInfo);
function reinitInfo(){
$(".info-bg").animate({opacity: 0},Jq_V);
$(".info-box,.info-box2").animate({opacity: 0},Jq_V,'linear',function () {$(".info-main").hide();}).css("z-index",0);
}
function loadInfo(n,str)
{
if(str)
{
$("h2",$(".n-"+n)).css('display','none');
$("h2."+str,$(".n-"+n)).css('display','block');
}
$(".info-box").hide();
$(".info-main").show();
$(".info-bg").animate({opacity: 0.6},Jq_V);
$(".n-"+n).show().animate({opacity: 1},Jq_V).css("z-index",3001);
}
/* traitements formulaires */
var formSave=Array();
function loadObli()
{
$("label",this).each(function () {this.innerHTML='*'+this.innerHTML});
}
function reinit_form(f_array)
{
for(var i=0;i0 && $("input",a[i])[0].value=="")||($("textarea",a[i]).length>0 && $("textarea",a[i])[0].value=="")) && (!b))
{
retour=false;
a[i].style.color="red";
a[i].style.fontWeight="bold";
}
else
{
a[i].style.color="";
a[i].style.fontWeight="";
}
}
return retour;
}
function formControl(o)
{
var retour=true;
var obj=(o.type!="submit")?$("#"+o):this;
retour=elementControl($(".obligatoire",obj));
eval('c='+adToControlCond+';');
if ((adToControl!==false) && c) {
retour=retour && elementControl($(adToControl));
}
return retour;
}
/* traitement tableau */
$(".tableRecept").each(function () {this.innerHTML='';});
/* onload */
var first_activation=true;
function fLoad (){
$(".tBlank").attr('target','blank');
$("form.niceform").each(function () {if(this.id){formSave.push(Array("#"+this.id,this.innerHTML));}});
bloque_form=false;
reinit_form(formSave);
initNiceForm();
first_activation=false;
}
/* ne pas toucher */
var noChange=false;
$(document).ready(fLoad);