<!--

function writeNavigation02(sTagUd, DataForm, sUrl, NbrEltByPage, iMaxPage, sFontFace,iSize, sColor,sImgPrec, sImgSuiv, bOnePage){


	var nbrpage=0;
	var scote=String.fromCharCode(39);
	var sText='';
	var nb=0;
	var nPageActive=GetPageActive(sTagUd, DataForm);
	var nNombrePage= GetNombrePage(sTagUd, DataForm, NbrEltByPage);
	var nFirstpage=0;
	var nLastpage=0;

	if ((typeof(sColor)=='undefined')||(sColor=='')){
		sColor = '#FF6600';
	}
	if ((typeof(iSize)=='undefined')||(iSize=='')){
		iSize = 1;
	}
	if ((typeof(sFontFace)=='undefined')||(sFontFace=='')){
		sFontFace = 'Verdana';
	}
	if ((typeof(sImgPrec)=='undefined')||(sImgPrec=='')){
		sImgPrec = '';
	}
	if ((typeof(sImgSuiv)=='undefined')||(sImgSuiv=='')){
		sImgSuiv = '';
	}
	if ((typeof(bOnePage)=='undefined')||(bOnePage=='')){
		bOnePage = 'true';
	}

	nbrpage = GetNombrePage(sTagUd, DataForm, NbrEltByPage);
	if ((nbrpage > 1) || ((nbrpage == 1) && (bOnePage=='true'))){
		if (nPageActive <= iMaxPage){
			nFirstpage = 1;
		}
		else{
			nFirstpage = Number(nPageActive - ((nPageActive-1) % iMaxPage));
		}
		/* nFirstpage = Number((( GetDivInt(nPageActive,(iMaxPage+1))  )*iMaxPage)+1); */

		nLastpage=nFirstpage + iMaxPage-1;
		if (nLastpage>nbrpage){
			nLastpage=nbrpage;
		}


		if (nbrpage>0){
			sText += '<center><div style="width:100px;height:50px;float:left;">';
			sText += '<FONT face=' + sFontFace + ' size='+ iSize +' color=' + sColor + '>';
			if (nFirstpage > 1 ) {
				sText += '&nbsp;<a href="javascript:PaginationGoto(\'' + sTagUd + '\',' ;
				sText += '\'' + sUrl + '\', document.' + DataForm.name + ',' + Number(Number(nFirstpage)-iMaxPage) + ');">';
				if (sImgSuiv!=''){
					sText += '<br><IMG ID="precedent" NAME="precedent" SRC="' + sImgPrec + '" BORDER="0">';
				}
				else{	
					sText += '<<';
				}
				sText += '</a>';
			}
			sText+='</FONT>';
			sText += '</div>';

			sText += '<div style="height:50px;width:250px;float:left;">';
			sText += '<FONT face=' + sFontFace + ' size='+ iSize +' color=' + sColor + '>';
			sText += '<B>[ Page ' + nPageActive +' / ' + nNombrePage + ' ]</B><br><br>';	

			for (var i=nFirstpage;i<=nLastpage;i++){
				if (i!=nPageActive){
					sText += '&nbsp;<a href="javascript:PaginationGoto(\'' + sTagUd + '\',' ;
					sText += '\'' + sUrl + '\', document.' + DataForm.name + ',' + i + ');">';
					sText += i;
					sText += "</a>&nbsp;|";
				}
				else{
					sText += '&nbsp;<FONT size=4 color=#FF6600>' + i + "</FONT>&nbsp;|";
				}
			}
			sText+='</B></FONT>';
			sText += '</div>';

			sText += '<div style="width:100px;height:50px;float:left;">';
			sText += '<FONT face=' + sFontFace + ' size='+ iSize +' color=' + sColor + '>';

			if (nLastpage<nbrpage ) {

				sText += '&nbsp;<a href="javascript:PaginationGoto(\'' + sTagUd + '\',' ;
				sText += '\'' + sUrl + '\', document.' + DataForm.name + ',' + Number(Number(nLastpage)+1) + ');">';
				if (sImgSuiv!=''){
					sText += '<br><IMG ID="suivant" NAME="suivant" SRC="' + sImgSuiv + '" BORDER="0">';
				}
				else{	
					sText += '>>';
				}
				sText += '</a>';
			}
			sText+='</FONT>';
			sText += '</div></center>';
		}
	}
	document.write(sText);
}


function Next(sTagUd, sUrl, dataForm) {
	if (dataForm[sTagUd + "_page_next"].value != 0) {
		dataForm.action = sUrl + '&' + sTagUd + '_page=' +  dataForm[ sTagUd + "_page_next"].value;
		dataForm.method = "post";
		dataForm.submit();
	} else {
		alert('Vous avez atteint la fin de la liste !');
	}
}
function Prev(sTagUd, sUrl, dataForm) {
	if (dataForm[ sTagUd + "_page_prev"].value != 0) {
		dataForm.action = sUrl + '&' + sTagUd + '_page=' +  dataForm[ sTagUd + "_page_prev"].value;
		dataForm.method = "post";
		dataForm.submit();
	} else {
		alert('Vous avez atteint le début de la liste !');
	}
}

