function doPic(imgName) 
{
	myWin=window.open(imgName, "wind1", "width=1024,height=683,resizable=no,scrollbars=yes,menubar=no");
}

function doPics(imgName) 
{
	myWin=window.open(imgName, "wind1", "width=600,height=849,resizable=no,scrollbars=yes,menubar=no");
}

function ImageExpander(oThumb, sImgSrc)
{
        // изображение ногтя большого пальца руки магазина и переписывает своего onclick укладчика.
        this.oThumb = oThumb;
        this.oThumb.expander = this;
        this.oThumb.onclick = function() { this.expander.expand(); }
        
        // сделайте запись оригинального размера
        this.smallWidth = oThumb.offsetWidth;
        this.smallHeight = oThumb.offsetHeight; 
 
        this.bExpand = true;
        this.bTicks = false;
        
        // сам организованный список
        if ( !window.aImageExpanders )
        {
                window.aImageExpanders = new Array();
        }
        window.aImageExpanders.push(this);
 
        // создайте полное размерное изображение.
        this.oImg = new Image();
        this.oImg.expander = this;
        this.oImg.onload = function(){this.expander.onload();}
        this.oImg.src = sImgSrc;
}
 
ImageExpander.prototype.onload = function()
{
        this.oDiv = document.createElement("div");
        document.body.appendChild(this.oDiv);
        this.oDiv.appendChild(this.oImg);
        this.oDiv.style.position = "absolute";
        this.oDiv.expander = this;
        this.oDiv.onclick = function() {this.expander.toggle();};
        this.oImg.title = "Щелкните, чтобы уменьшить.";
        this.bigWidth = this.oImg.width;
        this.bigHeight = this.oImg.height;
        
        if ( this.bExpand )
        {
                this.expand();
        }
        else
        {
                this.oDiv.style.visibility = "hidden";
                this.oImg.style.visibility = "hidden";
        }
}
ImageExpander.prototype.toggle = function()
{
        this.bExpand = !this.bExpand;
        if ( this.bExpand )
        {
                for ( var i in window.aImageExpanders )
                        if ( window.aImageExpanders[i] !== this )
                                window.aImageExpanders[i].reduce();
        }
}
ImageExpander.prototype.expand = function()
{
        // руководство набора расширения.
        this.bExpand = true;
 
        // заставьте все другие изображения уменьшать
        for ( var i in window.aImageExpanders )
                if ( window.aImageExpanders[i] !== this )
                        window.aImageExpanders[i].reduce();
 
        // if not loaded, don't continue just yet
        if ( !this.oDiv ) return;
        
        // hide the thumbnail
        this.oThumb.style.visibility = "hidden";
        
        // calculate initial dimensions
        this.x = this.oThumb.offsetLeft;
        this.y = this.oThumb.offsetTop;
        this.w = this.oThumb.clientWidth;
        this.h = this.oThumb.clientHeight;
        
        this.oDiv.style.left = this.x + "px";
        this.oDiv.style.top = this.y + "px";
        this.oImg.style.width = this.w + "px";
        this.oImg.style.height = this.h + "px";
        this.oDiv.style.visibility = "visible";
        this.oImg.style.visibility = "visible";
        
        // start the animation engine.
        if ( !this.bTicks )
        {
                this.bTicks = true;
                var pThis = this;
                window.setTimeout(function(){pThis.tick();},0);        
        }
}
ImageExpander.prototype.reduce = function()
{
        // set direction of expansion.
        this.bExpand = false;
}
ImageExpander.prototype.tick = function()
{
        // calculate screen dimensions
        var cw = document.body.clientWidth;
        var ch = document.body.clientHeight;
        var cx = document.body.scrollLeft + cw / 2;
        var cy = document.body.scrollTop + ch / 2;
 
        // calculate target
        var tw,th,tx,ty;
        if ( this.bExpand )
        {
                tw = this.bigWidth;
                th = this.bigHeight;
                if ( tw > cw )
                {
                        th *= cw / tw;
                        tw = cw;
                }       
                if ( th > ch )
                {
                        tw *= ch / th;
                        th = ch;
                }
                tx = cx - tw / 2;
                ty = cy - th / 2; 
        }
        else
        {
                tw = this.smallWidth;
                th = this.smallHeight;
                tx = this.oThumb.offsetLeft;
                ty = this.oThumb.offsetTop;
        }       
        // move 5% closer to target
        var nHit = 0;
        var fMove = function(n,tn) 
        {
                var dn = tn - n;
                if ( Math.abs(dn) < 3 )
                {
                        nHit++;
                        return tn;
                }
                else
                {
                        return n + dn / 5;
                }
        }
        this.x = fMove(this.x, tx);
        this.y = fMove(this.y, ty);
        this.w = fMove(this.w, tw);
        this.h = fMove(this.h, th);
        
        this.oDiv.style.left = this.x + "px";
        this.oDiv.style.top = this.y + "px";
        this.oImg.style.width = this.w + "px";
        this.oImg.style.height = this.h + "px";
 
        // if reducing and size/position is a match, stop the tick      
        if ( !this.bExpand && (nHit == 4) )
        {
                this.oImg.style.visibility = "hidden";
                this.oDiv.style.visibility = "hidden";
                this.oThumb.style.visibility = "visible";
 
                this.bTicks = false;
        }
        
        if ( this.bTicks )
        {
                var pThis = this;
                window.setTimeout(function(){pThis.tick();},0);
        }
}

function jsPlay(soundobj) {
 var thissound= eval("document."+soundobj);
 try {
     thissound.Play();
 }
 catch (e) {
     thissound.DoPlay();
 }
}

function MM_swapImgRestore() {
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() {
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() {
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


