
var wi = 0;var he = 0;var rhe = 0;var lwi = 0;var cadre=20; 
var cadre2=16;var lhe=0;var lwi=0;var unpouce=0;
var owi = 0; var ohe = 0; var total=0; var diff = 0; var max = 400; var omb = 0;
var vendu; var clic;

function affimgluxe(image,salle,vendu,wi,he,rhe,rwi,clic,lang){
 unpouce = wi / rwi; 
 unpouce = unpouce ;
 unpouce = Math.floor (unpouce);
 cadre = (4 * unpouce);
 cadre2 = ((78 * cadre) / 116) + .5;
 cadre2 = Math.floor(cadre2);
 lwi = wi - cadre2 - cadre2;
 lhe = he - cadre2 - cadre2;
 ohe = he + cadre + cadre2;
 owi = wi + cadre + cadre2 ;
 total = (cadre * 2) + (cadre2 * 2) + lwi;

 if (total > max) {
                  diff   = total / max;
                  cadre  = cadre / diff;
                  cadre2 = cadre2 / diff;
                  cadre  = Math.floor(cadre); 
                  cadre2 = Math.floor(cadre2); 
                  wi     = wi /diff;
                  he     = he / diff;
                  wi     = Math.floor(wi); 
                  he     = Math.floor(he); 
                  lwi    = wi - cadre2 - cadre2;
                  lhe    = he - cadre2 - cadre2;
                  ohe    = he + cadre + cadre2;
                  owi    = wi + cadre + cadre2;
                  }
if (lhe < 0) {
	diff   = (lhe * -1) / he;
	diff   = diff + 1;
	he     = he * diff;
	he     = he + 1;
	wi     = wi *diff;
	wi     = Math.floor(wi);
	he     = Math.floor(he);
	lwi    = wi - cadre2 - cadre2;
	lhe    = he - cadre2 - cadre2;
	ohe    = he + cadre + cadre2;
	owi    = wi + cadre + cadre2;
}
 document.write('<table BORDER=0 CELLPADDING=0 CELLSPACING=0 bgcolor#8c0709>')
 document.write('<tr>')
 document.write('<td>')
 document.write('<table border=0 cellpadding=0 cellspacing=0>')
 document.write('<TR>')
 document.write('<TD><img src="../cadres/cadred1.JPG" width='+cadre+' height='+cadre+'></TD>')
 document.write('<TD><img src="../cadres/cadred2.JPG" width='+cadre2+' height='+cadre+'></TD>')
 document.write('<TD><img src="../cadres/cadred3.JPG" height='+cadre+' width='+lwi+'></TD>')
 document.write('<TD><img src="../cadres/cadred4.JPG" width='+cadre2+' height='+cadre+'></TD>')
 document.write('<TD align=right><img src="../cadres/cadred5.JPG" width='+cadre+' height='+cadre+'></TD>')
 document.write('</TR>')
 document.write('<TR>')
 document.write('<TD valign=top><TABLE border=0 cellspacing=0 cellpadding=0>') 
 document.write('<TR><TD>')
 document.write('<img src="../cadres/cadred6.JPG" width='+cadre+' height='+cadre2+'></TD></TR>')
 document.write('<TR><TD><img src="../cadres/cadred8.JPG" width='+cadre+' height='+lhe+'></TD></TR>')
 document.write('<TR><TD><img src="../cadres/cadred10.JPG" width='+cadre+' height='+cadre2+'></TD>')
 document.write('</TR></TABLE></TD>')
 document.write('<TD colspan=3 align=center bgcolor=ffffff>')
 if (salle=="") {}
    else { document.write ('<A href="'+salle+'.HTM" alt="" target="principal" >')}
document.write('<img src="../image/icon/'+image+'"  alt="'+clic+'"  title="'+clic+'" width='+wi+' height='+he+' border=0 cellspacing=0>')
 if (salle=="") {}
    else { document.write ('</A>')}
 document.write('</TD>')
 document.write('<TD valign=top><TABLE border=0 cellspacing=0 cellpadding=0><TR><TD>')
 document.write('<img src="../cadres/cadred7.JPG" width='+cadre+' height='+cadre2+'></TD></TR>')
 document.write('<TR><TD><img src="../cadres/cadred9.JPG" width='+cadre+' height='+lhe+'></TD></TR>')
 document.write('<TR><TD><img src="../cadres/cadred11.JPG" width='+cadre+' height='+cadre2+'></TD>')
 document.write('</TR></TABLE></TD>')
 document.write('</TR>')
 document.write('<TR>') 
 document.write('<TD><img src="../cadres/cadred12.JPG" width='+cadre+' height='+cadre+'></TD>')
document.write('<TD><img src="../cadres/cadred13.JPG" width='+cadre2+' height='+cadre+'></TD>')
 document.write('<TD><img src="../cadres/cadred14.JPG" height='+cadre+' width='+lwi+'></TD>')
document.write('<TD><img src="../cadres/cadred15.JPG" width='+cadre2+' height='+cadre+'></TD>')
 document.write('<TD><img src="../cadres/cadred16.JPG" width='+cadre+' height='+cadre+'></TD>')
 document.write('</TR>')
 document.write('</TABLE>')
 document.write('</td>')
 document.write('<td height='+ohe+' width='+cadre2+' VALIGN="BOTTOM" ALIGN="LEFT">')
 document.write('<img SRC="../icon/ombrage2.jpg" height='+ohe+' width='+cadre2+'></td></tr>')
 document.write('<tr>')
 document.write('<td VALIGN="TOP" ALIGN="RIGHT"><img SRC="../icon/ombrage3.jpg" width='+owi+' height='+cadre2+' ></td>')
 document.write('<td widht='+cadre2+', height='+cadre2+' VALIGN="TOP" ALIGN="LEFT"><img SRC="../icon/ombrage4.jpg" width='+cadre2+' height='+cadre2+'></td>')
 document.write('</tr></table>')
 document.write('</td>')
// document.write('<img src="../'+lang+'/icon/'+vendu+'.gif" class=popshadow bgcolor=black>')
 }

