function maxpic(season,namefile,winwid,winhei,name)
{
third = "width="+winwid+", height="+winhei+", resizable";
var newWindow = window.open("","",third);
	if (newWindow!=null)
	{
		path  = "/images/"+season+"/"+namefile;
		newWindow.document.write("<title>"+name+"</title>");
		newWindow.document.write("<body leftmargin='0' topmargin='0' rightmargin='0' bottommargin='0' marginwidth='0' marginheight='0'>");
		newWindow.document.write("<IMG SRC="+path+" border='0' onClick='window.close();' onmouseover='this.style.cursor=\"hand\";' alt='Для закрытия - нажмите'>");
		newWindow.document.write("</body>");
		newWindow.document.close();
		newWindow.document.focus();
	}
}

function getMail(mail,kuda)
{
put="mailto:";
location.href=put+kuda+"@"+mail;
}

function ShowLayers()
{
	if (ListLayers.length!=0)
	{
	  var bottomPad  = 57;
	  var winWidth   = parseInt(document.getElementById("lyr1").style.width);
	  var maxHeight  = document.body.clientHeight-bottomPad;
	  var leftOtstup = (document.body.clientWidth<winWidth)?0:((document.body.clientWidth/2)-(winWidth/2));
	  for (i=1;i<=ListLayers.length;i++)
	  {
			if (document.getElementById("lyr"+i))
			{
				 with (document.getElementById("lyr"+i))
				 {
					if (ListLayers.substr(i-1,1)!="0")
					{
						style.top  = parseInt(TopOtstup[i-1]);
						style.left = (leftOtstup + parseInt(LeftOtstup[i-1]));
						if (i!=1)
						{
							style.display = "block";
							curHeight = parseInt(TopOtstup[i-1]) + clientHeight;
							if (curHeight>maxHeight) maxHeight=curHeight;
						}
					}
					else
					{
						if (style.display == "block") style.display = "none";
					}
				 }
			}
	  }
		document.getElementById("content").style.height=maxHeight+bottomPad;
		document.getElementById("lyr1").style.visibility="visible";
	}
}

