function attrapeObj(idf) { 
	if (browser=='Netscape Navigator' && version.charAt(0)=='4') {
		//alert('NS4');
		return document.layers[idf];
	} else if (browser=='Netscape Navigator' && version.charAt(0)=='5') {
		//alert('NS5');
		//return "document."+idf+".style";
		//return "document."+idf;
		return "document.getElementById('"+idf+"')";
  } else if (browser=='Netscape Navigator' && version.charAt(0)=='6') {
		//alert('NS6');
		//return "document.getElementById('"+idf+"').style";
		return "document.getElementById('"+idf+"')";
	} else if (browser=='Netscape Navigator' && version.charAt(0)=='7') {
		//alert('NS7');
		//return "document.getElementById('"+idf+"').style";
		return "document.getElementById('"+idf+"')";
  } else if (browser=='Internet Explorer') {
		//alert('IE');
		//return "document.all."+idf+".style";
    //return "document.all."+idf;
    return "document.getElementById('"+idf+"')";
  } else if (browser=='Safari') {
		//alert('Safari');
		//return "document.getElementById('"+idf+"').style";
	  return "document.getElementById('"+idf+"')";
  } else { return null }
}

function recupObj(idf,prop) {
     var objetProp=attrapeObj(idf);
     //alert(browser+"/"+version);
     if(objetProp){
	 return eval(objetProp+'.'+prop);
	 }
}

function modifObj(idf,prop,value) {
     var objetstyle=attrapeObj(idf);
     //alert(browser+"/"+version);
     if(objetstyle){
	 eval(objetstyle+'.'+prop+'="'+value+'"');
	 }
}


function load(url,id,width) {
      if (document.layers)
        document.layers[id].load(url,width);
    else
        if (window.frames.length > -1)
            window.frames[id].location.href = url;
}


//array splice function emulating for ie5
function Array_splice(index, delTotal) {
  var temp = new Array()
  var response = new Array()
  var A_s = 0
  for (A_s = 0; A_s < index; A_s++) {
   temp[temp.length] = this[A_s]
   }
  for (A_s = 2; A_s < arguments.length; A_s++) {
   temp[temp.length] = arguments[A_s]
   }
  for (A_s = index + delTotal; A_s < this.length; A_s++) {
   temp[temp.length] = this[A_s]
   }
  for (A_s = 0; A_s < delTotal; A_s++) {
   response[A_s] = this[index + A_s]
   }
  this.length = 0
  for (A_s = 0; A_s < temp.length; A_s++) {
   this[this.length] = temp[A_s]
   }
  return response
  }

if (typeof Array.prototype.splice == "undefined") {
  Array.prototype.splice = Array_splice
  }

function action(v) {
    alert(v);
}

// Correctly handle PNG transparency in Win IE 5.5 or higher.
// http://homepage.ntlworld.com/bobosola. Updated 02-March-2004
function correctPNG(prefixe,istart,istop)
   {
   if (browser=="Internet Explorer" && OS=="Windows" && version=="6.0") {
   //alert('Activation Correction des PNG');
  modifPNG();
      }
  if (browser=="Internet Explorer" && OS=="Windows" && version=="5.5") {
  modifPNG();
  // alert('Activation Correction des PNG');
   }
  if (browser=="Internet Explorer" && OS=="Windows" && version=="5.0") {
   alert('You are using IE 5.0 browser. Web pages will use Gif images instead of pretty PNG ones. PLease upgrade !!!');
   remplaceGIF();
   }
   //reaffichage des images si non IE
    reaffiche('bt_',1,13);
    reaffiche(prefixe,istart,istop)
}
   
//fonction de reaffichage des images si non IE
function reaffiche(prefixe,istart,istop)
{
for(var i=istart; i<istop; i++)
{
  var cible=prefixe+i;
  //alert(cible);
  modifObj(cible,'style.visibility','visible');
}
}

//application filtre PNG
function modifPNG()
   {
   //alert('Activation Correction des PNG');
   for(var i=0; i<document.images.length; i++)
      {
	  var img = document.images[i];
	  var imgName = img.src.toUpperCase();
	  if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
	     {
		 var imgID = (img.id) ? "id='" + img.id + "' " : "";
		 var imgClass = (img.className) ? "class='" + img.className + "' " : "";
		 var imgName = "name='"+imgName+"' ";
		 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";
		 var imgStyle = "display:inline-block" + img.style.cssText;
		 if (img.align == "left") imgStyle = "float:left;" + imgStyle;
		 if (img.align == "right") imgStyle = "float:right;" + imgStyle;
		 if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle;		
		 var strNewHTML = "<div "+imgID+imgClass+imgTitle+" style=\""+"width:"+img.width+"px; height:"+img.height+"px;"+imgStyle+";"+"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"+"(src=\'"+img.src+"\', sizingMethod='image'); visibility='visible'\"></div>";
		 img.outerHTML = strNewHTML;
		 //alert(strNewHTML);
		 i = i-1;
	     }
      }
      }
      
//remplacement par gif
function remplaceGIF()
{
  for(var i=0; i<document.images.length; i++)
      {
	  var img = document.images[i];
	  var imgName = img.src.toUpperCase();
	  if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
	     {
	     var source=img.src.substring(0,img.src.length-3)+'gif';
	    img.src=source;
  		 i = i-1;
	     }
}
}
      

//detection du navigateur
var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;

//alert(detect);

if (checkIt('konqueror'))
{
	browser = "Konqueror";
	OS = "Linux";
}
else if (checkIt('safari')) browser = "Safari";
else if (checkIt('omniweb')) browser = "OmniWeb";
else if (checkIt('opera')) browser = "Opera";
else if (checkIt('webtv')) browser = "WebTV";
else if (checkIt('icab')) browser = "iCab";
else if (checkIt('msie')) browser = "Internet Explorer";
else if (checkIt('netscape')) browser = "Netscape Navigator";
//else if (!checkIt('compatible'))
//{
//	browser = "Netscape Navigator";
//	version = detect.charAt(8);
//}
else browser = "An unknown browser";

if (!version) version = detect.charAt(place + thestring.length)+detect.charAt(place + thestring.length + 1)+detect.charAt(place + thestring.length + 2);
if (!OS)
{
	if (checkIt('linux')) OS = "Linux";
	else if (checkIt('x11')) OS = "Unix";
	else if (checkIt('mac')) OS = "Mac";
	else if (checkIt('win')) OS = "Windows";
	else OS = "an unknown operating system";
}

function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}
//FIN detection du navigateur