function affimg(image,salle,vendu,wi,he,rhe,rwi,clic,lang){
 unpouce = wi / rwi; 
 unpouce = unpouce + .5;
 unpouce = Math.floor (unpouce);
 cadre = (3 * unpouce);
 lwi = wi;
 lhe = he;
 ohe = he + cadre + cadre;
 owi = wi + cadre + cadre;
 omb = cadre / 2;
 total = (cadre * 2) + lwi;

 if (total > max) {
                  diff   = total / max;
                  cadre  = cadre / diff;
                  cadre  = Math.floor(cadre); 
                  wi     = wi /diff;
                  he     = he / diff;
                  wi     = Math.floor(wi); 
                  he     = Math.floor(he); 
                  lwi    = wi;
                  lhe    = he;
                  ohe    = he + cadre + cadre;
                  owi    = wi + cadre + cadre;
                  omb    = cadre / 2;
                  }
 document.write('<table BORDER=0 CELLPADDING=0 CELLSPACING=0>')
 document.write('<tr>')
 document.write('<td>')
 document.write('<table border=0 cellpadding=0 cellspacing=0>')
 document.write('<TR>')
 document.write('<TD width='+cadre+' height='+cadre+'><img src="../cadres/cadre1.JPG" width='+cadre+' height='+cadre+'></TD>')
 document.write('<TD height='+cadre+' width='+wi+'><img src="../cadres/cadre2.JPG" height='+cadre+' width='+wi+'></TD>')
 document.write('<TD width='+cadre+' height='+cadre+'><img src="../cadres/cadre3.JPG" width='+cadre+' height='+cadre+'></TD>')
 document.write('</TR>')
 document.write('<TR>')
 document.write('<TD valign=top><img src="../cadres/cadre4.JPG" width='+cadre+' height='+he+'></TD>')
 document.write('<TD align=center bgcolor=ffffff>')
 if (salle=="") { document.write (' ') }
    else { document.write ('<A href="'+salle+'.HTM" alt="" target="principal" >')}
 document.write('<img src="../image/icon/'+image+'"  alt="'+clic+'" title="'+clic+'" width='+wi+' height='+he+' border=0 cellspacing=0></TD>')
 if (salle=="") { document.write (' ') }
    else { document.write ('</A>')}
 document.write('<TD valign=top><img src="../cadres/cadre5.JPG" width='+cadre+' height='+he+'></TD>')
 document.write('</TR>')
 document.write('<TR>') 
 document.write('<TD width='+cadre+' height='+cadre+'><img src="../cadres/cadre6.JPG" width='+cadre+' height='+cadre+'></TD>')
 document.write('<TD height='+cadre+' width='+wi+'><img src="../cadres/cadre7.JPG" height='+cadre+' width='+wi+'></TD>')
 document.write('<TD width='+cadre+' height='+cadre+'><img src="../cadres/cadre8.JPG" width='+cadre+' height='+cadre+'></TD>')
 document.write('</TR>')
 document.write('</TABLE>')
 document.write('</td>')
 document.write('<td height='+ohe+' width='+omb+' VALIGN="BOTTOM" ALIGN="LEFT"><img SRC="../icon/ombrage2.jpg" height='+ohe+' width='+omb+'></td></tr>')
 document.write('<tr>')
 document.write('<td width='+owi+' height='+omb+' VALIGN="TOP" ALIGN="RIGHT"><img SRC="../icon/ombrage3.jpg" width='+owi+' height='+omb+' ></td>')
 document.write('<td width='+omb+', height='+omb+' VALIGN="TOP" ALIGN="LEFT"><img SRC="../icon/ombrage4.jpg" width='+omb+' height='+omb+'></td></tr></table>')
 document.write('</td>')
// document.write('<img src="../'+lang+'/icon/'+vendu+'.gif" class=popshadow bgcolor=black>')
 }

