<!--
bton = new Image();
btoff = new Image();
bton.src = "images/index_on.jpg";
btoff.src = "images/index.jpg";

// Guide
function Guide(AIDE) {
	var MSG = AIDE;
	//MSG = MSG.replace("|","[<a href=\"javascript:OpenWindow('guide");
	//MSG = MSG.replace("|",".htm',200,200);\">suite ...</A>]");
	//document.GENISIS.guide.value = AIDE;
	document.getElementById("aide").innerHTML=MSG;
}

// Ouverture d'une fenetre POPUP
function OuvrirFenetre(Page,LgX,LgY,PosX,PosY) {
	msg=open("","Help","location=no,status=no,toolbar=no,directories=no,resizable=yes,menubar=no,scrollbars=yes,width="+LgX+",height="+LgY+",left="+PosX+",top="+PosY);
	msg.location.href=Page;
	msg.focus();
}

// Filtrage caractères non numériques
function Filtre() {
	a=window.event.keyCode;
	if ((a<48 || a>57) && a!=47) window.event.keyCode = 0;
}

// Afficher la sélection
function Selection() {
var fiches="";
var tous="";
for (var x=0;x<document.SELECT.elements.length;x++) {
if (document.SELECT.elements[x].type=="checkbox") {
	if (tous) tous = tous + ",";
	tous = tous + document.SELECT.elements[x].value;
	if (document.SELECT.elements[x].checked ) {
		if (fiches) fiches = fiches + ",";
		fiches = fiches + document.SELECT.elements[x].value;
	}
}}
if ( fiches == "" ) {
	if (!confirm("Aucune fiche sélectionnée. Affichez l'ensemble ?")) return;
	fiches = tous;
}
document.ENVOI.fiche.value = fiches;
document.ENVOI.submit();
}

// Afficher tout
function Tout() {
	var tous="";
	for (var x=0;x<document.SELECT.elements.length;x++) {
		if (document.SELECT.elements[x].type=="checkbox") {
			if (tous) tous = tous + ",";
			tous = tous + document.SELECT.elements[x].value;
		}
	}
	document.ENVOI.fiche.value = tous;
	document.ENVOI.submit();

}

// Appel d'un lexique
function Lexique(Indice) {
	/*
	var j=-1;
	var url="";
	for (var i=0;i<document.images.length;i++) {
	if ( document.images[i].name == "img" ) {
		j++;
		if ( j==Indice ) {
			document.images[i].src = bton.src;
		} else {
			document.images[i].src = btoff.src;
		}
	}}
	if ( Indice == -1 ) return;
	*/
	switch ( Indice) {
		case 0: // SIGLE
			url="lexique.php?ret=Chp0&tbl=asi_organisme&lib=Sigle/Développé&guillemet=true";
			break;
		case 1: // VILLE
			url="lexique.php?ret=Chp1&tbl=asi_ville&lib=Villes";
			break;
		case 2: // PAYS
			url="lexique.php?ret=Chp2&tbl=asi_pays&lib=Pays";
			break;
		case 3: // DOMAINE
			url="lexique.php?ret=Chp3&tbl=asi_domaine&lib=Domaines";
			break;
		case 4: // ACTIVITE
			url="lexique.php?ret=Chp4&tbl=asi_activite&lib=Activités";
			break;
	}
	/* Taille de l'écran */
	var i=screen.height-300;
	if ( Indice > 2 ) i=100;
	msg=open("","Index","location=no,status=no,toolbar=no,directories=no,resizable=no,menubar=no,scrollbars=yes,width=800,height=210,left=0,top="+i);	
	msg.location.href=url;
	msg.focus();
}
//-->
