// JavaScript Document
var var_res;
var nb_pix;
var result;


function affiche_calque(ind_lay){

result = test_resolution(ind_lay);
if (result == 0) return ; 
if (ind_lay == 1 )
{
document.write('<div id=\"ssmenu1\" style=\"position:absolute; left:' + nb_pix + 'px; top:137px; width:139px; height:56px; z-index:1; visibility: hidden;\" class=\"menu-acc\" onMouseOut=\"MM_showHideLayers(\'ssmenu1\',\'\',\'hide\')\" onMouseOver=\"MM_showHideLayers(\'ssmenu1\',\'\',\'show\')\">');
document.write('<table width=\"140\" height=\"61\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"menu-acc-int\">');
document.write('<tr>'); 
document.write('<td width=\"133\" height=\"12\">&#8226;<a href=\"munic1.htm\"> Les &eacute;lus municipaux </a></td>');
document.write('</tr>');
document.write('<tr>'); 
document.write('<td height=\"12\">&#8226; <a href=\"munic5.htm\">Commissions et syndicats</a></td>');
document.write('</tr>');
document.write('<tr>'); 
document.write('<td height=\"12\">&#8226; <a href=\"munic2.htm\">Les comptes rendus</a></td>');
document.write('</tr>');
document.write('<tr>'); 
document.write('<td height=\"12\">&#8226; <a href=\"munic3.htm\">Les projets en cours</a></td>');
document.write('</tr>');
document.write('<tr>'); 
document.write('<td height=\"13\">&#8226; <a href=\"munic4.htm\">Informations mairie</a></td>');
document.write('</tr>');
document.write('</table>');
document.write('</div>');
}
if (ind_lay == 2)
{
document.write('<div id=\"ssmenu2\" style=\"position:absolute; left:' + nb_pix + 'px; top:137px; width:139px; height:51px; z-index:1; visibility: hidden;\" class=\"menu-acc\" onMouseOver=\"MM_showHideLayers(\'ssmenu2\',\'\',\'show\');MM_showHideLayers(\'ssmenu3\',\'\',\'hide\')\" onMouseOut=\"MM_showHideLayers(\'ssmenu2\',\'\',\'hide\')\">');
document.write('<table width=\"140\" height=\"53\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"menu-acc-int\">');
document.write('<tr>'); 
document.write('<td width=\"149\" height=\"12\">&#8226;<a href=\"administratif.htm\"> Documents officiels </a></td>');
document.write('</tr>');
document.write('<tr>'); 
document.write('<td height=\"12\">&#8226; <a href=\"administratif-02.htm\">Renseignements divers</a></td>');
document.write('</tr>');
document.write('<tr>'); 
document.write('<td height=\"12\">&#8226; <a href=\"administratif-03.htm\">Formulaires en ligne</a></td>');
document.write('</tr>');
document.write('<tr>'); 
document.write('<td height=\"12\">&#8226; <a href=\"administratif-04.htm\">Liens utiles</a></td>');
document.write('</tr>');
document.write('</table>');
document.write('</div>');
}

if ( ind_lay == 3)
{
document.write('<div id=\"ssmenu3\" style=\"position:absolute; left:' + nb_pix + 'px; top:137px; width:139px; height:77px; z-index:1; visibility: hidden;\" class=\"menu-acc\" onMouseOver="MM_showHideLayers(\'ssmenu3\',\'\',\'show\');MM_showHideLayers(\'ssmenu2\',\'\',\'hide\')\" onMouseOut=\"MM_showHideLayers(\'ssmenu3\',\'\',\'hide\')">');
document.write('<table width=\"140\" height=\"96\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"menu-acc-int\">');
document.write('<tr>'); 
document.write('<td width=\"149\" height=\"12\">&#8226;<a href=\"activites.htm\"> Activit&eacute;s &agrave; Saint-Oyen</a></td>');
document.write('</tr>');
document.write('<tr>'); 
document.write('<td height=\"12\">&#8226; <a href=\"activite-balade.htm\">Balades autour de Saint-Oyen</a></td>');
document.write('</tr>');
document.write('<tr>'); 
document.write('<td height=\"12\">&#8226; <a href=\"activite-loisir.htm\">Loisirs et d&eacute;tentes</a></td>');
document.write('</tr>');
document.write('<tr>'); 
document.write('<td height=\"12\">&#8226; <a href=\"activite-sport.htm\">Sports</a></td>');
document.write('</tr>');
document.write('<tr>'); 
document.write('<td height=\"12\">&#8226; <a href=\"activite-culture.htm\">Cultures et patrimoines</a></td>');
document.write('</tr>');
document.write('<tr>'); 
document.write('<td height=\"12\">&#8226; <a href=\"activite-terroir.htm\">Terroir</a></td>');
document.write('</tr>');
document.write('<tr>'); 
document.write('<td height=\"12\">&#8226; <a href=\"activite-site.htm\">Grands sites en Tarentaise</a></td>');
document.write('</tr>');
document.write('<tr>'); 
document.write('<td height=\"12\">&#8226; <a href=\"activite-ot.htm\">Offices de tourisme</a></td>');
document.write('</tr>');
document.write('</table>');
document.write('</div>');
}
if ( ind_lay == 4)
{

document.write('<div id=\"ssmenu4\" style=\"position:absolute; left:' + nb_pix + 'px; top:137px; width:114px; height:73px; z-index:2; visibility: hidden;\" class=\"menu-acc\">');
document.write('<table width=\"140\" height=\"72\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"menu-acc-int\">');
document.write('<tr>'); 
document.write('<td width=\"149\" height=\"12\">&#8226; <a href=\"#"\ onClick=\"MM_openBrWindow(\'contact-form.htm\',\'\',\'width=535,height=410\')\">Contacter la mairie</a></td>');
document.write('</tr>');
document.write('<tr>'); 
document.write('<td height=\"12\">&#8226; <a href=\"#\" onClick=\"MM_openBrWindow(\'contact-form1.htm\',\'\',\'width=535,height=410\')\">Contacter Madame le Maire</a></td>');
document.write('</tr>');
document.write('<tr>'); 
document.write('<td height=\"12\" onClick=\"MM_openBrWindow(\'contact-form2.htm\',\'\',\'width=535,height=410\')\">&#8226; <a href=\"#\">Contacter 1er adjoint</a></td>');
document.write('<tr>'); 
document.write('<td height=\"12\">&#8226; <a href=\"#\" onClick=\"MM_openBrWindow(\'contact-form3.htm\',\'\',\'width=535,height=410\')\">Contacter 2nd adjoint</a></td>');
document.write('</tr>');
document.write('<tr>'); 
document.write('<td height=\"12\">&#8226; <a href=\"#\" onClick=\"MM_openBrWindow(\'contact-form4.htm\',\'\',\'width=535,height=410\')\">Contacter les conseillers</a></td>');
document.write('</tr>');
document.write('<tr>'); 
document.write('<td height=\"12\">&#8226; <a href=\"#\" onClick=\"MM_openBrWindow(\'contact-form5.htm\',\'\',\'width=535,height=410\')\">Contacter le CMJ</a></td>');
document.write('</tr>');
document.write('</table>');
document.write('</div>');
}

}


