<!--//--><![CDATA[//><!
function Init() {
	// pour la gestion des evenements
	if (document.layers) {
		var f_date = document["f_date"];
		var submitlink = document["submitlink"];
		var resetlink = document["resetlink"];
		var undolink = document["undolink"];
	}
	if (document.getElementById) {
		var f_date = document.getElementById("f_date");
		var submitlink = document.getElementById("submitlink");
		var resetlink = document.getElementById("resetlink");
		var undolink = document.getElementById("undolink");
	}
	if (document.all) {
		var f_date = document.all["f_date"];
		var submitlink = document.all["submitlink"];
		var resetlink = document.all["resetlink"];
		var undolink = document.all["undolink"];
	}
	if (f_date) {
		// 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
		});
	}
	if (submitlink) {
		submitlink.onclick = function(event) {
			document.self_form.submit() ;
		}
	}
	if (resetlink) {
		resetlink.onclick = function(event) {
			document.self_form.reset();
			for (i=0; i<document.self_form.length; i++) {
				if (document.self_form.elements[i].name) {
					if (document.self_form.elements[i].type=="checkbox" || document.self_form.elements[i].type=="radio") {
						document.self_form.elements[i].checked=false;
					} else {
						document.self_form.elements[i].value="";
					}
				}
			}
			return false;
		}
	}
	if (undolink) {
		undolink.onclick = function(event) {
			document.self_form.reset();
			return false;
		}
	}
}
window.onload=Init;
//--><!]]>

