<!--//--><![CDATA[//><!
function Init() {
	// initialisation jscalendar
	Calendar.setup({
		inputField     :    "f_date",	// id of the input field
		ifFormat       :    "%Y-%m-%d",		// format of the input field (even if hidden, this format will be honored)
		button         :    "t_date",	// trigger button (well, IMG in our case)
		singleClick    :    true
	});

	// variables globales utilisées pour les fonctions verScroll et stopScroll
	scrollTimer = new Array;
	scrollFirstTime = true;
	scrollMarge = 0;

	//verScroll('dn',1,true,'scrollTxt1',true);
	//horScroll('left',1,true,'scrollTxt2',true);
	//horScroll('left',1,true,'scrollTxt3',true);

	// pour la gestion des evenements
	if (document.layers) {
		var submitlink = document["submitlink"];
		var resetlink = document["resetlink"];
		var undolink = document["undolink"];
		var scrollLf1 = document["scrollLf1"];
		var scrollRg1 = document["scrollRg1"];
	}
	if (document.getElementById) {
		var submitlink = document.getElementById("submitlink");
		var resetlink = document.getElementById("resetlink");
		var undolink = document.getElementById("undolink");
		var scrollLf1 = document.getElementById("scrollLf1");
		var scrollRg1 = document.getElementById("scrollRg1");
	}
	if (document.all) {
		var submitlink = document.all["submitlink"];
		var resetlink = document.all["resetlink"];
		var undolink = document.all["undolink"];
		var scrollLf1 = document.all["scrollLf1"];
		var scrollRg1 = document.all["scrollRg1"];
	}

	if (scrollRg1 && scrollLf1) {
		scrollRg1.onclick = function() {horScroll('lf',2,true,'scrollTxt1',false); return false;}
		scrollRg1.onmouseover = function() {stopScroll('scrollTxt1'); horScroll('left',10,true,'scrollTxt1',false); return false;}
		scrollRg1.onmouseout = function() {stopScroll('scrollTxt1'); return false;}
		scrollLf1.onclick = function() {horScroll('rg',2,true,'scrollTxt1',false); return false;}
		scrollLf1.onmouseover = function() {stopScroll('scrollTxt1'); horScroll('right',10,true,'scrollTxt1',false); return false;}
		scrollLf1.onmouseout = function() {stopScroll('scrollTxt1'); return false;}
	}


	if (submitlink) {
		submitlink.onclick = function(event) {
			document.articles_form.submit() ;
		}
	}
	if (resetlink) {
		resetlink.onclick = function(event) {
			document.articles_form.reset();
			for (i=0; i<document.articles_form.length; i++) {
				if (document.articles_form.elements[i].name) {
					if (document.articles_form.elements[i].type=="checkbox" || document.articles_form.elements[i].type=="radio") {
						document.articles_form.elements[i].checked=false;
					} else {
						document.articles_form.elements[i].value="";
					}
				}
			}
			return false;
		}
	}
	if (undolink) {
		undolink.onclick = function(event) {
			document.articles_form.reset();
			return false;
		}
	}

}


function horScroll(dir, speed, loop, divId, yoyo) {
	// ******************************************************
	// * fonction pour faire scroller les div horizontalement *
	// ******************************************************
	// * dir : 	direction (right / left / rg / lf)         *
	// * speed : 	vitesse de défilement (entier)          *
	// * loop : 	mode défilement continu (true / false)  *
	// * yoyo : 	mode chgt de sens auto (true / false)   *
	// ******************************************************
	if (document.layers) {var divElt = document[divId];}
	if (document.getElementById) {var divElt = document.getElementById(divId);}
	if (document.all) {var divElt = document.all[divId];}
	if (scrollFirstTime) {scrollMarge=divElt.style.left; scrollFirstTime = false;}
	var x_pos = parseInt(divElt.style.left);
	if (dir == "left") {
		if (divElt.offsetParent.offsetWidth-x_pos<parseInt(divElt.offsetWidth)) {
			// scroll vers la gauche
			divElt.style.left = (x_pos - (parseInt(speed)))+"px";
		} else {
			// on arrive à gche : inversion du sens si mode 'yoyo'
			if (yoyo == true) {dir="right";} else {loop = false;}
		}
	}
	if (dir == "right") { 
		if (x_pos < parseInt(scrollMarge)) {
			// scroll vers la droite
			divElt.style.left = (x_pos + (parseInt(speed)))+"px";
		} else {
			// on arrive à drte : inversion du sens si mode 'yoyo'
			if (yoyo == true) {dir="left";} else {loop = false;}
		}
	}
	if (dir == "rg") {
		stopScroll(divId);
		loop = false;
		divElt.style.left = parseInt(scrollMarge)+"px";
	}
	if (dir == "lf") {
		stopScroll(divId);
		loop = false;
		divElt.style.left = (divElt.offsetParent.offsetWidth-parseInt(divElt.offsetWidth))+"px";
	}
	if (loop == true) {scrollTimer[divId] = setTimeout("horScroll('"+dir+"', "+speed+", "+loop+", '"+divId+"', "+yoyo+")", 1);}
}
function stopScroll(divId) {
	if (scrollTimer[divId]) {clearTimeout(scrollTimer[divId]);}
}

window.onload=Init;
//--><!]]>
