function view_photo(imgSrc,width,height,title)
{
  var sWidth = screen.availWidth;
  var sHeight = screen.availHeight;

  if(!title)
  {
    title = "";
  }

  var pic_window = window.open('','','width=' + width + ',height=' + height + ',left=' + ((sWidth-width)/2) + ',top=' + ((sHeight-height)/2) + ',scrollbars=yes');
  var str = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">' +
            '<html><head><title>' + title + '</title></head><body style="margin: 0; padding: 0;">' +
            '<img alt="' + title + '" src="' + imgSrc + '" width="' + width + '" height="' + height + '">' +
            '</body></html>';
  pic_window.document.write(str);
  pic_window.document.close();
}

function getValidValue(value)
{
  value = value.toString();

  while(value.length < 2)
  {
    value = "0" + value;
  }

  return value;
}

function getCurTime()
{
  var d = new Date();
  var curDay;

  switch(d.getDay())
  {
    case 1: curDay = "понедельник";
      break;
    case 2: curDay = "вторник";
      break;
    case 3: curDay = "среда";
      break;
    case 4: curDay = "четверг";
      break;
    case 5: curDay = "пятница";
      break;
    case 6: curDay = "суббота";
      break;
    case 7: curDay = "воскресенье";
      break;
  }

  day.innerHTML = curDay;
  hours.innerHTML = getValidValue(d.getHours());
  minutes.innerHTML = getValidValue(d.getMinutes());
}


function menu_icon_over(el){
	re=/^item-(\d)/;
	a=re.exec(el.id);
	el.id="item-"+a[1]+"-act";
}

function menu_icon_out(el){
	re=/^item-(\d)/;
	a=re.exec(el.id);
	el.id="item-"+a[1];
}
