//Descr
 function AreaResize()
 {
 ScrollWdt=D.body.scrollWidth;
 ScrollHgt=D.body.scrollHeight;
  if(isNS)  
  {
  ScrWdt=window.innerWidth;
  ScrHgt=window.innerHeight;
  }
  else
  {
  ScrWdt=D.body.clientWidth;
  ScrHgt=D.body.clientHeight;
  }
 factorW = ScrWdt/ScrollWdt;
 factorH = ScrHgt/ScrollHgt;
 factorWH = Math.min(factorW,factorH);
 ScrBarHgt = ScrHgt-((50+55+55)*factorH)-56;
 VerBarHgt = ScrHgt-((50)*factorH)-56;
 factorImWH = Math.min(Math.min(factorW,factorH),1);//images up to x 1.20((+-)
/*
factorH = (ScrHgt-56)/(712);
 factorW = (ScrWdt-62)/(1218);
 factorImWH = Math.min(Math.min(factorW,factorH),1);//images up to x 1.20((+-)
 //fWH for screen size only
  factorWH = ((220+5)/(173))*factorW;
   factorW=Math.max(factorW,0.8);
   if(parent.frames.length>0)
   factorW=factorW*1.25;
*/
ScrBarHgt = ScrHgt-((50+55+55)*factorH)-56;
 VerBarHgt = ScrHgt-((50)*factorH)-56;

 ScrFactor=factor;
 MovieScr=175*ScrFactor;
 divh=hgt=wdt=195;
  if(isNS){wdt=hgt=175}
  pad=14*ScrFactor;

 n = D.all.length;
 namList="";
  for (i=0;i<n;i++)
  {
  si=0;
  nam=D.all(i).id;
   if(nam)
   {
   elalli=D.getElementById(nam);
    if(nam.indexOf("Fws")>-1)
    {
    val=nam.replace(/[^0-9]/g,'');
     if(val>0)
     elalli.style.width=val*factorW;
    }
    else if(nam.indexOf("Fhs")>-1)
    {
    val=nam.replace(/[^0-9]/g,'');
     if(val>0)
     elalli.style.height=val*factor;
    }
    else 
    {
    namIm=D.all(i).name;
     if(namIm && nam==namIm+"A")
     {
      if(D.getElementById(nam))
      {
      elalli=D.getElementById(nam);
      Hei=elalli.height
      Wid=elalli.width
      ImgR = Hei/Wid;
      ImgH=Hei*factorW;

       if(nam.indexOf("Logo")>-1)
       ImgH=Hei*factorImWH;
       if(nam.indexOf("Img")>-1)
       ImgH=Hei*factorW;
       if(Hei > 150 && nam.indexOf("ImgAmz")>-1)
       ImgH = 150*factorH;
       if(Hei > 130 && nam.indexOf("ImgAmz")>-1 && ecranH < 765)
       ImgH = 130*factorH;
//       if(nam.indexOf("Ctl")>-1 && isCatal)
//       ImgH=Hei*factorImWH*0.8;
       if(ImgH>0)
       {
       elalli.style.height=ImgH;
       elalli.style.width=ImgH/ImgR;
       }
      }
     }//if(namIm==
    }//else
   }//if(nam
  }//for
//CS

  if(!SLShow)
  {
  if(D.getElementById('ReturnPages'))
  D.getElementById('ReturnPages').style.display='none';
  if(D.getElementById('SiteInfo'))
  D.getElementById('SiteInfo').style.display='none';
  if(D.getElementById('PriceLegend'))
  D.getElementById('PriceLegend').style.display='none';
  }

  if(SLShow)
  {
  if(document.getElementById("HeartA"))
   document.getElementById("HeartA").style.display='block'; 
  }
  else if(D.getElementById("pop"))
  {
  D.getElementById("pop").style.display='none';
  D.getElementById("pop").style.display='none';
  }

  if(D.getElementById("cadreB"))
  D.getElementById("cadreB").style.height=435*factorW;

 wCs=280*factorW;wCsS=150*factorW;
  if(D.getElementById("pop"))
  {
  D.getElementById("pop").style.width=wCs;
  D.getElementById("pop").style.fontSize=(90*factorW)+'%';
  D.getElementById("pop_content").style.width=wCs;
  }

//RszFulldoc
 elalli=D.getElementById("RszFulldoc");
  if(elalli)
  {
  val=elalli.style.fontSize;
  val=val.replace(/[^0-9]/g,'');
  elalli.style.fontSize=(val*factor)+"%";
  }

 LaliH('MainScrBarDiv',ScrBarHgt);
 LaliH('MainVertBarTD',VerBarHgt);
 LaliH('MainVertBarTDR',VerBarHgt);


  if(elalli)//fulldoc
  {
  elalli.style.zIndex=3; 
  elalli.style.visibility='visible';
  }

 
 Dh=D.location.hash;
  if(Dh.indexOf("#")>-1)
  {
   if(Dh.length>1)
   D.location.href=Dh;
  }
 }//End AreaResize
 
 function AreaFormat() { }

 function ShowHide(a)
 {
  if(D.getElementById(a).style.display=='none')
  D.getElementById(a).style.display='block';
  else
  D.getElementById(a).style.display='none';
 }

