function loadPage(tcUrl) {window.open(tcUrl,"_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no");}
function IncludeJavaScript(jsFile) {document.write('<script type="text/javascript" src="'+jsFile+'"></script>');}
function reloadPage() {window.location.reload();}

function getDayName() {
	var tdDay=new Date();
	switch (tdDay.getDay()) {
		case 0: return "Nedeľa";
		case 1: return "Pondelok";
		case 2: return "Utorok";
		case 3: return "Streda";
		case 4: return "Švrtok";
		case 5: return "Piatok";
		case 6: return "Sobota";
	}
	return "";
}
function startTime() {
	var today=new Date();
	var h=today.getHours();
	var m=checkTime(today.getMinutes());
	var s=checkTime(today.getSeconds());

	document.getElementById('txt').innerHTML=h+":"+m+":"+s;
	t=setTimeout('startTime()',500);
}
function startPage() {
	try {
		var loName=document.getElementsByName('txtVer');
		if (loName.length>0) loName[0].focus(); 
			else {
				loName=document.getElementsByName('name');
				if (loName.length>0) loName[0].focus(); 
					else {
						loName=document.getElementsByName('ico');
						if (loName.length>0) loName[0].focus(); 
							else {
								loName=document.getElementsByName('subjekt');
								if (loName.length>0) loName[0].focus(); 
									else {
										loName=document.getElementsByName('komit');
										if (loName.length>0) loName[0].focus(); 
									}
							}
					}
			}

		//highslide
		hs.graphicsDir = 'java/highslide/graphics/';
		hs.align = 'center';
		hs.transitions = ["expand", "crossfade"];
		hs.allowSizeReduction = false;
		//hs.maxHeight = 417;
		hs.wrapperClassName = 'dark floating-caption ';
		hs.outlineType = 'glossy-dark';
		hs.fadeInOut = true;
		hs.dimmingOpacity = .45;
		hs.showCredits = false;
	
		// Add the controlbar
		if (hs.addSlideshow) hs.addSlideshow({
			//slideshowGroup: 'group1',
			interval: 5000,
			repeat: false,
			useControls: true,
			fixedControls: false,
			overlayOptions: {
				opacity: .75,
				position: 'bottom right',
				hideOnMouseOut: true
			}
		});

		startTime();
	} catch (err) {
		txt="There was an error on this page.\n\n";
		txt+="Error: " + err.message + "\n";
		txt+="Error description: " + err.description + "\n\n";
		txt+="Click OK to continue.\n\n";
		if (!confirm(txt)) return false;
	};
}

function checkTime(i) {return ((i<10)?"0"+i:i)};
