var DOTS = "#define x_width 2\n#define x_height 1\nstatic char x_bits[]={0x01}";

function menu() {
   var pTag1 = document.getElementById('active-alcool');
   var pTag2 = document.getElementById('active-courses');
   var pTag3 = document.getElementById('active-jeux');
   var pTag4 = document.getElementById('active-sports');
   var pTag5 = document.getElementById('active-tirages');
   
   var pTag6 = document.getElementById('smenu-alcool');
   var pTag7 = document.getElementById('smenu-courses');
   var pTag8 = document.getElementById('smenu-jeux');
   var pTag9 = document.getElementById('smenu-sports');
   var pTag10 = document.getElementById('smenu-tirages');
   

   if (pTag1){
    pTag6.className = "voir";
   }
   if (pTag2){
    pTag7.className = "voir";
   }
   if (pTag3){
    pTag8.className = "voir";
   }
   if (pTag4){
    pTag9.className = "voir";
   }
   if (pTag5){
    pTag10.className = "voir";
    //setAttribute('class', 'voir');
   }
}

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.0
  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 && document.getElementById) x=document.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 MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
  }

<!-- Début
function Changer_page_demarrage(){
	// Si c'est Internet Exploiter
	if (document.all){
	  document.write('<a href="#" onClick="this.style.behavior=\'url(#default#homepage)\';this.setHomePage(\'http://www.int.msp.gouv.qc.ca\');">');
	  document.write('Page de démarrage de l\'intranet</a>');
	}
	
	// Si c'est Netscrape 6 ou Mozilla..ou autres dans le genre
	else if (document.getElementById){
	  document.write('Page de démarrage de l\'intranet : <br /><a href="http://www.int.msp.gouv.qc.ca">glissez ce lien sur le bouton d\'accueil du navigateur</a>');
	}
	//Pis les autres navigateurs, on s'en fiche, 
	//ils ont juste à en télécharger un récent :oP	
}
//Fin -->

function Homepage(){
<!--
// in real bits, urls get returned to our script like this:
// res://shdocvw.dll/http_404.htm#http://www.DocURL.com/bar.htm 

	//For testing use DocURL = "res://shdocvw.dll/http_404.htm#https://www.microsoft.com/bar.htm"
	DocURL=document.URL;
	
	//this is where the http or https will be, as found by searching for :// but skipping the res://
	protocolIndex=DocURL.indexOf("://",4);
	
	//this finds the ending slash for the domain server 
	serverIndex=DocURL.indexOf("/",protocolIndex + 3);

	//for the href, we need a valid URL to the domain. We search for the # symbol to find the begining 
	//of the true URL, and add 1 to skip it - this is the BeginURL value. We use serverIndex as the end marker.
	//urlresult=DocURL.substring(protocolIndex - 4,serverIndex);
	BeginURL=DocURL.indexOf("#",1) + 1;
	urlresult=DocURL.substring(BeginURL,serverIndex);
		
	//for display, we need to skip after http://, and go to the next slash
	displayresult=DocURL.substring(protocolIndex + 3 ,serverIndex);
	InsertElementAnchor(urlresult, displayresult);
}

function HtmlEncode(text)
{
    return text.replace(/&/g, '&amp').replace(/'/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
}

function TagAttrib(name, value)
{
    return ' '+name+'="'+HtmlEncode(value)+'"';
}

function PrintTag(tagName, needCloseTag, attrib, inner){
    document.write( '<' + tagName + attrib + '>' + HtmlEncode(inner) );
    if (needCloseTag) document.write( '</' + tagName +'>' );
}

function URI(href)
{
    IEVer = window.navigator.appVersion;
    IEVer = IEVer.substr( IEVer.indexOf('MSIE') + 5, 3 );

    return (IEVer.charAt(1)=='.' && IEVer >= '5.5') ?
        encodeURI(href) :
        escape(href).replace(/%3A/g, ':').replace(/%3B/g, ';');
}

function InsertElementAnchor(href, text)
{
    PrintTag('A', true, TagAttrib('HREF', URI(href)), text);
}

function expandMenu(selobj) {
 var noeud = selobj.nextSibling;

 while (noeud != null && !(noeud.nodeType == 1 && (noeud.className == "cache" || noeud.className == "voir"))) 
 {
  noeud = noeud.nextSibling;
 }
 if (noeud != null) {
  if (noeud.className == "cache") 
  {
   noeud.className = "voir";
  } 
  else if (noeud.className == "voir") {
   noeud.className = "cache";
  }
 }
}

  