//Empty size
 function sizeH(){ if(isNS){D.getElementById("ecranH").style.height=window.innerHeight-250}else{D.getElementById("ecranH").style.height=D.body.clientHeight-200;}}
//Descr & Cat
 function SpPromo(){n=10;for (i=0;i<n;i++){X=B+i;Y=X+'A';if(D.getElementById(Y)){z++;t=X;if(z==1){s=t+'A';PGa(s);}else if(z==2){w=t+'A';PGb(w);}else if(z>2){v=t+'A';PGc(v);}}}}
 function PGa(s){els=D.getElementById(s);els.style.color=c1;els.style.background=b1;setTimeout("PWa(s)",800)}
 function PWa(s){els=D.getElementById(s);els.style.color=c2;els.style.background=b2;setTimeout("PGa(s)",800)}
 function PGb(w){elw=D.getElementById(w);elw.style.color=c2;elw.style.background=b2;setTimeout("PWb(w)",1000)}
 function PWb(w){elw=D.getElementById(w);elw.style.color=c3;elw.style.background=b1;setTimeout("PGb(w)",800)}
 function PGc(v){elv=D.getElementById(v);elv.style.color=c2;elv.style.background=b2;setTimeout("PWc(v)",1100)}
 function PWc(v){elv=D.getElementById(v);elv.style.color=c3;elv.style.background=b1;setTimeout("PGc(v)",800)}

 function EBOpenWin()
 {
 var MidV = isNS ? pageYOffset : D.body.scrollTop;
 var MidH = isNS ? window.innerWidth : D.body.clientWidth;
 MidH = MidH-260-355; MidV = MidV+70;
 ELEB=D.getElementById('EBOffers'); ELEB.style.position='absolute'; ELEB.style.top=MidV; ELEB.style.left=MidH; ELEB.style.display='block';
 }

 function ShowTxt(a)
 {
 D.getElementById("HlpTxt"+a).style.display='block';
 }
 function HideTxt(a)
 {
 window.setTimeout("HideTxtB("+a+")",5000)
 }
 function HideTxtB(a)
 {
 D.getElementById("HlpTxt"+a).style.display='none';
 }
 
//var Asin;
 function openWin(url,Asin)
 {
 Tp=D.body.scrollTop+14;
 Basket=D.getElementById('OrderForm');
 BasketT=D.getElementById('OrderFormT');
  BasketT.style.top=Tp
  BasketT.style.left=14
  BasketT.style.visibility='hidden'
  BasketT.style.display='none'
  BasketT.style.visibility='visible'
  BasketT.style.display='block'
  Basket.style.visibility='hidden'
  Basket.style.display='none'
  Basket.style.visibility='visible'
  Basket.style.display='block'
 D.OrderForm.SetVariable("Asin",Asin)
 }


function closeWin()
 {
  D.getElementById('OrderForm').style.visibility='hidden'
  D.getElementById('OrderFormT').style.visibility='hidden'
  D.getElementById('OrderForm').style.display='none'
  D.getElementById('OrderFormT').style.display='none'
 }

function DBP(a,d) {D.getElementById(a).style.borderWidth='thin';D.getElementById(a).style.margin='2px';D.getElementById(a).style.backgroundColor=d;}
function UBP(a,d) {D.getElementById(a).style.borderWidth='medium';D.getElementById(a).style.margin='0px';D.getElementById(a).style.backgroundColor=d;}
function OuC(a,c) {D.getElementById(a).style.color=c;}
function OvC(a) {D.getElementById(a).style.color='#FFCC00';}
function Raz(a) {window.location.href=a;}
//function CoP(a) {c=a+"=1";if(b.indexOf(c)<0){if(b.indexOf("?")<0){b=b+"index.php?"}else (b=b+"&");window.location.href=b+c}}

//drag drop function for ie4+ and NS6////
/////////////////////////////////


 function drag_dropB(e)
 {
  if (ie4&&dragapproved)
  {
  crossobj.style.left=tempx+event.clientX-offsetx
  crossobj.style.top=tempy+event.clientY-offsety
  return false
  }
  else if (ns6&&dragapproved)
  {
  crossobj.style.left=tempx+e.clientX-offsetx+"px"
  crossobj.style.top=tempy+e.clientY-offsety+"px"
  return false
  }
 }

 function initB_drag(e,f,g)
 {
 crossobj = ns6 ? D.getElementById(g) : D.all[g]
 var firedobj=ns6? e.target : event.srcElement
 var topelement=ns6? "html" : D.compatMode && D.compatMode!="BackCompat"? "documentElement" : "body"
  while (firedobj.tagName!=topelement.toUpperCase() && firedobj.id!=f)
  {
  firedobj=ns6? firedobj.parentNode : firedobj.parentElement
  }
  if (firedobj.id==f)
  {
  offsetx=ie4? event.clientX : e.clientX
  offsety=ie4? event.clientY : e.clientY
  tempx=parseInt(crossobj.style.left)
  tempy=parseInt(crossobj.style.top)
  dragapproved=true
  D.onmousemove=drag_dropB
  }
 }
//D.onmouseup=new Function("dragapproved=false")

////drag drop functions end here//////

