
var nbAffiche=0;
var winx = screen.width;
var maxAcceptLarge=0;
var maxAcceptHaut=0;
var posiMaxHaut=0;
var posiMaxLarge=0;
var varLeft=0;
var varTop=0;
var noPage=1;
var tmpPage=0;
var totalAffiche=0;
var totalSkip=0;
var totalSkipper=0;
var testSize=0;
var indice=0;
var i=0;
var nbRangee=0;
var backTop=0;
var num1=0;
var num2=0;
var num3=0;
var num4=0;
var avis=0;
var reste=0;
var autreAVenir=0;
var titre='allo toi';
var tempMax=30;
var agt=navigator.userAgent.toLowerCase();
var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
           && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
           && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
var is_ie   = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_nav6 = 0;
if (document.getElementById) { is_nav6=true;   }


if (unescape(location.search.substr(1))) 
   {noPage = parseInt(unescape(location.search.substr(1)));
   }

if (winx > 800) {
    largEcran=1024;
    maxAcceptLarge=800;
    maxAcceptHaut=600;
    posiMaxHaut=700;
    posiMaxLarge=975;
} else {
    largEcran=800;
    maxAcceptLarge=600;
    maxAcceptHaut=400;
    posiMaxHaut=500;
    posiMaxLarge=750;
   } ;


function creerwindow(imageParam, nbImage, sub_titre) {

if (is_ie)
{
document.open('ouvfen.htm?a1='+imageParam+'&a2='+nbImage+'&a3='+sub_titre+'&a4=1&a5=fin',imageParam,'width=maxAcceptLarge,height=maxAcceptHaut,scrollbars=0,resizable=no,toolbar=no,location=no,top=20,left=20');
}
if (is_nav)
{
window.open('ouvfen.htm?a1='+imageParam+'&a2='+nbImage+'&a3='+sub_titre+'&a4=1&a5=fin',imageParam,'width=400,height=400,scrollbars=0,resizable=1,toolbar=no,location=no,top=20,left=20');
}

}


function affimage(imageEntree,nouveau,nbImage,parm_titre) {

totalSkip = (noPage -1 ) *10;
if (totalSkipper < totalSkip)
{  totalSkipper++;}
else
{
    if (totalAffiche == 20)
    {
    autreAVenir=1;
    }
    if (totalAffiche < 20)
    {
	if (nbAffiche==6) {
	                    document.write('</tr></table></center>\n');
			    nbAffiche=0;
                            nbRangee++;
			    }
	if (nbAffiche==0) {
	                    document.write('<center><table BORDER=0><tr>\n');
			    }

	document.write('<td>');
        if (largEcran==800 & is_ie)
           {
            backTop = nbRangee * 46;
            document.write('<div id="id2" style="position:relative; width:39px; left: ');
            document.write('0px; top: -');
            document.write(backTop);
	    document.write('px">');
           }
	document.write('<A HREF="javascript:creerwindow(');
	document.write("'");
       	document.write(imageEntree);
	document.write("','");
       	document.write(nbImage);
	document.write("','");
       	document.write(parm_titre);
	document.write("')");
	document.write('">');
	document.write('<img SRC="tn_'+imageEntree+'_jpg.jpg" ALT="'+parm_titre+'" BORDER=4></a>\n');
        if (largEcran==800 & is_ie)
           {
           document.write('</DIV>');
           }
        if (is_ie)
	{
          testSize = 0;
          document.write('<div id="contentLayer" style="position:relative; width:39px; left: ');
          document.write(testSize);
          document.write('px; top: -');
          if (largEcran==800)
             {
              backTop = backTop +62;
             }
          else
             {
             backTop = 62;
	     }
  	  document.write(backTop);
	  document.write('px">');
	document.write('<A HREF="javascript:void(0);" ');
        document.write(' OnMouseOver="window.status=');
        document.write("' ';return true");
        document.write('" OnClick="');
        document.write(' creerwindow(');
	document.write("'");
	document.write(imageEntree);
	document.write("','");
	document.write(nbImage);
	document.write("','");
	document.write(parm_titre);
	document.write("'");
        document.write(')"><img SRC="../gif/'+nouveau+'.gif" ALT="'+parm_titre+'"  border=0></a></div>\n');
        }
        
        if (!is_ie)
        {
          if(nouveau=="new")
          {
            document.write('<BR><font color=red size=4><B>New</B></font>\n');
          }
          else
          {
            document.write('<BR><font color=red size=4>&nbsp;</font>\n');
          } 
        }
	  nbAffiche++;
	  totalAffiche++;
    }
}
}

function finimage() {

document.write('</tr></table></center>\n');

document.write('<CENTER>');

backTop = 0;

if (largEcran==800)
    {
    backTop = nbRangee * 46;
    }

if (is_ie)
{
  document.write('<div id="id2" style="position:relative; width:39px; left: ');
  document.write('0px; top: -');
  document.write(backTop);
  document.write('px">');
}

document.write('<TABLE><TR>');
if (noPage > 1) 
    {
    tmpPage = noPage -1;
    if (is_ie | is_nav6)
        {
        document.write('<TD><a href="?'+tmpPage+'"><img SRC="../gif/back.gif" border=0></a></TD>');
        }
    if (!is_ie &  !is_nav6)
        {
        document.write('<TD><a href="#?'+tmpPage+'"><img SRC="../gif/back.gif" border=0></a></TD>');
        }
    }

document.write('<TD><a href="http://www.stoudesign.com/index.html" >');
document.write('<img SRC="../gif/home.gif" border=0 height=57 width=161></a></TD>');


if (autreAVenir==1) 
    {
    tmpPage = noPage +1;
    if (is_ie | is_nav6)
        {
        document.write('<td><a href="?'+tmpPage+'"><img SRC="../gif/next.gif" border=0></a></TD>');
        }
    if (!is_ie &  !is_nav6)
        {
        document.write('<td><a href="#?'+tmpPage+'"><img SRC="../gif/next.gif" border=0></a></TD>');
        }
    }

document.write('</TR></TABLE>');

if (is_ie)
{
  document.write('</div>');
}

document.write('</CENTER>');

    document.write('</TD>');
}

