function loginfocus()
{
	var user = document.getElementById('user');
	user.focus();
}

function zoom(myImage, myWidth, myHeight)
{
myLeft = (window.screen.width - myWidth ) / 2 ;
myTop = (window.screen.height - myHeight ) / 2;
myWidth = myWidth + 6;
myHeight = myHeight + 6;

myWindow = window.open("","popup","height="+myHeight+"px,width="+myWidth+"px,left="+myLeft+"px,top="+myTop+"px,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes");
myWindow.document.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n");
myWindow.document.write("<html>\n\t<head>\n\t\t<title>Preview</title>\n\t</head>\n");
myWindow.document.write("\t<body style=\"margin: 0; padding: 3px; background: black;\">\n");
myWindow.document.write("\t\t<a href=\"#\" onclick=\"parent.close();\" title=\"Zavøít okno\"><img style=\"border: 0;\" src=\""+myImage+"\" alt=\"Preview\"></a>\n");
myWindow.document.write("\t</body>\n</html>");
myWindow.document.close();
return myWindow;
}

function panorama(isimgas)
{
iMyWidth = (window.screen.width/2) - (165 + 10)
iMyHeight = (window.screen.height/2) - (127 + 25)
openerdue = window.open("", "opener","height=255,width=330,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=auto, toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,directories=no,resizable=yes");
openerdue.document.write("<HTML><head>");
openerdue.document.write("<base href='http://10.10.11.10:11002/projekt1/'>");
openerdue.document.write("<title>Obec Sporice a okolí</title>");
openerdue.document.write("</head>");
openerdue.document.write("<BODY TOPMARGIN=5 LEFTMARGIN=2 BGCOLOR=#EACDAF TEXT=000000>");
openerdue.document.write("<table height=100% align=center><tr><td><APPLET archive = '../source/ptviewer.jar' code = 'ptviewer.class' width = 320 height = 240>");
openerdue.document.write("<PARAM name = wait value = '../img/wait.gif'>");
openerdue.document.write("<PARAM name = bar_x value = 40>");
openerdue.document.write("<PARAM name = bar_y value = 180>");
openerdue.document.write("<PARAM name = bar_width value = 240>");
openerdue.document.write("<PARAM name = bar_height value = 16>");
openerdue.document.write("<PARAM name = barcolor value = EACDAF>");
openerdue.document.write("<PARAM name = quality value = 3>");
openerdue.document.write("<PARAM name = frame value = '../img/navigation_bar.gif'>");
openerdue.document.write("<PARAM name = bgcolor value = ffffff>");
openerdue.document.write("<PARAM name = shotspot0 value = \" x251 y215 a272 b239 u'ptviewer:startAutoPan(0,0,1.01)' \">");
openerdue.document.write("<PARAM name = shotspot1 value = \" x233 y215 a251 b239 u'ptviewer:startAutoPan(0,0,0.99)' \">");
openerdue.document.write("<PARAM name = shotspot2 value = \" x189 y230 a231 b242 u'ptviewer:startAutoPan(0,-1.0,1.0)' \">");
openerdue.document.write("<PARAM name = shotspot3 value = \" x191 y215 a233 b227 u'ptviewer:startAutoPan(0,1.0,1.0)' \">");
openerdue.document.write("<PARAM name = shotspot4 value = \" x168 y218 a189 b242 u'ptviewer:startAutoPan(1.0,0,1.0)' \">");
openerdue.document.write("<PARAM name = shotspot5 value = \" x146 y218 a167 b242 u'ptviewer:startAutoPan(-1.0,0,1.0)' \">");
openerdue.document.write("<PARAM name = file value = 'ptviewer:0'>");
openerdue.document.write("<PARAM name = pano0 value = '{file="+isimgas+"_big.jpg}{auto=0.8}{panmin=-179}{panmax=179}{pan=0}{tiltmin=-90}{tiltmax=90}{tilt=0}{fovmin=50}{fovmax=90}{fov=90}'>");
openerdue.document.write("</Applet></td></tr></table>");
openerdue.document.write("<br>");
openerdue.document.write("</BODY>");
openerdue.document.write("</HTML>");
openerdue.document.close();
}

