if (parent.document.layers || document.layers)
nv="sn";
else
nv="s";
wi=top.document.getElementById('haute').offsetWidth;
he1=top.document.getElementById('haute').offsetHeight;
he2=top.document.getElementById('droite').offsetHeight;
ra=wi/(he1+he2);
tac=Math.round(wi*18/1280);
tap=Math.min(Math.floor((tac-1.5)/4), 4);
document.writeln('<style type=text/css><!--');
document.writeln('body {font-size:'+tac+'px;}');
document.writeln('--></style>');
document.writeln('<link rel="stylesheet" href="../'+nv+'.css" type="text/css">');

function rez() {
wi=top.document.getElementById('haute').offsetWidth;
he1=top.document.getElementById('haute').offsetHeight;
he2=top.document.getElementById('droite').offsetHeight;
ra=wi/(he1+he2);

if (ra>1.8)
{
tac=Math.round((he1+he2)*18*1.3/1024);
tap=Math.min(Math.floor((tac-1.5)/4), 4);
}
else
{
tac=Math.round(wi*18/1280);
tap=Math.min(Math.floor((tac-1.5)/4), 4);
}

document.getElementsByTagName('body')[0].style.fontSize=tac+'px';

var Rules = document.styleSheets[2].rules||document.styleSheets[2].cssRules;
for(j=0; j<Rules.length; j++)
{
if(Rules[j].style.backgroundImage)
{
bgim=Rules[j].style['backgroundImage'].split(".");
bgim1=bgim[0];
lbgim=bgim1.length;
tapim=bgim1.substr(0,lbgim-1);
tapim1=tapim+=tap+'.'+bgim[1];

Rules[j].style.backgroundImage=tapim1;

}
}
}
