if ( document.all ) {
	function blink_show()
	{
		blink_tags  = document.all.tags('blink');
		blink_count = blink_tags.length;
		for ( i = 0; i < blink_count; i++ )
		{
			blink_tags[i].style.visibility = 'visible';
		}
		
		window.setTimeout( 'blink_hide()', 700 );
	}
	
	function blink_hide()
	{
		blink_tags  = document.all.tags('blink');
		blink_count = blink_tags.length;
		for ( i = 0; i < blink_count; i++ )
		{
			blink_tags[i].style.visibility = 'hidden';
		}
		
		window.setTimeout( 'blink_show()', 250 );
	}
	
	window.onload = blink_show;
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function m_over(num) {
	if (Timer != "-1") {
  	clearTimeout(Timer);
  }
	m_reset(num);
}

function m_out() {
	Timer = window.setTimeout('m_reset('+num_base+')',1300);	
}

function sm_over(num) {
  if (s_num_base != 0 && init_time != 1 && num_base == num_active) {
    init_time = 1;
    sm_out(s_num_base);
    init_time = 0;
  }
  //alert('s'+num_active+'_'+num);
  stop_timer();
  url = document["s"+num_active+'_'+num].src;
  new_url = url.replace(/.gif/,"-1.gif");
  MM_swapImage('s'+num_active+'_'+num,'',new_url,1);
}

function sm_out(num) {
  url = document["s"+num_active+'_'+num].src;
  new_url = url.replace(/-1.gif/,".gif");
  MM_swapImage('s'+num_active+'_'+num,'',new_url,1);
  if (s_num_base != 0 && init_time != 1 && num_base == num_active) {
    sm_over(s_num_base);
  } else {
  	add_timer();
  }
}

function m_init(chap,souschap) {
  init_time = 1;
  s_num_base = 0;
  Timer = -1;
  num_base = chap;
	m_reset(chap);
	if (souschap != 0) {
	   sm_over(souschap);
	   s_num_base = souschap;
	}
	init_time = 0;
}

function m_reset(num) {
  m_hide(0);m_hide(1);m_hide(2);m_hide(3);m_hide(4);m_hide(5);m_hide(6);m_hide(7);
  m_show(num);
}

function m_hide(num) {
  if (num > 0) {
    url = document["m"+num].src;
  	new_url = url.replace(/-1.gif/,".gif");
  	MM_swapImage('m'+num,'',new_url,1);
  }
  document.getElementById("s" + num).style.display = "none";
}

function m_show(num) {
  if (num > 0) {
    url = document["m"+num].src;
  	new_url = url.replace(/.gif/,"-1.gif");
  	MM_swapImage('m'+num,'',new_url,1);
  }
  document.getElementById("s" + num).style.display = "";
  num_active = num;
}

function stop_timer () {
  clearTimeout(Timer);
}
function add_timer () {
  m_out();
}

//////////////////////


content_viewed = 0;
function display_show(num) {
  for (i=1;i<=20;i++) {
    if (document.getElementById("content_"+i) == undefined) {
	    break;
	  }
    document.getElementById("title_"+i).className = "display_title";
	  document.getElementById("content_"+i).className = "display_content";
  }
  if (content_viewed != 0) {
    document.getElementById("title_"+content_viewed).className = "display_title";
	  document.getElementById("content_"+content_viewed).className = "display_content";
  }
  if (content_viewed != num) {
	  if(document.getElementById("title_"+num)) document.getElementById("title_"+num).className = "display_title_on";
	  if(document.getElementById("content_"+num)) document.getElementById("content_"+num).className = "display_content_on";
	  content_viewed = num;
  } else {
  	content_viewed = 0;
  }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  fen = window.open(theURL,winName,features);
	fen.focus();
}

function pop(quoi) {
	if (quoi == "eau") {
		MM_openBrWindow('/tarifs/eau.html','TARIFS','status=yes,scrollbars=yes,resizable=yes,width=600,height=400');
	} else if (quoi == "electricite") {
		MM_openBrWindow('/tarifs/electricite.html','TARIFS','status=yes,scrollbars=yes,resizable=yes,width=780,height=400');
		
	} else if (quoi == "gaz") {
		MM_openBrWindow('/tarifs/gaz-particuliers.html','TARIFS','status=yes,scrollbars=yes,resizable=yes,width=780,height=400');
		
		} else if (quoi == "gaz_pro") {
			MM_openBrWindow('/tarifs/gaz-entreprise-professionnel.html','TARIFS','status=yes,scrollbars=yes,resizable=yes,width=780,height=400');
		}
    
}