function PaginationGoto(sTagUd, sUrl, dataForm, Num) {
	dataForm.action = sUrl + '&' + sTagUd + '_page=' +  Num;
	dataForm.method = "post";
	dataForm.submit();
}

function GetDivInt(i, diviseur) {
	return Number((Number((i-(i %  diviseur)) /  diviseur)));
}
function GetNombrePage(sTagUd, dataForm, NbrEltByPage) {
	var i;
	i = GetNombreElementTotal(sTagUd, dataForm);
	return Number((Number((i-(i %  NbrEltByPage)) /  NbrEltByPage) + Number(((i %  NbrEltByPage)>0)?(1):(0))));
}
function GetPageActive(sTagUd, dataForm) {
	return Number(Number(dataForm[sTagUd + "_page_prev"].value)+1);
}
function GetNombreElementTotal(sTagUd, dataForm) {
	return dataForm[sTagUd + "_page_total"].value;
}
function GetTauxChargement(sTagUd, dataForm, NbrEltByPage) {
	if (GetNombrePage(sTagUd, dataForm, NbrEltByPage) > 0) {
		return 100 * (GetPageActive(sTagUd, dataForm) / GetNombrePage(sTagUd, dataForm, NbrEltByPage));
	} else {
		return 100;
	}
}

function DrawBarre(sTagUd, DataForm, sUrl, NbrEltByPage, sPageActive, iWidth, iLargeurBlock, iHeight) {

	var cmd = '';
	var sHref;
	var iNbrPage = GetNombrePage(sTagUd, DataForm, NbrEltByPage);
	var iNumPage=0;
	var sMapVar='';
	var sMapAll='';

	var iLarg1 = GetDivInt((sPageActive*iWidth), iNbrPage);
	if (GetDivInt(iLargeurBlock, (iWidth/iNbrPage)) == 0) {
		iLargeurBlock = GetDivInt(iWidth , iNbrPage);
	} else {
		iLargeurBlock = GetDivInt( iLargeurBlock, (iWidth/iNbrPage)); // Nbr page par block
		iLargeurBlock = iLargeurBlock * GetDivInt(iWidth , iNbrPage);
	}

	iWidth = iNbrPage * (GetDivInt(iWidth, iNbrPage));

	if ((sPageActive % ((iLargeurBlock * iNbrPage)/iWidth)) == 0) {
		iLarg1 = GetDivInt(sPageActive, ((iLargeurBlock * iNbrPage)/iWidth) );
		iLarg1 *= iLargeurBlock;
	} else {
		iLarg1 = GetDivInt(sPageActive, ((iLargeurBlock * iNbrPage)/iWidth) )+1;
		iLarg1 *= iLargeurBlock;
	}

	for (var i=0; i<iLarg1;i+=(iLargeurBlock)) {
		iNumPage = GetDivInt( ((i+1)*iNbrPage), iWidth)+1;

		sHref = '';
		sHref += '"javascript:PaginationGoto(\'' + sTagUd + '\',' ;
		sHref += '\'' + sUrl + '\', document.' + DataForm.name + ',' + iNumPage + ');"';
		sMapVar += '<AREA SHAPE="RECT" COORDS="' + i + ',0,' + (i+(iLargeurBlock-1)) + ',' + iHeight + '" HREF=' + sHref + '>';
	}
	for (var i=0; i<(iWidth - iLarg1);i+=(iLargeurBlock)) {
		iNumPage = GetDivInt( (((i+1)+iLarg1)*iNbrPage), iWidth)+1;
		sHref = '';
		sHref += '"javascript:PaginationGoto(\'' + sTagUd + '\',' ;
		sHref += '\'' + sUrl + '\', document.' + DataForm.name + ',' + iNumPage + ');"';
		sMapAll += '<AREA SHAPE="RECT" COORDS="' + i + ',0,' + (i+(iLargeurBlock-1)) + ',' + iHeight + '" HREF=' + sHref + '>';
	}

	cmd += '<MAP NAME="MapVar">';
	cmd += sMapVar;
	cmd += '</MAP>';

	cmd += '<MAP NAME="MapALL">';
	cmd += sMapAll;
	cmd += '</MAP>';

	cmd += '<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 VALIGN=TOP HEIGHT="' + iHeight + 'px" WIDTH="' + iWidth + 'px">';
	cmd += '<TR HEIGHT="' + iHeight + 'px">';
	cmd += '<TD valign=middle WIDTH="' + iLarg1 + 'px">';
	cmd += '<IMG BORDER=0 SRC="image/admin/barre_gauche.gif" WIDTH="' + iLarg1 + 'px" HEIGHT="' + iHeight + 'px" useMap=#MapVar>';
	cmd += '</TD>';
	if ((iWidth - iLarg1)>0) {
		cmd += '<TD  valign=middle WIDTH="' + (iWidth - iLarg1) + 'px">';
		cmd += '<IMG BORDER=0 SRC="image/admin/barre_droite.gif" WIDTH="' + (iWidth - iLarg1) + 'px" HEIGHT="' + iHeight + 'px" USEMAP=#MapALL>';
		cmd += '</TD>';
	}
	cmd += '</TR></TABLE>';
	return(cmd);
}
//-->
