function mouseClickPinn(image){

var src = new String(image.src);
var newsrc = new String();
var newImg = new Image();
var dot;
dot=src.lastIndexOf(".");
newsrc=new String( src.substr(0,dot-2) + src.substr(dot,src.length));
newImg.src=newsrc;
imageWindow=window.open('','',   'toolbar=no,scrollbars=yes,width=410,height=530');
imageWindow.document.open();
    imageWindow.document.writeln("<HTML>");
    imageWindow.document.writeln("<script language='javascript'><!--");
    imageWindow.document.writeln("var i=0;");
    imageWindow.document.writeln("function resize() {if (navigator.appName == 'Netscape') i=40;");
    imageWindow.document.writeln("if (document.images[0]) window.resizeTo(document.images[0].width +60, document.images[0].height+100-i);");
    imageWindow.document.writeln("self.focus();}");
    imageWindow.document.writeln("//--></script>");
    imageWindow.document.writeln("</head>");
    imageWindow.document.writeln("<body onload='resize();'>");
    imageWindow.document.writeln("<a href='javascript:;' title='Закрыть'><img src=" + newsrc + " onclick=window.self.close()></a>");
    imageWindow.document.writeln("</body>");
    imageWindow.document.writeln("</HTML>");
imageWindow.document.close(); 
}

function mouseClickPinnM(image){

var src = new String(image.src);
var newsrc = new String();
var newImg = new Image();
var dot;
dot=src.lastIndexOf(".");
newsrc=new String( src.substr(0,dot-2) + src.substr(dot,src.length));
newImg.src=newsrc;
imageWindow=window.open('','',   'toolbar=no,scrollbars=yes,width=200,height=630');
imageWindow.document.open();
imageWindow.document.writeln("<a href='javascript:;' title='Закрыть'><img src=" + newsrc + " onclick=window.self.close()></a>");
imageWindow.document.close(); 
}

