function MM_preloadImages() { //v3.0
  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 swap(id,k) {
	if (k==1) {
		id.style.backgroundImage='url(images/mt_a.gif)';
	}
	if (k==2) {
		id.style.backgroundImage='';
	}
}

function bigpic(img_path){
var str, StrBody;
        str = 'resizable=yes,width=300,height=100,screenX=100,screenY=100,left=100,top=100';      
        if (document.all){ 
                StrBody = '<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#1A4A72" onblur="self.window.close();">';
        } else {
                StrBody = '<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#1A4A72" onblur="self.window.close();">';
        }                
        var win_op = window.open('','show', str);
        win_op.document.open("text/html");
        win_op.document.writeln('<html>');
        win_op.document.writeln('<head>');
        win_op.document.writeln('<title>Пожалуйста, дождитесь загрузки...</title>');
        win_op.document.writeln('<script>');
        win_op.document.writeln('function resize_img() {');
        win_op.document.writeln('var width = document.image.width;');
        win_op.document.writeln('var height = document.image.height;');
        win_op.document.writeln('if (!(document.all)){ self.resizeTo(width,height); } else { self.resizeTo((width+12),(height + 31));');
        win_op.document.writeln(' }');
        win_op.document.writeln('}');
        win_op.document.writeln('</script>');   
        win_op.document.writeln('</head>');
        win_op.document.writeln(StrBody);
        win_op.document.writeln('<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="100%" height="100%" align="center" valign="middle"><a href="#" onClick="window.close()"><img name="image" src="'+ img_path +'" alt="" onload="resize_img();" style="border:1px solid #FFFFFF;"></a></td></tr></table>');
        win_op.document.writeln('</body>');
        win_op.document.writeln('</html>');             
        win_op.document.close();
}
