var TIMEUR_INFO_BULLE=0;
var POS_X_INFO_BULLE= 0;
var POS_Y_INFO_BULLE= 0;
var TAILLE_WIDTH_BULLE= 160;
var IS_IE= /msie/i.test(navigator.userAgent);
function effacerForm (form)
{
for(i=0; i
liste.options[i+1].text)
{
text= liste.options[i].text;
value= liste.options[i].value;
selected = liste.options[i].selected;
liste.options[i].text= liste.options[i+1].text;
liste.options[i].value= liste.options[i+1].value;
liste.options[i].selected = liste.options[i+1].selected;
liste.options[i+1].text= text;
liste.options[i+1].value= value;
liste.options[i+1].selected= selected;
if (liste.options[i].selected) liste.selectedIndex = i;
if (liste.options[i+1].selected) liste.selectedIndex = i+1;
changement=true;
}
}
}
}
function changerCouleur (element, couleur)
{
element.style.backgroundColor= couleur;
}
Array.prototype.contient = function(valeur)
{
for (var i in this)
{
if (this[i] == valeur) return true;
}
return false;
}
function valeurRadio (radio)
{
if (radio.length==undefined) return radio.value;
for (var i=0; i date2.getTime())
return 1;
return -1;
}
function CreateXMLHTTPRequestObject()
{
this.xhr_object = null;
this.response = "";
this.callback = null;
this.ready = true;
this.asynchronous = true;
this._timeoutId = 0;
this.timeout = TIMEOUT_REFRESH;
this.aborded = false;
this.ms_http_version= "";
this.init = function()
{
try {
this.xhr_object = new XMLHttpRequest();
} catch (e) {
var XMLHTTP_IDS = new Array(
'MSXML2.XMLHTTP.3.0',
'MSXML2.XMLHTTP',
'Microsoft.XMLHTTP'
);
var success = false;
if (this.ms_http_version != "")
{
try {
this.xhr_object = new ActiveXObject(this.ms_http_version);
success = true;
} catch (e) {}
}
if (!success)
for (var i=0;i < XMLHTTP_IDS.length && !success; i++) {
try {
this.xhr_object = new ActiveXObject(XMLHTTP_IDS[i]);
success = true;
this.ms_http_version = XMLHTTP_IDS[i];
} catch (e) {}
}
if (!success) {
}
}
}
this.init();
this.indicatorFunction = null;
this.setIndicatorFunction = function(func) {
if(typeof(func) == "function") this.indicatorFunction = func;
}
this.setSynchronous = function() {
this.asynchronous = false;
}
this.setAsynchronous = function() {
this.asynchronous = true;
}
this.setCallBack = function(func) {
this.callback = func;
}
this.getFileGet = function(url, data) {
return this.doRequest(url, "GET", data);
}
this.getFile = this.getFileGet;
this.getFilePost = function(url, data) {
return this.doRequest(url, "POST", data);
}
this.getFileHeader = function(url, header) {
return this.doRequest(url, "HEAD", header);
}
this.doRequest = function(url, method, data)
{
if(!this.ready || !this.xhr_object) return "";
if(this.indicatorFunction) this.indicatorFunction(true);
this.ready = false;
this.aborded = false;
var obj = this;
if(method == "GET" && typeof(data) != "undefined" && data != "") url += "?"+data;
this.xhr_object.open(method, url, this.asynchronous);
if(this.asynchronous) this.xhr_object.onreadystatechange = function() { obj.onreadystatechangeFunction (); }
else this.xhr_object.onreadystatechange = function() {};
if(data) this.xhr_object.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
else data = null;
this.xhr_object.send(data);
if(!this.asynchronous)
if (this.xhr_object.status == 200)
{
if (this._timeoutId) {
window.clearTimeout(this._timeoutId);
this._timeoutId= 0;
}
var all_headers = obj.xhr_object.getAllResponseHeaders();
var content_type = this._getResponseHeader(all_headers, "Content-Type");
if (content_type != "Header inconnu..." && (new RegExp("^text/xml.*$", "gi")).test(content_type))
this.response= this.xhr_object.responseXML;
else
this.response= this.xhr_object.responseText;
var response = this.response;
if(obj.indicatorFunction) obj.indicatorFunction(false);
this.validateRequest();
all_headers=null;
content_type= null;
return response;
}
obj= this;
this._timeoutId = window.setTimeout(function(){ obj.cancelRequest(); }, this.timeout);
return "";
}
this._getResponseHeader = function (headers, header_name)
{
var tmp = headers.split("\n");
for(var i=0, n=tmp.length, t=[]; i