function affscu(image,salle,vendu,wi,he,rwi,rhe,clic,lang){
 if (salle=="") { document.write (' ') }
    else { document.write ('<A href="'+salle+'.HTM" alt="" target="principal">')}
 document.write('<img src="../image/icon/'+image+'"  alt="'+clic+'" title="'+clic+'" width='+wi+' height='+he+' border=0 cellspacing=0>')
 if (salle=="") { document.write (' ') }
    else { document.write ('</A>')}
 document.write('</td>')
// document.write('<img src="../'+lang+'/icon/'+vendu+'.gif" class=popshadow>')
 }

function affimgordi(image,salle,vendu,wi,he,rwi,rhe,clic,lang){
//document.write('<table border=5 bgcolor=white cellspacing=5><tr><td>')
document.write('<table border=5 bgcolor=white cellspacing=5 bordercolor="white"><tr><td>')

 if (salle=="") { document.write (' ') }
    else { document.write ('<A href="'+salle+'.HTM" alt="" target="principal">')}
 document.write('<img src="../image/icon/'+image+'"  alt="'+clic+'"  title="'+clic+'" width='+wi+' height='+he+' border=0 cellspacing=0>')
 if (salle=="") { document.write (' ') }
    else { document.write ('</A>')}
 document.write('</td></TR></table></td>')
// document.write('<img src="../'+lang+'/icon/'+vendu+'.gif" class=popshadow>')
 }


function affimgblanc(image,salle,vendu,wi,he,rwi,rhe,clic,lang){
document.write('<table border=1 bgcolor=white cellspacing=1 cellpadding=0><tr><td>')
 if (salle=="") { document.write ('') }
    else { document.write ('<A href="'+salle+'.HTM" alt="" target="principal">')}
 document.write('<img src="../image/icon/'+image+'"  alt="'+clic+'"  title="'+clic+'" width='+wi+' height='+he+' border=0 cellspacing=0>')
 if (salle=="") { document.write ('') } 
    else { document.write ('</A>')}
 document.write('</td></TR></table></td>')
// document.write('<img src="../'+lang+'/icon/'+vendu+'.gif" class=popshadow>')
 }

function affimgblanc_ini(image,salle,vendu,wi,he,rwi,rhe,clic,lang){
document.write('<table border=1 bgcolor=white cellspacing=1 cellpadding=0><tr><td>')
 if (salle=="") { document.write (' ') }
    else { document.write ('<A href="'+salle+'.HTM" alt="" target="principal">')}
 document.write('<img src="../image/icon/'+image+'"  alt="'+clic+'"  title="'+clic+'" width='+wi+' height='+he+' border=0 cellspacing=0>')
 if (salle=="") { document.write (' ') }
    else { document.write ('</A>')}
 document.write('</td></TR></table></td>')
// document.write('<img src="../'+lang+'/icon/'+vendu+'.gif" class=popshadow>')
 }

function affimgseul(image,salle,vendu,wi,he,rwi,rhe,clic,lang){
document.write('<table border=0 bgcolor=white cellspacing=0 cellpadding=0><tr><td>')
 if (salle=="") { document.write (' ') }
    else { document.write ('<A href="'+salle+'.HTM" alt="" target="principal">')}
 document.write('<img src="../image/icon/'+image+'"  alt="'+clic+'"  title="'+clic+'" width='+wi+' height='+he+' border=0 cellspacing=0>')
 if (salle=="") { document.write (' ') }
    else { document.write ('</A>')}
 document.write('</td></TR></table></td>')
// document.write('<img src="../'+lang+'/icon/'+vendu+'.gif" class=popshadow>')
 }


