var ww;
var hh;
var file2;
var file3;
var wpic;
var hpic;

function showphoto(file,w,h) {
  wpic=w;
  hpic=h;
  file2=file;
  file3=file;
  ww=w+15;
  hh=h+75;
  var string1='width='+ww+',height='+hh;
  if (window.open) {
    newWindow = window.open("","",string1);
    setTimeout('update()',1000);
  } else {
    this.document.location = file2;
  }
}
function showphoto1(file,w,h) {
  wpic=w;
  hpic=h;
  file2=file;
  file3=file;
  ww=w+15;
  hh=h+75;
  var string1='width='+ww+',height='+hh;
  if (window.open) {
    newWindow = window.open("","",string1);
    setTimeout('update1()',1000);
  } else {
    this.document.location = file2;
  }
}
function update() {
    var base='http://ram-home.com/photos/';
    newWindow.document.open();
    newWindow.document.writeln('<html><head><title>Картинка</title></head>');
    newWindow.document.writeln('<body bgcolor="LightSlateGray" style="padding:0;margin:0;"><center>');
    newWindow.document.writeln('<a href="javascript:window.close()">')
    newWindow.document.writeln('<img border=0 width='+wpic+' height='+hpic+' src='+base+'500/'+file2+'><br>');
    newWindow.document.writeln('</a>');
    newWindow.document.writeln('<br>Real picture is much bigger, get it <a href='+base+'1200/'+file2+' target=blank>here</a>');
    newWindow.document.writeln('<br>Большая картинка (500к) <a href='+base+'1200/'+file2+' target=blank><b>находится здесь</b></a>');
    newWindow.document.writeln('To close this window, click on the picture');
    newWindow.document.writeln('</center></body></html>');
    newWindow.document.close();
}

function update1() {
    var base='http://ram-home.com/photos/';
    newWindow.document.open();
    newWindow.document.writeln('<html><head><title>Картинка</title></head>');
    newWindow.document.writeln('<body bgcolor="LightSlateGray" style="padding:0;margin:0;"><center>');
    newWindow.document.writeln('<a href="javascript:window.close()">')
    newWindow.document.writeln('<img border=0 width='+wpic+' height='+hpic+' src="'+base+'500/'+file2+'"><br>');
    newWindow.document.writeln('</a>');
    newWindow.document.writeln('<br>Real picture is much bigger, get it <a href='+base+'1200/'+file2+' target=blank>here</a>');
    newWindow.document.writeln('<br>Большая картинка (500к) <a href='+base+'1200/'+file2+' target=blank><b>находится здесь</b></a>');
    newWindow.document.writeln('To close this window, click on the picture');
    newWindow.document.writeln('</center></body></html>');
    newWindow.document.close();
}

function linejka(year,topic,start,end,current) {
  document.writeln('<br>Страницы (Pages) :');
  for (i=start; i<=end; i++) {
     if (i != current) {
       if (year!=0) {
          document.writeln('<a href="'+year+'-'+topic+i+'.html">['+i+']</a>');
       } else {
          document.writeln('<a href="'+topic+i+'.html">['+i+']</a>');
       }
     } else {
       document.writeln('['+i+']');
     }
  }
}

function linejka_short(year,topic,start,end,current) {
  for (i=start; i<=end; i++) {
     if (i != current) {
       if (year!=0) {
          document.writeln('<a href="'+year+'-'+topic+i+'.html">['+i+']</a>');
       } else {
          document.writeln('<a href="'+topic+i+'.html">['+i+']</a>');
       }
     } else {
       document.writeln('['+i+']');
     }
  }
}

function picture(name, w500, h500, w100, h100) {
  var base='http://ram-home.com/photos/';
  var name1=name+'.JPG';
  var name2="'"+name1+"'";
  document.writeln('<a href="javascript:showphoto1('+name2+', '+w500+', '+h500+')">');
  document.writeln('<img border=0 width='+w100+' height='+h100+' src='+base+'100/'+name+'.JPG></a>');
}


