function popUpa(URL)
{
var adresa;
if (URL == 1) adresa = 'http://www.podani.gov.cz/help/help_template.asp?content=help_government_services_online.htm&languageid=1';
if (URL == 2) adresa = 'http://www.podani.gov.cz/help/help_template.asp?content=help_sending_forms_electronically.htm&languageid=1';
if (URL == 3) adresa = 'http://www.podani.gov.cz/help/help_template.asp?content=help_more_info_gateway.htm&languageid=1';
if (URL == 4) adresa = 'http://www.podani.gov.cz/help/help_template.asp?content=help_what_do_i_need_to_register.htm&languageid=1';
if (URL == 5) adresa = 'http://www.podani.gov.cz/help/help_template.asp?content=help_is_it_secure.htm&languageid=1';
if (URL == 6) adresa = 'http://www.podani.gov.cz/help/help_template.asp?content=help_whats_new.htm&languageid=1';
if (URL == 7) adresa = 'http://www.podani.gov.cz/help/help_template.asp?content=help_government_links.htm&languageid=1';
if (URL == 8) adresa = 'http://www.podani.gov.cz/help/help_template.asp?content=help_userguide.htm&languageid=1';
if (URL == 9) adresa = 'http://www.podani.gov.cz/help/help_template.asp?content=help_service_regulations.htm&languageid=1';

	var winl = (screen.width - 400) / 2;
	var wint = (screen.height - 500) / 2;
	eval("page = window.open(adresa,'', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=yes,height=500,width=660,top='+wint+',left='+winl);");
}
function checkAnchor() 
{
	return false;
}
dnes=new Date();
me=new Array("Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec");
pd=new Array(31,28,31,30,31,30,31,31,30,31,30,31);
rok=dnes.getFullYear();
if((rok%4==0 && rok%100!=0)||(rok%400==0)) pd[1]=29;
function kalen(f,t)
{
	if((dnes.getFullYear()%4==0 && dnes.getFullYear()%100!=0)||(dnes.getFullYear()%400==0)) pd[1]=29;
	else pd[1]=28;
	s="<table cellspacing=\"1\"";
	s+="<tr><th><a href=\"javascript:window.opener.dnes.setDate(1); window.opener.dnes.setMonth(window.opener.dnes.getMonth()-1);window.opener.kalen('"+f+"','"+t+"');\">&lt;</a></th><th colspan=\"5\">";
	s+="<form>"+me[dnes.getMonth()]+"&nbsp;<select onchange=\"window.opener.dnes.setDate(1);window.opener.dnes.setYear(this[this.selectedIndex].value);window.opener.kalen('"+f+"','"+t+"');\">";
	for(i=(dnes.getFullYear()-5);i<(dnes.getFullYear()+5);i++)
	{
		s+="<option ";
		if(i==dnes.getFullYear()) s+=" selected ";
		s+=" value="+i+">"+i+"</option>";
	}
	s+="</select></form></th><th><a href=\"javascript:window.opener.dnes.setDate(1);window.opener.dnes.setMonth(window.opener.dnes.getMonth()+1);window.opener.kalen('"+f+"','"+t+"');\">&gt;</a></th></tr>";
	s+="<tr><th>Po</th><th>Út</th><th>St</th><th>Čt</th><th>Pá</th><th>So</th><th>Ne</th></tr><tr>";
	dnes.setDate(1);
	prvniDen=dnes.getDay();
	sloupec = 1;
  	if (prvniDen == 0) { prvniDen = 7; }
	for (i=1;i<prvniDen;i++)
	{
		s+="<td>&nbsp;</td>";
		sloupec++;
	}
	for (i=1;i<=pd[dnes.getMonth()];i++)
	{
			dnes.setHours(1);
			dnes.setDate(i);
			if((dnes.getDay()==6)||(dnes.getDay()==0))
			{	
			s+="<td style=\"background: #eee\">\n";
			}
			else
			{
			s+="<td>\n";
			}
			s+='<a';
			hrefon=" href=\"javascript:window.opener.vlozdat('"+f+"','"+t+"',"+dnes.getFullYear()+","+(dnes.getMonth()+1)+","+dnes.getDate()+");window.close();\"";
			s+=hrefon+'>'
			s+=i+'</a></td>\n';
			sloupec++;
			if (sloupec == 8)
				{
					if (i!=pd[dnes.getMonth()]) s+="</tr>\n<tr>";
					sloupec = 1;
				}
	}
	if (sloupec!=1)
	{
		for (i=sloupec;i<=7;i++) s+="<td>&nbsp;</td>";
	}
	s+="</tr></table>";
	
	head="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd\"><html><head>";
	head+="<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\n";
	head+="<title>Kalendář</title>\n";
	head+="<style type=\"text/css\">body, table {font-family: Arial, sans-serif; background: #fff; font-size: 12px } table { background: #ccc;width: 175px } form {margin: 0; padding: 0} table tr th { background: #2F4A9A;color: #fff;padding: 2px 4px} table tr th a { color: #fff;text-decoration: none } table tr th a:hover { color: #ccc } table tr td a:hover { color: #b10 } table tr td { padding: 2px 4px;background: #fff} </style>\n";
	head+="</head>\n<body>\n";
	foot="</body>\n</html>";
	a=window.open('Kalendar','a','scrollbars=no,status=no,toolbar=no,location=no,menu=no,resizable=yes,width=195,height=195,top=60,left=320');
	a.document.write(head);
	a.document.write(s);
	a.document.write(foot);
	a.document.close();
}
function vlozdat(f,t,r,m,d)
{
	document[f][t].value=d+"."+m+"."+r;
}

