function ShowPhoto(ur,tit){
var varMode;

if (!newWindow || newWindow.closed) {}else {newWindow.close();}

if (window.screen.width > 800) {
wR=800;hR=600;
wOri=400;hOri=300;
}
else {
wR=640;hR=480;
wOri=320;hOri=240;
}
wR=wOri*1.1;
hR=hOri*1.4;
varMode="status,top=10,left=50,width=" + wR + ",height=" + hR + ")";
newWindow = window.open("","",varMode);

if (!newWindow.opener) {
newWindow.opener = window;}

setTimeout("writePhoto('" + ur + "','"+tit+"')", 50);

}



function writePhoto(ur,tit) {
var newContent = "<HTML><HEAD><TITLE>ÑÏ ÐÈÔ-1. " + tit + "</TITLE>"

newContent += "<SCRIPT LANGUAGE='JavaScript'>"
newContent += "var newWindow;"

newContent += "</SCRIPT>"

newContent += "</HEAD>"

newContent += "<BODY class='bodyBlue' BGCOLOR='skyblue'>"
newContent += "<CENTER><H2><font color='darkred'>"  + tit+ "</font> </H2></CENTER>";


newContent += "<center> <IMG SRC= '" + ur + "' BORDER=2 "

newContent += "WIDTH= "+wOri+"  HEIGHT="+hOri +";"
newContent += " NAME='map'>"
newContent += "</center>"
newContent+="<FORM><center align=left><INPUT TYPE='button' VALUE=' X ' onClick='self.close()'></center></FORM>";
newContent += "</BODY></HTML>"

newWindow.document.write(newContent)
newWindow.document.close();}




function ShowPhotoMulti(ur,tit){

var varMode;
var vi=ur.length;
var newContent;
var i;


if (!newWindow || newWindow.closed) {}else {newWindow.close();}

wR=800;hR=600;
wOri=640;hOri=480;

if (vi==2) {hOri=hOri/1.6;};

wR=wOri*1.1;
hR=hOri*1.35;
varMode="status,top=10,left=50,width=" + wR + ",height=" + hR + ")";
if (vi>4) {
varMode="status,top=10,left=50,scrollbars=1,width=" + wR + ",height=" + hR + ")";};

newWindow = window.open("","",varMode);
if (!newWindow.opener) {newWindow.opener = window;}


newContent = "<HTML><HEAD><TITLE>ÑÏ ÐÈÔ-1. " + tit + "</TITLE>";
newContent +="<SCRIPT language='JavaScript1.2'>var newWindow;</SCRIPT>";
newContent +="<SCRIPT LANGUAGE='JavaScript1.2'  SRC='photoview.js';></SCRIPT>"; 
newContent +="</HEAD>";

newContent += "<BODY class='bodyBlue' BGCOLOR='skyblue'>"
newContent += "<CENTER><H2><font color='darkred'>"  + tit+ "</font> </H2></CENTER>";

newContent +="<CENTER><TABLE>";
newContent +="<TR>";



if (vi==1) {
newContent +="<TD Align=center>";
newContent += "<IMG SRC= '" + ur[0][0] + "' BORDER=2 WIDTH=" + wOri +" HEIGHT="+hOri+">";
newContent += "<Br><B>" + ur[0][1] + "</B>";
newContent +="</TD>";

}

else

{
for (i=0; i < vi; i++) {
if (i%2==0) {newContent +="</TR><TR>";};

newContent +="<TD Align=center>";
//newContent += "<a title='photo' href=javascript:ShowPhotoMulti('" +ur[i][0]+ "','"+tit+"-" + ur[i][1] +"')>";
newContent += "<a title='photo' href=javascript:ShowPhotoMulti([['" +ur[i][0]+ "','']],'"+tit+"-" + ur[i][1] +"')>";
newContent += "<IMG SRC= '" + ur[i][0] + "' BORDER=2 WIDTH=320 HEIGHT=240>"
newContent += "</a>";

newContent += "<Br><b>" + ur[i][1] + "</b>";
newContent +="</TD>";
};
};
newContent +="</TABLE></CENTER>";


//newContent += "<center> <IMG SRC= '" + ur + "' BORDER=2 "
//newContent += "WIDTH= "+wOri+"  HEIGHT="+hOri +";"
//newContent += " NAME='map'>"
//newContent += "</center>"
newContent+="<FORM><center align=left><INPUT TYPE='button' VALUE=' X ' onClick='self.close()'></center></FORM>";
newContent += "</BODY></HTML>"

newWindow.document.write(newContent)
newWindow.document.close();
}

