//*****************************************************************************
// AGIIR Network /
// date de création: 04/02 VPN
// version: APV2.1.1
//*****************************************************************************
// Dernière Modification: 01/05/03 MCN
//*****************************************************************************

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function Lancermail(act,modeappelll,aqui)
{
	document.lanceur.modeappel.value=modeappelll;
	document.lanceur.type_categ.value=aqui;
    	with(document.lanceur)
                {
                        action=act;
                        submit();
                }
}
function Lancer(act)
{
if (act=="quit.php")  if (!confirm("Souhaitez-vous vraiment quitter l'application ?")) return ;
    with(document.lanceur)
                {
                        action=act;
                        submit();
                }
}

function Lancer2(act)
{
	open("","Taches","width=625,height=300,menubar=no,status=no,toolbar=no,location=no,titlebar=no,resizable=no, scrollbars=yes");
	with(document.lanceur)
			{
			target="Taches";
                  action=act;
                  submit();
                  setTimeout("reloadparam();",200);
                }
}
function LancerForum(act)
{
	open("","Forum","width=860,height=650,menubar=no,status=no,toolbar=no,location=no,titlebar=no,resizable=no, scrollbars=yes");
	with(document.lanceur)
		{
		  target="Forum";
                  action=act;
                  submit();
                  setTimeout("reloadparam();",200);
                }
}

function Lancer3(act,mode,lwid,lhei)
{
	open("","aide","width="+lwid+",height="+lhei+",menubar=yes,status=yes,toolbar=yes,location=yes,titlebar=yes,resizable=yes, scrollbars=yes");
	document.lanceur.modeappel.value=mode;
	with(document.lanceur)
	{
		target="aide";
  		action=act;
                submit();
                setTimeout("reloadparam();",200);
    	}
}

function Lancerspecial(act,categpasse)
{
	if (act=="bve_recherche.php")
	{
	    	with(document.lanceur)
                {
			rubbve.value=document.recherche.trouv.value;
                }
	}
	document.lanceur.modeappel.value=categpasse;
	document.lanceur.pkcateg.value=categpasse;
    	with(document.lanceur)
                {
                        action=act;
                        submit();
                }
}

function Lancerged(act,categpasse)
{
if (act=="quit.php")  if (!confirm("Souhaitez-vous vraiment quitter l'application ?")) return ;
document.lanceur.pkcateg.value=categpasse;
    with(document.lanceur)
                {
                        action=act;
                        submit();
                }
}


function Lancercateg(categ)
{
    with(document.lanceur)
                {
                        pkcateg.value=categ;
                        action="evenementiel.php";
                        submit();
                }
}

function reloadparam()
{
    with(document.lanceur)
                {
                        target="_self";
                }
}

function Lancer_forum(act,couleur)
{
    with(document.lanceur)
                {
                        target="_new";
                        action=act;
                        couleur1.value=couleur;
                        submit();
                        setTimeout("reloadparam();",200);
                }
}

//-------------------- partie animation des div ------------------------------

function change_panneau()
{
	if ((js_panneau_actuel>9)||(tab_panneau[js_panneau_actuel+1]=="")) js_panneau_actuel=1;
	else js_panneau_actuel++;
	document.getElementById("panneau").innerHTML=tab_panneau[js_panneau_actuel];
}

function change_partage()
{
	if ((js_alerte_actuel>6)||(tab_alerte[js_alerte_actuel+1]=="")) js_alerte_actuel=1;
	else js_alerte_actuel++;
	document.getElementById("partage").innerHTML=tab_alerte[js_alerte_actuel];
}