function test_resolution(ind_lay){

 var_res = screen.width;

 //document.write('contenu de RES :' + var_res);

  if(var_res<740){
     return (0);
  }
  
  if(var_res>=798 & var_res<810){
    
  if (ind_lay == 1) {
    nb_pix = 23 ; 
	} else
	  if (ind_lay == 2) {
	    nb_pix = 164 ; 
	} else
	if (ind_lay == 3) {
	    nb_pix = 297 ; 
	} else 
	  {
	     nb_pix = 614 ; 
      }	
  
  }
  
  if(var_res>=835 & var_res<1035){
   
    if (ind_lay == 1) {
    nb_pix = 135 ; 
	} else
	  if (ind_lay == 2) {
	    nb_pix = 277 ; 
	} else
	if (ind_lay == 3) {
	    nb_pix = 409 ; 
	} else {
	     nb_pix = 727 ; 
      }	
  }
  
   if(var_res>=1035 & var_res<1290){
   
    if (ind_lay == 1) {
    nb_pix = 264 ; 
	} else
	  if (ind_lay == 2) {
	    nb_pix = 405 ; 
	} else
	if (ind_lay == 3) {
	    nb_pix = 535 ; 
	} else 
	  {
	     nb_pix = 853 ; 
      }	
  }
  
   if(var_res>=1290){
    return (0); }
  
 //document.write('contenu de nb_pix :' + nb_pix);
  return (1) ;
}