function loadImage(image){
    var i = 0;
	if (navigator.appName == 'Netscape') i=40;
	var src = image.src;
    var newImg = new Image();
    var slash=src.lastIndexOf("/");
    var newsrc=src.substr(0,slash+1)+"img"+src.substr(slash+3,src.length);
    newImg.src = newsrc;
/*	imgWidth=newImg.width;
	imgHeight=newImg.height;
	alert(imgWidth+" "+imgHeight);
*/
	imageWindow=window.open('','',   'resizable=yes,toolbar=no,scrollbars=yes,width=650,height=550');
    imageWindow.document.open();
    imageWindow.document.writeln("<HTML>");
    imageWindow.document.writeln("<script language='javascript'><!--");
    imageWindow.document.writeln("var i=0;");
    imageWindow.document.writeln("function resize() {if (navigator.appName == 'Netscape') i=40;");
    imageWindow.document.writeln("if (document.images[0]) window.resizeTo(document.images[0].width +60, document.images[0].height+100-i);");
    imageWindow.document.writeln("self.focus();}");
    imageWindow.document.writeln("//--></script>");
    imageWindow.document.writeln("</head>");
    imageWindow.document.writeln("<body onload='resize();'>");
    imageWindow.document.writeln("<a href='javascript:;' title='Закрыть'><img src=" + newsrc + " onclick=window.self.close()></a>");
    imageWindow.document.writeln("</body>");
    imageWindow.document.writeln("</HTML>");
    imageWindow.document.close(); 
}
function loadImageZR(image){
    var i = 0;
	if (navigator.appName == 'Netscape') i=40;
	var src = image.src;
    var newImg = new Image();
    var slash=src.lastIndexOf("/");
    var newsrc=src.substr(0,slash+1)+"img"+src.substr(slash+3,src.length);
    newImg.src = newsrc;
	imageWindow=window.open('','',   'resizable=yes,toolbar=no,scrollbars=yes,width=350,height=400');
    imageWindow.document.open();
    imageWindow.document.writeln("<HTML>");
    imageWindow.document.writeln("<script language='javascript'><!--");
    imageWindow.document.writeln("var i=0;");
    imageWindow.document.writeln("function resize() {if (navigator.appName == 'Netscape') i=40;");
    imageWindow.document.writeln("if (document.images[0]) window.resizeTo(document.images[0].width +60, document.images[0].height+100-i);");
    imageWindow.document.writeln("self.focus();}");
    imageWindow.document.writeln("//--></script>");
    imageWindow.document.writeln("</head>");
    imageWindow.document.writeln("<body onload='resize();'>");
    imageWindow.document.writeln("<a href='javascript:;' title='Закрыть'><img src=" + newsrc + " onclick=window.self.close()></a>");
    imageWindow.document.close(); 
}
function loadImgMWL(image){
    var i = 0;
	if (navigator.appName == 'Netscape') i=40;
	var src = image.src;
    var newImg = new Image();
	var dot=src.lastIndexOf(".");
	newsrc=new String( src.substr(0,dot)+"b"+ src.substr(dot,src.length));
    newImg.src = newsrc;
	imageWindow=window.open('','',   'resizable=yes,toolbar=no,scrollbars=yes,width=360,height=400');
    imageWindow.document.open();
    imageWindow.document.writeln("<HTML>");
    imageWindow.document.writeln("<script language='javascript'><!--");
    imageWindow.document.writeln("var i=0;");
    imageWindow.document.writeln("function resize() {if (navigator.appName == 'Netscape') i=40;");
    imageWindow.document.writeln("if (document.images[0]) window.resizeTo(document.images[0].width +60, document.images[0].height+100-i);");
    imageWindow.document.writeln("self.focus();}");
    imageWindow.document.writeln("//--></script>");
    imageWindow.document.writeln("</head>");
    imageWindow.document.writeln("<body onload='resize();'>");
    imageWindow.document.writeln("<a href='javascript:;' title='Закрыть'><img src=" + newsrc + " onclick=window.self.close()></a>");
    imageWindow.document.writeln("</body>");
    imageWindow.document.writeln("</HTML>");
    imageWindow.document.close(); 
}
function loadImgMWLbig(image){
    var i = 0;
	if (navigator.appName == 'Netscape') i=40;
	var src = image.src;
    var newImg = new Image();
	var dot=src.lastIndexOf(".");
	newsrc=new String( src.substr(0,dot)+"b"+ src.substr(dot,src.length));
    newImg.src = newsrc;
	imageWindow=window.open('','',   'resizable=yes,toolbar=no,scrollbars=yes,width=550,height=550');
    imageWindow.document.open();
    imageWindow.document.writeln("<HTML>");
    imageWindow.document.writeln("<script language='javascript'><!--");
    imageWindow.document.writeln("var i=0;");
    imageWindow.document.writeln("function resize() {if (navigator.appName == 'Netscape') i=40;");
    imageWindow.document.writeln("if (document.images[0]) window.resizeTo(document.images[0].width +60, document.images[0].height+100-i);");
    imageWindow.document.writeln("self.focus();}");
    imageWindow.document.writeln("//--></script>");
    imageWindow.document.writeln("</head>");
    imageWindow.document.writeln("<body onload='resize();'>");
    imageWindow.document.writeln("<a href='javascript:;' title='Закрыть'><img src=" + newsrc + " onclick=window.self.close()></a>");
    imageWindow.document.writeln("</body>");
    imageWindow.document.writeln("</HTML>");
    imageWindow.document.close(); 
}
function loadImageDim(image){
    var i = 0;
	if (navigator.appName == 'Netscape') i=40;
	var src = image.src;
    var newImg = new Image();
    var slash=src.lastIndexOf("/");
    var newsrc=src.substr(0,slash+1)+"img"+src.substr(slash+3,src.length);
    newImg.src = newsrc;
	imageWindow=window.open('','',   'resizable=yes,toolbar=no,scrollbars=yes,width=310,height=310');
    imageWindow.document.open();
    imageWindow.document.writeln("<HTML>");
    imageWindow.document.writeln("<script language='javascript'><!--");
    imageWindow.document.writeln("var i=0;");
    imageWindow.document.writeln("function resize() {if (navigator.appName == 'Netscape') i=40;");
    imageWindow.document.writeln("if (document.images[0]) window.resizeTo(document.images[0].width +60, document.images[0].height+100-i);");
    imageWindow.document.writeln("self.focus();}");
    imageWindow.document.writeln("//--></script>");
    imageWindow.document.writeln("</head>");
    imageWindow.document.writeln("<body onload='resize();'>");
    imageWindow.document.writeln("<a href='javascript:;' title='Закрыть'><img src=" + newsrc + " onclick=window.self.close()></a>");
    imageWindow.document.close(); 
}
function loadImgFabricGT(image){
    var i = 0;
	if (navigator.appName == 'Netscape') i=40;
	var src = image.src;
    var newImg = new Image();
    var slash=src.lastIndexOf("/");
    var newsrc=src.substr(0,slash+1)+"img"+src.substr(slash+3,src.length);
    newImg.src = newsrc;
	imageWindow=window.open('','',   'resizable=yes,toolbar=no,scrollbars=yes,width=185,height=225');
    imageWindow.document.writeln("<a href='javascript:;' title='Закрыть'><img src=" + newsrc + " onclick=window.self.close()></a>");
    imageWindow.document.close(); 
}
function loadImgFabricZw(image){
    var i = 0;
	if (navigator.appName == 'Netscape') i=40;
	var src = image.src;
    var newImg = new Image();
    var slash=src.lastIndexOf("/");
    var newsrc=src.substr(0,slash+1)+"img"+src.substr(slash+3,src.length);
    newImg.src = newsrc;
	imageWindow=window.open('','',   'resizable=yes,toolbar=no,scrollbars=yes,width=210,height=180');
    imageWindow.document.writeln("<a href='javascript:;' title='Закрыть'><img src=" + newsrc + " onclick=window.self.close()></a>");
    imageWindow.document.close(); 
}
function loadCatalog(image){
    var i = 0;
	if (navigator.appName == 'Netscape') i=40;
	var src = image.src;
    var newImg = new Image();
    var slash=src.lastIndexOf("/");
    var newsrc=src.substr(0,slash+1)+"img"+src.substr(slash+3,src.length);
    newImg.src = newsrc;
	imageWindow=window.open('','',   'resizable=yes,toolbar=no,scrollbars=yes,width=915,height=1150');
    imageWindow.document.writeln("<a href='javascript:;' title='Закрыть'><img src=" + newsrc + " onclick=window.self.close()></a>");
    imageWindow.document.close(); 
}
function loadPostcard(image){
    var i = 0;
	if (navigator.appName == 'Netscape') i=40;
	var src = image.src;
    var newImg1 = new Image();
    var newImg2 = new Image();
    var slash=src.lastIndexOf("/");
    var newsrc1=src.substr(0,slash+1)+src.substr(slash+4,4)+"_1.jpg";
    var newsrc2=src.substr(0,slash+1)+src.substr(slash+4,4)+"_2.jpg";
    newImg1.src = newsrc1;
    newImg2.src = newsrc2;	
	imageWindow=window.open('','',   'resizable=yes,toolbar=no,scrollbars=yes,width=550,height=700');
    imageWindow.document.writeln("<a href='javascript:;' title='Закрыть'><img src=" + newsrc1 + " onclick=window.self.close()></a>");
    imageWindow.document.writeln("<a href='javascript:;' title='Закрыть'><img src=" + newsrc2 + " onclick=window.self.close()></a>");
    imageWindow.document.close(); 
}
function loadSolaria(image){
    var i = 0;
	if (navigator.appName == 'Netscape') i=40;
	var src = image.src;
    var newImg = new Image();
    var slash=src.lastIndexOf("/");
    var newsrc=src.substr(0,slash+1)+"img"+src.substr(slash+3,src.length);
    newImg.src = newsrc;
	imageWindow=window.open('','',   'resizable=yes,toolbar=no,scrollbars=yes,width=250,height=310');
    imageWindow.document.writeln("<a href='javascript:;' title='Закрыть'><img src=" + newsrc + " onclick=window.self.close()></a>");
    imageWindow.document.close(); 
}
/*
function loadHTML(image){

/*var src = new String(image.src);
var slash,sub,dot,link;
slash=src.lastIndexOf("/");
sub=src.lastIndexOf("_");
dot=src.lastIndexOf(".");
link=new String( src.substring(0,slash+1)+"galery_"+src.substring(sub+1,dot)+".html");
window.document.location.href="index.html";
window.location.reload();
imageWindow=window.open(link,'',   'toolbar=no,scrollbars=yes,resizable=yes,width=800,height=600');

self.document.open(text/html);
self.document.write(text/html);
self.document.close();
*/
/*
name=image.name;
alert(name);
document.location.href='glr/galery_'+name+".html";
window.location.reload();
alert(document.location.href);
}
*/