var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
function INTERFACE_CARTE_DoFSCommand(command, args) {
	var INTERFACE_CARTEObj = isInternetExplorer ? document.all.INTERFACE_CARTE : document.INTERFACE_CARTE;
}
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub INTERFACE_CARTE_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call INTERFACE_CARTE_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}
     
     function ajoute (numdep) {
//		window.alert("avant = " +numdep);

//		var theform;
//		if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
//			theform = document.RECHERCHE;
//		}
//		else {
//			theform = document.forms["RECHERCHE"];
//		}
//		theform.departement.text=numdep;
//		window.alert("apres = " +numdep); 
   // numdep = rtrim(numdep);
   
    EcrireCookie ("recherche", numdep );
    }

function EcrireCookie(nom, valeur){
	document.cookie=nom+"="+escape(valeur);
}

function rtrim (s) {
  return s.replace (/\s+$/, '');
}


