﻿function afficheMaxi(chemin)
   {
      i1 = new Image;
      i1.src = chemin;
      html = '<HTML><HEAD><TITLE>Cliquez sur l\'image pour fermer la fernêtre</TITLE></HEAD><BODY LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0><CENTER><A HREF="javascript:window.close()"><IMG SRC="'+chemin+'" BORDER=0 NAME="imageTest" onLoad="window.resizeTo(document.imageTest.width+32,document.imageTest.height+32)"></A></CENTER></BODY></HTML>';
      popupImage = window.open('','_blank','toolbar=0,location=0,directories=0,menuBar=0,scrollbars=yes,resizable=0,top=0,left=0');
      popupImage.document.open();
      popupImage.document.write(html);
      popupImage.document.close();
   }
function sp(spanx){
	if(document.getElementById("i_"+spanx).innerHTML=="")
	document.getElementById("i_"+spanx).style.display='none'
}

function sorting(tri,direction){
	document.getElementById('frm1').vTri.value=tri
	document.getElementById('frm1').direction.value=direction
	document.getElementById('frm1').action=document.getElementById('frm1').action
	document.getElementById('frm1').submit();
}
function pager(limit){
	document.getElementById('frm1').limit.value=limit
	document.getElementById('frm1').action=document.getElementById('frm1').action
	document.getElementById('frm1').submit();
}
function liste(type,tri){
	document.getElementById('frm1').liste.value=type
	document.getElementById('frm1').vTri.value=tri
	document.getElementById('frm1').direction.value=0
	document.getElementById('frm1').action=document.getElementById('frm1').action
	document.getElementById('frm1').submit();
}
function rapport_vide(pk){
	win =window.open ('/vide.php?pk='+pk,'rapports', config='height=800, width=1000, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no')
	win.focus()
	setTimeout('win.print()',5000)
	
	return false
}
