function Rotuj(kam)
{
  if (kam > maximum)
	  {
	   poradi = 1;
	   document.getElementById('Pictu').style.cursor = "Pointer";
	  }
	else 
	  {
	   poradi = kam;
	   document.getElementById('Pictu').style.cursor = "Pointer";
	  }
  if (poradi < 10) pomoz = "0"+poradi
	else pomoz = poradi;
  dalsi = cesta + pomoz + ".jpg";
  document.images['obraz'].src = dalsi;
}

function FlipImage(obraz,novy)
{
   document.images[obraz].src=novy;
}

function Menu(jazyk,stranka,a,b)
{
  if (jazyk==1)
   {
	 with (document)
	   {
		writeln("<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=100% HEIGHT=100%>");
		writeln("<TR><TD valign=middle align=center>");

		writeln("<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=940 HEIGHT=575>");
		writeln("<TR valign=top>");
		writeln("<TD HEIGHT=575>");
		writeln("<A HREF='index.html'><IMG SRC='images/fam.gif' BORDER=0></A><BR>");

		if (a==1) writeln("<A HREF='novinky.html'><IMG SRC='images/novinkyhi.gif' BORDER=0 style='margin-top: 32px;' NAME='novinky'></A><BR>")
			else writeln("<A HREF='novinky.html' onMouseOver=FlipImage('novinky','images/novinkyhi.gif'); onMouseOut=FlipImage('novinky','images/novinky.gif');><IMG SRC='images/novinky.gif' BORDER=0 style='margin-top: 32px;' NAME='novinky'></A><BR>");

		if (a==2) writeln("<A HREF='atelier.html'><IMG SRC='images/onashi.gif' BORDER=0 style='margin-top: 22px;' NAME='onas'></A><BR>")
			else writeln("<A HREF='atelier.html' onMouseOver=FlipImage('onas','images/onashi.gif'); onMouseOut=FlipImage('onas','images/onas.gif');><IMG SRC='images/onas.gif' BORDER=0 style='margin-top: 22px;' NAME='onas'></A><BR>");

		if (a==3) writeln("<A HREF='projekty.html'><IMG SRC='images/projektyhi.gif' BORDER=0 style='margin-top: 24px;' NAME='projekty'></A><BR>")
			else writeln("<A HREF='projekty.html' onMouseOver=FlipImage('projekty','images/projektyhi.gif'); onMouseOut=FlipImage('projekty','images/projekty.gif');><IMG SRC='images/projekty.gif' BORDER=0 style='margin-top: 24px;' NAME='projekty'></A><BR>");

		if (a==4) writeln("<A HREF='kontakt.html'><IMG SRC='images/kontakthi.gif' BORDER=0 style='margin-top: 21px;' NAME='kontakt'></A><BR>")
			else writeln("<A HREF='kontakt.html' onMouseOver=FlipImage('kontakt','images/kontakthi.gif'); onMouseOut=FlipImage('kontakt','images/kontakt.gif');><IMG SRC='images/kontakt.gif' BORDER=0 style='margin-top: 21px;' NAME='kontakt'></A><BR>");

		writeln("</TD>");

		writeln("<TD class=introbez style='padding-left: 20px; padding-top: 80px; TEXT-ALIGN: justify;' WIDTH=90%>");

		writeln("");


	   }
	}
   else
   {
		 with (document)
		   {

		writeln("<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=100% HEIGHT=100%>");
		writeln("<TR><TD valign=middle align=center>");

		writeln("<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=940 HEIGHT=575>");
		writeln("<TR valign=top>");
		writeln("<TD HEIGHT=575>");
		writeln("<A HREF='index.html'><IMG SRC='images/fam.gif' BORDER=0></A><BR>");

		if (a==1) writeln("<A HREF='news.html'><IMG SRC='images/newshi.gif' BORDER=0 style='margin-top: 32px;' NAME='news'></A><BR>")
			else writeln("<A HREF='news.html' onMouseOver=FlipImage('news','images/newshi.gif'); onMouseOut=FlipImage('news','images/news.gif');><IMG SRC='images/news.gif' BORDER=0 style='margin-top: 32px;' NAME='news'></A><BR>");

		if (a==2) writeln("<A HREF='atelier.html'><IMG SRC='images/onashi.gif' BORDER=0 style='margin-top: 22px;' NAME='onas'></A><BR>")
			else writeln("<A HREF='atelier.html' onMouseOver=FlipImage('onas','images/onashi.gif'); onMouseOut=FlipImage('onas','images/onas.gif');><IMG SRC='images/onas.gif' BORDER=0 style='margin-top: 22px;' NAME='onas'></A><BR>");

		if (a==3) writeln("<A HREF='projekty.html'><IMG SRC='images/projektyhi.gif' BORDER=0 style='margin-top: 24px;' NAME='projekty'></A><BR>")
			else writeln("<A HREF='projekty.html' onMouseOver=FlipImage('projekty','images/projektyhi.gif'); onMouseOut=FlipImage('projekty','images/projekty.gif');><IMG SRC='images/projekty.gif' BORDER=0 style='margin-top: 24px;' NAME='projekty'></A><BR>");

		if (a==4) writeln("<A HREF='kontakt.html'><IMG SRC='images/kontakthi.gif' BORDER=0 style='margin-top: 21px;' NAME='kontakt'></A><BR>")
			else writeln("<A HREF='kontakt.html' onMouseOver=FlipImage('kontakt','images/kontakthi.gif'); onMouseOut=FlipImage('kontakt','images/kontakt.gif');><IMG SRC='images/kontakt.gif' BORDER=0 style='margin-top: 21px;' NAME='kontakt'></A><BR>");

		writeln("</TD>");

		writeln("<TD class=introbez style='padding-left: 20px; padding-top: 80px; TEXT-ALIGN: justify;' WIDTH=90%>");

		writeln("");

		   }
   }
}

function Refer(stavba,text,oddil)
{
	 with (document)
	   {
		writeln("<TD WIDTH=33% style='padding-bottom: 34px;'>");
		writeln("<A HREF='"+stavba+".html' class=seznam>");
		writeln("<IMG SRC='"+oddil+"/"+stavba+".jpg' BORDER=0 style='margin-bottom: 10px;' WIDTH=180 HEIGHT=120><BR>");
		writeln(text);
		writeln("</A>");
		writeln("</TD>");

	   }
}

function Okno(zdroj,sirka,vyska)
{
 with (navigator)
   {
	nazev=appName;
   }
 stredx=screen.width/2-sirka/2;
 stredy=screen.height/2-vyska/2-5;
 parametry="width="+sirka+",height="+vyska+",left="+stredx+",top="+stredy+",menubar=no,directories=no,toolbar=no,location=no,status=no,scrollbars=no,resizable=no";
 obr=window.open("","okno",parametry);
 obr.window.close();
 obr=window.open("","okno",parametry);
  with (obr)
   {
   window.focus();
   document.writeln("<HTML>\n<HEAD>\n<TITLE>atelier 2002</TITLE>");
   document.writeln("</HEAD>\n<BODY bgcolor=#DEDEDE MARGINWIDTH=0 MARGINHEIGHT=0 TOPMARGIN=0 LEFTMARGIN=0>");
   document.writeln("<A HREF='javascript:window.close()'><IMG SRC="+zdroj+" BORDER=0></A>");
   document.writeln("</BODY>\n</HTML>");
   window.focus();
   }

}
