function preloadImages( imageRoot )
{
  if (document.images)
  {
/*  preloadPics( imageRoot+'/portfolio/small/',
              '1-a.jpg', '1-b.jpg', '1-a_.jpg', '1-b_.jpg',
              '2-a.jpg', '2-b.jpg', '2-a_.jpg', '2-b_.jpg',
              '3-a.jpg', '3-b.jpg', '3-a_.jpg', '3-b_.jpg',
              '4-a.jpg', '4-b.jpg', '4-a_.jpg', '4-b_.jpg'
  );
*/
  }
  preloadFlag = true;

}


function showImage( src, alt,w, h ){
var scroll = 0;
var resize = 0;
 
LeftPosition=(screen.width)?(screen.width-w)/2:100;
TopPosition=(screen.height)?(screen.height-h)/2:100;
settings='width='+(w+40)+',height='+(h+40)+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable='+resize;
//alert(src);
win=window.open('','image',settings);

  win.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
  win.document.write('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">');
  win.document.write('<head>');
  win.document.write('<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />');
  win.document.write('<title>'+alt+'</title>');
  win.document.write('</head>');
  win.document.write('<body style="margin:0px; padding:20px">');

  win.document.write('<a href="" onClick="window.close();" />');
  win.document.write('<img src="'+src+'" alt="'+alt+'" border="0" title="Нажмите чтобы закрыть">');
  win.document.write('</a>');

  win.document.write('</body>');
  win.document.write('</html>');
}

function dynadate( dalta_days, time ){
  var today = new Date();
  today.setTime( today.getTime() - dalta_days*24*60*60*1000 );
  var strtoday = today.toLocaleString();
  if (!is.opera)
    strtoday = strtoday.substring(0,strtoday.indexOf("."));
  else
    strtoday = strtoday.substring(0,strtoday.indexOf(" "));    
  document.write( strtoday+ "&nbsp;"+ time );
}
