OpenWindow = null;
function doCloseWin()
{
if (OpenWindow)
{OpenWindow.close();}
}
function zoom(url_img,wid,heid,zagolovok)
{
	if (OpenWindow)
	{OpenWindow.close();}

	if (!OpenWindow || (OpenWindow.closed))
	{
	www=""+url_img;
	OpenWindow=window.open('', 'xxx', 'width='+wid+',height='+heid+'resizable=yes,scrollbars=no,top=50,left=50');
	OpenWindow.document.write("<HTML>")
	OpenWindow.document.write("<TITLE>")
	OpenWindow.document.write(zagolovok)
	OpenWindow.document.write("</TITLE>")
	OpenWindow.document.write('<BODY topmargin="0" leftmargin="0">')
	OpenWindow.document.write("<CENTER>")
	OpenWindow.document.write('<link href="/style.css" type="text/css" rel="stylesheet">')
	OpenWindow.document.write('<img onclick="window.close()" src="')
	OpenWindow.document.write(url_img)
	OpenWindow.document.write('" alt="" border="0">')
	OpenWindow.document.write("</CENTER>")
	OpenWindow.document.write("</BODY>")
	OpenWindow.document.write("</HTML>")
	OpenWindow.document.close()
	}
}

function addBookmark(url, title)
{
  if (!url) url = "http://sauna.spb.ru/";
  if (!title) title = "Сауны Санкт-Петербурга — Sauna.Spb.Ru";

  //Gecko
  if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")) window.sidebar.addPanel (title, url, '');
  //IE4+
  else if (typeof window.external == "object") window.external.AddFavorite(url, title);
  //Opera7+
  else if (window.opera && document.createElement)
  {
    var a = document.createElement('A');
    if (!a) return false; //IF Opera 6
    a.setAttribute('rel','sidebar');
    a.setAttribute('href',url);
    a.setAttribute('title',title);
    a.click();
  }
  else return false;

  return true;
}

function overTd(id_td) 
{
sale=document.getElementById(id_td);
sale.style.backgroundColor='#B1B1B1';
}

function outTd(id_td) 
{
sale=document.getElementById(id_td);
sale.style.backgroundColor='#DBDBDB';
}
