<!--
function showPhoto(pict, title, width, height) {
	if ((typeof(pwin) != 'undefined') && !pwin.closed) { pwin.close(); }
	
	if (!width || !height) {
		width  = 800;
		height = 600;
	};
	
	if (!title) { title = 'Hotel Silver Resort****' };
	
	var left = Math.round((screen.availWidth - width) / 2);
	var top  = Math.round((screen.availHeight - height) / 2);
	
	pwin = window.open('','photo','width='+ width +', height='+ height +', left='+ left +', top='+ top +', screenX='+ left +', screenY='+ top +',directories=0, location=0, menubar=0, toolbar=0, status=0, resizable=0, scrollbars=0');
	pwin.document.open();
	pwin.document.write('<html><head><title>'+ title +'</title></head>');
	pwin.document.write('<body style="margin: 0px; padding: 0px; background-color: #000000;">');
	pwin.document.write('<img src="'+ pict +'" alt="bezár" width="'+ width +'" height="'+ height +'" border="0" onclick="window.close();" style="cursor: pointer;" />');
	pwin.document.write('</body></html>');		
	pwin.document.close();
}

function textRemaining(char_num, obj, num){
  var counter = (num) ? 'counter' + num : 'counter';
	
	if ((char_num - $F(obj).length) < 0) {
	  $(obj).value = $F(obj).substr(0, char_num);
	  $(counter).value = 0;	  
	} else {	  
	  $(counter).value = char_num - $F(obj).length;	  
	}	
}

function loadScript(file) {
  var js = document.createElement('script');
	
	js.setAttribute('text', 'text/javascript');
  js.setAttribute('language', 'javascript');
  js.setAttribute ('src', file);
  
	document.getElementsByTagName('head')[0].appendChild(js); 
}

function galeryWindow(cat, pics) {
	var width, height, left, top;
	
	if ((typeof(popupWindow) != 'undefined') && !popupWindow.closed) { popupWindow.close(); }
	
	width  = 740;
	height = 600;
	
	left = Math.round((screen.availWidth - width) / 2);
	top  = Math.round((screen.availHeight - height) / 2);
	
	var url   = 'index.php?op=gallery&action=show&category=' + cat + '&pics=' + pics;
	var param = 'width='+ width +', height='+ height +', left='+ left +', top='+ top +', screenX='+ left +', screenY='+ top +', directories=0, location=0, menubar=0, toolbar=0, status=0, resizable=0, scrollbars=0';
	
	popupWindow = window.open(url, 'popup', param);		
}

//-->