function masqueSaisieDate(obj) {
var ch;
var ch_gauche, ch_droite;



ch = obj.value;
ch.toString(); 

if ( ( (ch.slice(2,3)) != ("/") ) && (ch.length >= 3) ){
  ch_gauche = ch.slice(0,2);
  ch_droite = ch.slice(2);
  obj.value = ch_gauche + "/" + ch_droite;
}
if ( ( (ch.slice(5,6)) != ("/") ) && (ch.length >= 6) ){
  ch_gauche = ch.slice(0,5);
  ch_droite = ch.slice(5);
  obj.value = ch_gauche + "/" + ch_droite;
}
  return;
}

function masqueSaisieHeure(obj) {
var ch;
var ch_gauche, ch_droite;

ch = obj.value;
ch.toString(); 

if ( ( (ch.slice(2,3)) != (":") ) && (ch.length >= 3) ){
  ch_gauche = ch.slice(0,2);
  ch_droite = ch.slice(2);
  obj.value = ch_gauche + ":" + ch_droite;
}
  return;
}

function montre(id, ind) 
{					
	var d = document.getElementById(id + '_' + ind);			
	for (var i = 1; i<=10; i++) {
		if (i != ind)
		{
			if (document.getElementById(id+ '_' +i)) 
			{
				document.getElementById(id+ '_' +i).style.display='none';				
			}
		}
	}
	if (d) 
	{
		d.style.display='block';
	}
}

function start()
{  
  var ls = window.listStart;
  if(ls)
  {
    for(i=0; i<ls.length; i++)
    {
      fnc = ls[i];
      if(typeof(fnc) == 'function')
      {
        fnc();
      } 
      else 
      {
        eval(fnc);
      }
    }
  }
}

function addToStart(fnc)
{  
	if(!window.listStart)window.listStart = new Array();  
	window.listStart.push(fnc);
}

window.onload=start;

/*Fonction de traitement des png avec fond transparent*/

var windowsInternetExplorer = false;
function detectBrowser()
{
    windowsInternetExplorer = false;
    var appVersion = navigator.appVersion;
    if ((appVersion.indexOf("MSIE") != -1) &&
        (appVersion.indexOf("Macintosh") == -1))
    {
        windowsInternetExplorer = true;
    }
}
var smallTransparentGif = 'spacer.gif';
function IE_CorrectAlpha_PNG(){
	for(i=0; i<document.images.length; i++){
		img    = document.images[i];
		imgExt  = img.src.substring(img.src.length-3, img.src.length);
		imgExt  = imgExt.toUpperCase();
		if (imgExt == "PNG"){
			//alert('style:' + img.style.width + ' - taille:' + img.width);
			if (img.style.width == '' && img.width != '')
			{
				img.style.width = img.width;
				img.style.height = img.height;		
			}			
			var src = img.src;
			img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')";
			img.src = smallTransparentGif ;
			img.attachEvent("onpropertychange", imgPropertyChanged);				
						
			i = i-1;
		}
	}
}
     var userAgent=navigator.userAgent;
     var isIE5Min = getIEVersionNumber() <= 6;
     
     if (userAgent.indexOf('MSIE') != -1 && getIEVersionNumber() <= 6) {	          
	     //window.attachEvent("onload", IE_CorrectAlpha_PNG);
     }


var inImgPropertyChanged = false;
function imgPropertyChanged()
{
    if ((window.event.propertyName == "src") && (! inImgPropertyChanged))
    {
        inImgPropertyChanged = true;
        var el = window.event.srcElement;
        if (el.src != smallTransparentGif)
        {
            el.filters.item(0).src = el.src;
            el.src = smallTransparentGif;
        }
        inImgPropertyChanged = false;
    }
}

function getIEVersionNumber() {
    var ua = navigator.userAgent;
    var MSIEOffset = ua.indexOf("MSIE ");
    
    if (MSIEOffset == -1) {
        return 0;
    } else {
        return parseFloat(ua.substring(MSIEOffset + 5, ua.indexOf(";", MSIEOffset)));
    }
}








