function imgWin(imgPath, title, alt) {
    var win = window.open('','preview',
    'width=300,height=300,left=100,top=100,screenX=0,screenY=0,resizable=1,scrollbar=0,status=0');
 
    var winDoc = win.document;
    if (title == undefined) title = '';
    if (alt   == undefined) alt   = 'Закрыть';
    var content = '<html><head><link href="http://www.mebel-xxi.ru/style.css" type="text/css" rel="stylesheet"><title>Фото - ' + title + ' - Интернет магазин Мебель XXI века</title>' +
    			  '<style>body{overflow: hidden; margin:0;}img{border:0;}</style>' +
    			  '</head><body><table width=100% height=100% cellpadding=0 cellspacing=0 border=0><tr><td align="center" height="50px"><h2> ' + title + ' </h2></td></tr><tr><td valign="top" align="center"><a class="adashed" title="Закрыть" href="javascript:self.close()">' +
    			  '<img alt="' + alt + '" id="image" src="' + imgPath + '" /><br>закрыть</a></body></html>'
    win.document.write(content);
 
    winDoc.body.onload = function() {
    	var obj = winDoc.getElementById('image');
    	var w = obj.width, h = obj.height;
    	var iHeight= document.body.clientHeight, iWidth = self.innerWidth;
 
    	var left = 100;
    	var top =  100;
    	win.resizeTo(w+50, h+190);
    	win.moveTo(left, top);
    }
 
    win.onload = winDoc.body.onload; // special for Mozilla
 
    // !!! Important statement: popup onload won't execute without it!
    win.document.close();
    win.focus();
    return false
}


   function vipad(descr){
var vid = document.getElementById(descr).style; //alert(descr);
if (vid.display == "none") {vid.display = "block"; }
else {vid.display = "none";}
   }  
