
function buttonOver(img){var path=img.src;if(path.search('02\.')==-1){img.src=img.src.replace('01\.','02\.');}else{img.id="dont";}}
function buttonOut(img){if(img.id!="dont"){img.src=img.src.replace('02\.','01\.');}}
function changeParamLabel(typ){if(typ<=4){document.getElementById('param_label').innerHTML='Pocet izieb:';}else{document.getElementById('param_label').innerHTML='Rozloha:';}}
function showImage(newSrc,newSrcBig){document.getElementById("mainImg").src=newSrc;document.getElementById("mainImgHref").href=newSrcBig;}
var map=null;var geocoder=null;function initialize(){if(GBrowserIsCompatible()){map=new GMap2(document.getElementById("mapa"));map.addControl(new GScaleControl());map.setCenter(new GLatLng(37.4419,-122.1419),14);geocoder=new GClientGeocoder();map.setUIToDefault();}}
function showAddress(address){if(geocoder){gps=address.split("#");if(gps.length>1){point=new GLatLng(gps[0],gps[1]);map.setCenter(point,15);var marker=new GMarker(point);map.addOverlay(marker);}else{geocoder.getLatLng(address,function(point){if(!point){var splitted=address.split(",");if(splitted[1]!=0){showAddress(splitted[0]);}else{alert("Adresu \""+address+"\" sa nepodarilo nájst.");}}else{map.setCenter(point,15);var marker=new GMarker(point);map.addOverlay(marker);}});}}}
function showFormular(id){if(id=='reagujForm'){otherID='odporucForm';}else{otherID='reagujForm';}
if(document.getElementById(id).style.display=='none'){document.getElementById(id).style.display='block';document.getElementById(otherID).style.display='none';}else{document.getElementById(id).style.display='none';}}
function changePeriod(value){var t=document.getElementById("den_v_tyzdni");var m=document.getElementById("den_v_mesiaci");if(value.value==1){t.style.display="none";m.style.display="none";}else if(value.value==7){t.style.display="inline";m.style.display="none";}else{t.style.display="none";m.style.display="inline";}}
function potvrd(text,target){var res=confirm(text);if(res){document.location=target;}}
function showDiv(target){if($("#"+target).is(":hidden")){$("#"+target).slideDown("slow");}else{$("#"+target).slideUp("fast");};}
