// JavaScript Document

function showBlock(id) {
	if (document.getElementById(id)) {document.getElementById(id).style.display='block';}
}
function hideBlock(id) {
	if (document.getElementById(id)) {document.getElementById(id).style.display='none';}
}

function getSize(id,name)
{
	maLargeur =  Math.ceil(name.length*6.8);  
	if ( maLargeur < 68) { maLargeur  = 68; }
	if (document.getElementById(id)) {document.getElementById(id).style.width=maLargeur+'px';}

}



sfHover = function() {
	var sfEls = document.getElementById("menu").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);





function montre(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
		//if (document.getElementById('snav'+i)) {document.getElementById('snav'+i).style.display='none';}
	}
if (d) {d.style.display='block';}
}

function autoSize()
  {
  if (IE5) self.resizeTo(document.images[0].width+10,document.images[0].height+31);
  else if (NN6) self.sizeToContent();
  else window.resizeTo(document.images[0].width,document.images[0].height+20);
  self.focus()
  } 


function resizePopUp(monImage)
  {
  w = window.open('','chargement','width=10,height=10');
  w.document.write( "<html><head><title></title>\n" );
  w.document.write( "<script language='JavaScript'>\n");
  w.document.write( "IE5=NN4=NN6=false;\n");
  w.document.write( "if(document.all)IE5=true;\n");
  w.document.write( "else if(document.getElementById)NN6=true;\n");
  w.document.write( "else if(document.layers)NN4=true;\n");
  w.document.write( "function autoSize() {\n");
  w.document.write( "if(IE5) self.resizeTo(document.images[0].width+10,document.images[0].height+31)\n");
  w.document.write( "else if(NN6) self.sizeToContent();\n");
  w.document.write( "else window.resizeTo(document.images[0].width,document.images[0].height+20)\n");
  w.document.write( "self.focus();\n");
  w.document.write( "}\n</scri");
  w.document.write( "pt>\n");
  w.document.write( "</head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 onLoad='javascript:autoSize();'>" );
  w.document.write( "<a href='javascript:window.close();'><img src='"+monImage+"' border=0></a>" );
  w.document.write( "</body></html>" );
  w.document.close();
  }