function hide_sel(){
	var s = document.getElementsByTagName('select');
	var len = s.length;
	for (i = 0; i<len; i++){
		s[i].style.visibility = 'hidden';
	}
}

function show_sel(){
	var s = document.getElementsByTagName('select');
	var len = s.length;
	for (i = 0; i<len; i++){
		s[i].style.visibility = 'visible';
	}
}

function pop_it(fichier, largeur, hauteur, options){
    var gauche = ( screen.width - largeur ) / 2;
		var haut = ( screen.height - hauteur ) / 2;
		if(!largeur){largeur = screen.width; gauche = 0;}
		if(!hauteur){hauteur = screen.height; haut = 0;}
		if ( options ){
			options = 'width=' + largeur + 'px, height=' + hauteur + 'px,  top=' + haut + ', left=' + gauche + ', ' + options;
		}
		else{
			options = 'width=' + largeur + 'px, height=' + hauteur + 'px,  top=' + haut + ', left=' + gauche;
		}
		document.open( fichier, '', options );
}

function PopImage(img){
	titre="Zoom Réalisation";
	w=document.open("","","width=400,height=400,top=100px,left=150px,toolbar=no,scrollbars=no,statusbar=no,resizable=yes");	
	w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>");
	w.document.write("<SCRIPT language=javascript>function checksize()  { if (document.images[0].complete) {  window.resizeTo(document.images[0].width+12,document.images[0].height+30); window.focus();} else { setTimeout('check()',250) } }</"+"SCRIPT>");
	w.document.write("<BODY onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><IMG src='"+img+"' border=0>");
	w.document.write("");
	w.document.write("</BODY></HTML>");
	w.document.close();
}

function switch_view(id){
	var d = document.getElementById(id);
	//	Internet Explorer
	if(navigator.appName.indexOf('Internet Explorer') != -1){
		if(d.style.display == 'none'){
			d.style.display = 'block';
		}
		else if(d.style.display == 'block'){
			d.style.display = 'none';
		}
	}
	else if(navigator.appName.indexOf('Netscape') != -1){
		if(d.style.display == 'none'){
			d.style.display = 'block';
		}
		else if(d.style.display == 'block'){
			d.style.display = 'none';
		}
	}
}
