// JavaScript Document

<!--   POSITIONNE LE TABLEAU AU CENTRE DE LA PAGE -->
function pos_layer(pos, layerid, layerz, layerwidth, layerheight, nomargin){

<!--pos = "center", "bottomright", "bottomleft" -->

 var myWidth = 0, myHeight = 0;
 var layerTop = 0, layerLeft = 0;
 var layer = '';
 var marge= 20;

  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
	if (nomargin) marge=0;

  if (pos == 'center'){
  	layerLeft = Math.round((myWidth - layerwidth) / 2 );
	layerTop = Math.round((myHeight - layerheight) / 2 );
  } else if (pos == 'bottomright'){
 	layerLeft = (myWidth - layerwidth) - marge ;
	layerTop = (myHeight - layerheight) - marge ;
  }else if (pos == 'bottomleft'){
 	layerLeft = marge ;
	layerTop = (myHeight - layerheight) - marge ;
  }

  layer='<div id=\"' + layerid + '\" style=\"position:absolute; left:' + layerLeft + 'px; top:' + layerTop + 'px; width:' + layerwidth + 'px; z-index:' + layerz + '\">';
  document.write(layer);

}
<!--  FIN POSITIONNE LE TABLEAU AU CENTRE DE LA PAGE -->

