<!--

/* JavaScript (c) Jakub Mahdal 2002 */

var favoriteAdded = false; // je stranka pridana k oblibenym?


/* ----------------- definice metod --------------------------- */	

//pridat k oblibenym - pod jmenem jako je v titulku stranky
function addToFavorite(linkObj,addUrl,addTitle) { 
	if (document.all && !window.opera) { 
		window.external.AddFavorite(addUrl,addTitle); 
		return false; 
	} else if (window.opera && window.print) { 
		linkObj.title = addTitle; 
		return true; 
	} else if ((typeof window.sidebar == 'object') && (typeof window.sidebar.addPanel == 'function')) { 
		if (window.confirm('Přidat oblibenou stránku mezi záložky?')) { 
			window.sidebar.addPanel(addTitle,addUrl,''); 
			return false; 
		} 
	}
	return false; 
}

function clearValue(elem, txt) {    
	if (elem.value.indexOf(txt, 0) == 0) elem.value = '';
}


//fce na vymenu detailniho obrazku v katalogu 
function changeDetailImgFromArray(position, id_image, input_position_Id, id_link ){
	
	new_pos = gallery_photo_pos + position;
	
	if ( (new_pos >= 0) && (new_pos < gallery_photo_count) )
		gallery_photo_pos = new_pos;
		
	new_image_url = photo_urls[gallery_photo_pos];
	new_link = photo_links[gallery_photo_pos];
	
	positionElem = document.getElementById(input_position_Id);
	positionElem.value = (gallery_photo_pos+1) + "/" + gallery_photo_count;	
	image = document.getElementById(id_image);
	image.src = new_image_url;
	/*link = document.getElementById(id_link);
	link.href = new_link;*/
}



//fce na otevreni obrazku v novem okne bez ovladacich listicek 
function openPictText(new_url, new_title, descp, w, h){
	width = 50 + w;
	height = h + 100;
	x = 0 + (screen.width - width)/2;
	y = 0 + (screen.height - height)/2;
	newWindow = window.open('','','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width='+width+',height='+height);
	newWindow.moveTo(x,y);
	newDoc = newWindow.document;
	newContent = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
	newContent += '<title>'+new_title+'</title><link rel="StyleSheet" href="css/styles.css" type="text/css">';
	newContent += '</head><body bgcolor="#000" style="margin: 0px;">';
	newContent += '<table width="100%" border="0" align="center"><tr><td width="20">&nbsp;&nbsp;</td>';
	newContent += '<td valign="top">';
	newContent += '<table width="'+w+'" border="0" cellspacing="0" cellpadding="0" align="left">';
	newContent += '<tr><td align="center"><img src="'+new_url+'" alt="" width="'+w+'" height="'+h+'" hspace="0" border="0" align="middle" class="fotoBig"></td></tr>';
	newContent += '<tr><td align="center"><br><strong style="color:#fff;font-family: Verdana, Tahoma, sans-serif;">'+new_title+'</strong></td></tr>';
	newContent += '<tr><td align="center"><p style="margin:0px 20px 0px 20px;color:#fff;font-family: Verdana, Tahoma, sans-serif;font-size:8pt;text-align:left;">'+descp+'</p></td></tr></table>';
	newContent += '</td><td width="20">&nbsp;</td></tr></table></body></html>';
	newDoc.write(newContent);
	newDoc.close();
}

//fce na otevreni obrazku v novem okne bez ovladacich listicek 
function openPictTextNoSize(new_url, new_title, descp, w, h){
	width = 10 + w;
	height = h + 10;
	x = 0 + (screen.width - width)/2;
	y = 0 + (screen.height - height)/2;
	newWindow = window.open('','','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width='+width+',height='+height);
	newWindow.moveTo(x,y);
	newDoc = newWindow.document;
	newContent = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
	newContent += '<title>'+new_title+'</title><link rel="StyleSheet" href="css/styles.css" type="text/css">';
	newContent += '</head><body bgcolor="#000" style="margin: 0px;">';
	newContent += '<table width="100%" border="0" align="center"><tr><td width="20">&nbsp;&nbsp;</td>';
	newContent += '<td valign="top">';
	newContent += '<table width="'+w+'" border="0" cellspacing="0" cellpadding="0" align="left">';
	newContent += '<tr><td align="center"><img src="'+new_url+'" alt="" hspace="0" border="0" align="middle" class="fotoBig"></td></tr>';
	newContent += '<tr><td align="center"><br><strong style="color:#fff;font-family: Verdana, Tahoma, sans-serif;">'+new_title+'</strong></td></tr>';
	newContent += '<tr><td align="center"><p style="margin:0px 20px 0px 20px;color:#fff;font-family: Verdana, Tahoma, sans-serif;font-size:8pt;text-align:left;">'+descp+'</p></td></tr></table>';
	newContent += '</td><td width="20">&nbsp;</td></tr></table>';
	newContent += '<a href="http://navrcholu.cz/"><img src="http://c1.navrcholu.cz/hit?site=84017;t=lb1;ref=;jss=0" width="1" height="1" alt="NAVRCHOLU.cz" style="border:none; margin: 0px 2px 0px 2px;" /></a>';
	newContent += '<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script><script type="text/javascript">_uacct = "UA-1516395-3";urchinTracker();</script>';
	newContent += '</body></html>';
	newDoc.write(newContent);
	newDoc.close();
}

//fce na otevreni obrazku v novem okne bez ovladacich listicek 
function openHTML(new_url, new_title, w, h){
	width = 50 + w;
	height = 100+ h;	
	x = 0 + (screen.width - width)/2;
	y = 0 + (screen.height - height)/2;
	newWindow = window.open(new_url,'','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width='+width+',height='+height);
	newWindow.moveTo(x,y);
}

//fce na ziskani req. parametru 
var queryString = window.top.location.search.substring(1);

function getParameter ( queryString, parameterName ) 
{
	var parameterName = parameterName + "=";
	if ( queryString.length > 0 ) 
	{
		begin = queryString.indexOf ( parameterName );
		if ( begin != -1 ) 
		{
			begin += parameterName.length;
			end = queryString.indexOf ( "&" , begin );
			if ( end == -1 ) 
			{
				end = queryString.length
			}
			return unescape ( queryString.substring ( begin, end ) );
		}
		return "null";
	}
} 


//fce na vymenu detailniho obrazku v katalogu 
function changeDetailImg(new_url,id_image,new_link,id_link){
	image = document.getElementById(id_image);
	image.src = new_url;
	link = document.getElementById(id_link);
	link.href = new_link;
}


<!-- konec skriptu -->
