//*****************************************************************************
// AGIIR Network /
// date de création: 04/02 VPN
// version : APV2.1.1
//*****************************************************************************
// Dernière Modification : 01/05/03 MCN
// VPN : Rajout des bretzells ( heu non des cookies) 11/11/2004
//*****************************************************************************

function Lancermail(act,modeappelll,aqui)
{
	document.lanceur.modeappel.value=modeappelll;
	document.lanceur.type_categ.value=aqui;
    	with(document.lanceur)
                {
                        action=act;
                        submit();
                }
}


function changemenu()
{
pk_menu=document.lanceur.pk_menu.options[document.lanceur.pk_menu.selectedIndex].value;
eval(js_tab_lanceur[pk_menu]);
}


function Lancer(act)
{
if (act=="quit.php")  if (!confirm("Souhaitez-vous vraiment quitter l'application ?")) return ;
    with(document.lanceur)
                {
                        action=act;
                        submit();
                }
}

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 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 Lancerspecialpopup(act,categpasse)
{
	
	document.lanceur.modeappel.value=categpasse;
	document.lanceur.pkcateg.value=categpasse;
    	with(document.lanceur)
                {
                        action=act;
						target="dossier";
                        submit();
                }
}

function Lancerged(act,categpasse)
{
if (act=="quit.php")  if (!confirm("Souhaitez-vous vraiment quitter le site du Puits aux Livres ?")) return ;
document.lanceur.pkcateg.value=categpasse;
    with(document.lanceur)
                {
                        action=act;
                        submit();
                }
}

function reloadparam()
{
    with(document.lanceur)
                {
                        target="_self";
                }
}

function Lancer_wb()
{
window.open('./index_wb.php?pk='+js_pkuti);
}


//-------------------- 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];
}
var expDays = 1;
var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));


function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}

function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}

function DeleteCookie (name) {
var exp = new Date();  
exp.setTime (exp.getTime() - 1);
var cval = GetCookie (name);
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}



