var USED_FOR_PAGE_Light=".";var voliviewerVersion="1.4.3";var IS_VOLIVIEWER_OPENED_ON_IMAGE_CLICK_Light=true;var IS_IMG_MOVE_TO_DEF_POS_Light=true;var IS_OVER_IMAGE_LAYOUT=false;var MIN_IMGPANEL_WIDTH=420;var MIN_IMGPANEL_HEIGHT=400;var SLIDESHOW_STATES=[['doleva','12s',"left"],['doleva','8s',"left"],['doleva','5s',"left"],['doleva','3s',"left"],['doleva','1s',"left"],['doprava','1s',"right"],['doprava','3s',"right"],['doprava','5s',"right"],['doprava','8s',"right"],['doprava','12s',"right"]];var navigationButtons=['první','doleva','doprava','poslední','zavřít','otevřít prohlížeč obrázků','zmenšit do okna prohlížeče','zvětšit do původní velikosti','vypnout centrování obrázku','zapnout centrování obrázku','načítání obrázku...'];var request=null;var isCacheStarted_Light=false;var connAsynchronous=false;var areImagesLoaded_Light=false;var ANIMATION_TIME=10;var DEFAULT_OPACITY_VALUE=80;var MAX_OPACITY_OVERIMGLAYOUT=10;var MIN_STEP_OLDIMAGE=40;var opacityValue=100;var images_Light=Array();var imagesObj_Light=null;var imgL_Light=new Image();var toolsImg_centerImage_yes=new Image();var toolsImg_centerImage_no=new Image();var toolsImg_fitImageToPage_increase=new Image();var toolsImg_fitImageToPage_decrease=new Image();var timer1_Light=null;var timer2_Light=null;var timer3_Light=null;var timer4_Light=null;var timer5_Light=null;var timer6_Light=null;var timer7_Light=null;var oldScrollPosX_Light;var oldScrollPosY_Light;var isSetScrollPos_Light=false;var screenWidth;var screenHeight;var browserWidth;var browserHeight;var actualObjectID_Light=null;var oldImgSrc=null;var oldImgPosX=0;var oldImgPosY=0;var oldImgPosX_step=0;var oldImgWidth=0;var oldImgHeight=0;var isViewerOpened=false;var isViewerStarting=false;var isMoveLeft=true;var arrowLeft=null;var arrowRight=null;var floatInfoPanelText="";var errorsCount_Light=0;var img_pos_Light=0;var areImagesPrepared_Light=false;var cont_0_Light=null;var cont_1_Light=null;var cont_Light=null;var curPos={x:-1,y:-1};var isImageMoving=false;var isImageMovingHorizontal=false;var isImageMovingVertical=false;var timer4_moveImgToDefPos_Light=null;var imgElm_defWidth=0;var imgElm_defHeight=0;var defImgPosX=0;var defImgPosY=0;var isMoveImgToDefPos=false;var isState_fitImageToPage=false;var PATH_TO_VOLIVIEWER_IMAGES="/aspinclude/vismoweb5/html/images/voliviewer/";var areCSSFilesLoaded_Light=false;timer4_Light=setTimeout(function(){if(location.href.indexOf(USED_FOR_PAGE_Light)>-1){createRequestObject_Light();prepareImages_Light(0);initCSSFile_Light();}},0);function prepareTitles(v1,v2,v3,v4,v5,v6){SLIDESHOW_STATES=[[v1,'12s',"left"],[v1,'8s',"left"],[v1,'5s',"left"],[v1,'3s',"left"],[v1,'1s',"left"],[v2,'1s',"right"],[v2,'3s',"right"],[v2,'5s',"right"],[v2,'8s',"right"],[v2,'12s',"right"]];navigationButtons=[v3,v1,v2,v4,v5.split(';')[0],v6,v5.split(';')[1]?v5.split(';')[1]:navigationButtons[6],v5.split(';')[2]?v5.split(';')[2]:navigationButtons[7],v5.split(';')[3]?v5.split(';')[3]:navigationButtons[8],v5.split(';')[4]?v5.split(';')[4]:navigationButtons[9],v5.split(';')[5]?v5.split(';')[5]:navigationButtons[10],v5.split(';')[6]?v5.split(';')[6]:navigationButtons[11],v5.split(';')[7]?v5.split(';')[7]:navigationButtons[12],v5.split(';')[8]?v5.split(';')[8]:navigationButtons[13],v5.split(';')[9]?v5.split(';')[9]:navigationButtons[14],v5.split(';')[10]?v5.split(';')[10]:navigationButtons[15],v5.split(';')[11]?v5.split(';')[11]:navigationButtons[16],v5.split(';')[12]?v5.split(';')[12]:navigationButtons[17],v5.split(';')[13]?v5.split(';')[13]:navigationButtons[18],v5.split(';')[14]?v5.split(';')[14]:navigationButtons[19],v5.split(';')[15]?v5.split(';')[15]:navigationButtons[20]];}
function prepareImages_Light(beginFrom){if(!document.body){timer4_Light=setTimeout(function(){prepareImages_Light(beginFrom);},5);return;}
try{if(location.href.indexOf(USED_FOR_PAGE_Light)>-1){cont_Light=null;cont_1_Light=document.body.getElementsByTagName("div");for(var j=0;j<cont_1_Light.length;j++){if(cont_1_Light[j].className=="editor"){cont_Light=cont_1_Light[j];if(cont_Light){var imgs_Light=cont_Light.getElementsByTagName("a");for(var i=0;i<imgs_Light.length;i++){if(imgs_Light[i].getElementsByTagName("img").length>0){images_Light[img_pos_Light]=cont_Light.getElementsByTagName("a")[i];img_pos_Light++;}}}
if(!images_Light){timer4_Light=setTimeout(function(){prepareImages_Light(beginFrom);},0);return;}
for(i=beginFrom;i<images_Light.length;i++,beginFrom++){try{if(images_Light[i].tagName.toLowerCase()=="a"){if(images_Light[i].getAttribute("href").length>0&&images_Light[i].className.indexOf("jezvetsenina")>=0){images_Light[i].setAttribute("url",images_Light[i].getAttribute("href"));images_Light[i].setAttribute("id","L"+i);if(IS_VOLIVIEWER_OPENED_ON_IMAGE_CLICK_Light){images_Light[i].setAttribute("href","javascript:void(0);");images_Light[i].onclick=function(e){getImageInfo_Light(this.id);}}}}}catch(e){}}}}}}
catch(e2){timer4_Light=setTimeout(function(){prepareImages_Light(beginFrom);},0);return;}
clearTimeout(timer4_Light);areImagesPrepared_Light=true;setTimeout(function(){cacheImages_Light();},0);}
function isGallery(){clearTimeout(timer7_Light);var isGallery=false;var gallery=document.getElementsByTagName("div");for(var i=0;i<gallery.length;i++){if(gallery[i].className.indexOf("kontnahledy")>-1){isGallery=true;break;}}
if(isGallery){var nBody=document.getElementsByTagName('head')[0];var newInclude=document.createElement('script');newInclude.setAttribute('src','/aspinclude/vismoweb5/html/voliviewer.js');nBody.appendChild(newInclude);}}
function initCSSFile_Light(){try{if(areCSSFilesLoaded)return;}catch(err){}
areCSSFilesLoaded_Light=true;var cssFileName="";var cssFilesInitTimer=setInterval(function(){if(document.getElementsByTagName("body").length>0){try{if(document.getElementsByTagName("head")[0].innerHTML.indexOf("/aspinclude/vismoweb5/html/n_")>-1){cssFileName="n_voliviewer.css";}
else{cssFileName="voliviewer.css";}
var newCSSLink=document.createElement("link");newCSSLink.type="text/css";newCSSLink.rel="stylesheet";newCSSLink.href="/aspinclude/vismoWeb5/html/"+cssFileName;newCSSLink.media="screen";document.getElementsByTagName("head")[0].appendChild(newCSSLink);}
catch(err){clearInterval(cssFilesInitTimer);}
clearInterval(cssFilesInitTimer);}},50);}
function cacheImages_Light(){if(!images_Light)return;var params=null;var id_obce=0;var id_galerie=0;var imagesIDs="";imagesObj_Light=null;imagesObj_Light=new Array();for(var i=0;i<images_Light.length;i++){imagesObj_Light[i]=new Image();imagesObj_Light[i].src="";try{if(images_Light[i].className.indexOf("jezvetsenina")>=0&&images_Light[i].getAttribute("url").indexOf("id_obrazky=")>0){params=parseURL_Light(images_Light[i].getAttribute("url"));try{params[0]=images_Light[i].getElementsByTagName("img")[0].getAttribute("src").split("id_org=")[1].split("&")[0];}catch(err){}
imagesObj_Light[i].src="/VismoOnline_ActionScripts/Image.aspx?id_org="+params[0]+"&id_obrazky="+params[3];}
else if(images_Light[i].className.indexOf("jezvetsenina")>=0&&images_Light[i].getAttribute("url").indexOf("id_fotopary=")>0&&images_Light[i].getAttribute("url").indexOf("id_obrazky=")<0){params=parseURL_Light(images_Light[i].getAttribute("url"));try{params[0]=images_Light[i].getElementsByTagName("img")[0].getAttribute("src").split("id_org=")[1].split("&")[0];}catch(err){}
id_obce=params[0];id_galerie=parseURL_Light(window.location.href)[2];imagesIDs+=params[1]+",";imagesObj_Light[i].src="toChange";var tempImgSrc="/VismoOnline_ActionScripts/Image.aspx?id_org="+params[0]+"&id_obrazky="+createRequest_Light(1,params[0],params[1]);imagesObj_Light[i].src=tempImgSrc.substring(0,tempImgSrc.length-1);}
else if(images_Light[i].className.indexOf("jezvetsenina")>=0&&images_Light[i].getAttribute("url").indexOf("id_obrazky=")<0){imagesObj_Light[i].src=images_Light[i].getAttribute("url");}
toolsImg_centerImage_yes.src=PATH_TO_VOLIVIEWER_IMAGES+"arrows_centerImage_yes.gif";toolsImg_centerImage_no.src=PATH_TO_VOLIVIEWER_IMAGES+"arrows_centerImage_no.gif";toolsImg_fitImageToPage_increase.src=PATH_TO_VOLIVIEWER_IMAGES+"button_original_size.gif";toolsImg_fitImageToPage_decrease.src=PATH_TO_VOLIVIEWER_IMAGES+"button_smaller_size.gif";}catch(e){}}}
function getImageInfo_Light(objLink){clearInterval(timer1_Light);if(!areImagesPrepared_Light){prepareImages_Light(0);return;}
if(!isViewerOpened)createEventListeners_Light();if(!isSetScrollPos_Light){oldScrollPosX_Light=document.body.scrollLeft;oldScrollPosY_Light=document.body.scrollTop;isSetScrollPos_Light=true;}
try{actualObjectID_Light=objLink.substring(1);isViewerStarting=true;var params=parseURL_Light(document.getElementById(objLink).getAttribute("url"));try{params[0]=document.getElementById(objLink).getElementsByTagName("img")[0].getAttribute("src").split("id_org=")[1].split("&")[0];}catch(err){}
imgL_Light.src=imagesObj_Light[actualObjectID_Light].src;var imgLWidth=imgL_Light.width;var imgLHeight=imgL_Light.height;timer5_Light=setTimeout(function(){showImage_Light(objLink);},ANIMATION_TIME+50);}catch(e){}}
function parseURL_Light(urlToParse){var arrayPos=0;parsedData_help=urlToParse.split("#");parsedData_help=parsedData_help[0].split("&");var parsedData=parsedData_help;for(var i=0;i<parsedData_help.length;i++){if(parsedData_help[i]==undefined){continue;}
if(parsedData_help[i].indexOf("id_org")>-1){parsedData[0]=parsedData_help[i].split("=")[1];}
else if(parsedData_help[i].indexOf("id_fotopary")>-1){parsedData[1]=parsedData_help[i].split("=")[1];}
else if(parsedData_help[i].indexOf("id_galerie")>-1){parsedData[2]=parsedData_help[i].split("=")[1];}
else if(parsedData_help[i].indexOf("id_obrazky")>-1){parsedData[3]=parsedData_help[i].split("=")[1];}}
return parsedData;}
function areImgsLoaded_Light(){var areImagesLoaded_help=true;for(var i=0;i<imagesObj_Light.length;i++){if(images_Light[i].getAttribute("href")!="javascript:void(0);"){areImagesLoaded_help=false;break;}}
areImagesLoaded_Light=areImagesLoaded_help;}
function showImage_Light(objLink){if(imgL_Light.width==0&&imgL_Light.height==0){setTimeout(function(){showImage_Light(objLink)},1);return;}
clearTimeout(timer5_Light);clearInterval(timer4_moveImgToDefPos_Light);if(!areImagesLoaded_Light)areImgsLoaded_Light();document.body.scrollLeft=0;document.body.scrollTop=0;window.document.body.style.overflow="hidden";var MAX_OPACITY=80;var MAX_OPACITY_INFOPANEL=80;try{var isIE=(navigator.userAgent.indexOf("MSIE ")>-1);var isFF=(navigator.userAgent.indexOf("Firefox/")>-1);var isSAF=(navigator.userAgent.indexOf("Safari/")>-1);screenWidth=window.innerWidth;screenHeight=window.innerHeight;browserWidth=document.body.clientWidth;browserHeight=isSAF?window.innerHeight:document.body.clientHeight;var imgPanel=null;if(document.getElementById("imgPanel")==null){imgBgPanel=document.createElement("div");imgPanel=document.createElement("div");navigationPanel=document.createElement("div");infoPanel=document.createElement("div");floatInfoPanel=document.createElement("div");document.getElementsByTagName("body")[0].appendChild(imgBgPanel);document.getElementsByTagName("body")[0].appendChild(imgPanel);document.getElementsByTagName("body")[0].appendChild(navigationPanel);document.getElementsByTagName("body")[0].appendChild(infoPanel);document.getElementsByTagName("body")[0].appendChild(floatInfoPanel);imgBgPanel.id="imgBgPanel";imgBgPanel.style.left=document.body.scrollLeft;imgBgPanel.style.top=document.body.scrollTop;imgBgPanel.style.MozOpacity=MAX_OPACITY/100;imgBgPanel.style.opacity=MAX_OPACITY/100;imgBgPanel.style.filter="alpha(opacity="+MAX_OPACITY+")";imgBgPanel.onclick=function(e){closeImgPanel_Light();}
imgPanel.id="imgPanel";imgPanel.ondblclick=function(e){closeImgPanel_Light();}
prepareImageForMoving(imgPanel);navigationPanel.id="navigationPanel";navigationPanel.style.fontWeight="bold";infoPanel.id="infoPanel";infoPanel.innerHTML="<span class='voliviewer-info' id='voliviewer-info'>"+document.getElementById("L"+actualObjectID_Light).getElementsByTagName("img")[0].alt.toString()+"<\/span>";infoPanel.innerHTML+="<div style='sf'><!-- --><\/div>";var collectedCode="<div id='voliviewer-buttons-light'>";if(isImageMovingHorizontal||isImageMovingVertical){collectedCode+="&nbsp;&nbsp;&nbsp;<a href='javascript:void(0)' onclick='centerImage_Light();' id='centerImage' onmouseover='floatInfoPanelText=\""+navigationButtons[9]+"\";'><img src='"+toolsImg_centerImage_no.src+"' width='15' height='15' alt='"+navigationButtons[9]+"'><\/a>";collectedCode+="&nbsp;&nbsp;&nbsp;<a href='javascript:void(0)' onclick='fitImageToPage_Light();' id='fitImageToPage' onmouseover='floatInfoPanelText=\""+navigationButtons[6]+"\";'><img src='"+toolsImg_fitImageToPage_decrease.src+"' alt='"+navigationButtons[6]+"'><\/a>";}
collectedCode+="&nbsp;&nbsp;&nbsp;<a href='javascript:void(0)' onclick='closeImgPanel_Light();' id='buttonClose' onmouseover='floatInfoPanelText=\""+navigationButtons[4]+"\";'><img src='"+PATH_TO_VOLIVIEWER_IMAGES+"button_close.gif' alt='"+navigationButtons[4]+"' onmouseover='removeAttributeFromElement_Light(this,\"alt\",true);' onmouseout='setAttributeToElementFromBackup_Light(this,\"alt\",true)'><\/a>";collectedCode+="<\/div>";infoPanel.innerHTML+=collectedCode;var controlButtons=["centerImage","fitImageToPage","buttonClose"];for(var j=0;j<controlButtons.length;j++){if(document.getElementById(controlButtons[j])){document.getElementById(controlButtons[j]).onmousemove=function(e){setFloatInfoPanel_Light(e,document.getElementById("floatInfoPanel"));}
document.getElementById(controlButtons[j]).onmouseout=function(e){document.getElementById("floatInfoPanel").style.display="none";}}}
floatInfoPanel.id="floatInfoPanel";floatInfoPanel.style.position="absolute";floatInfoPanel.style.display="none";floatInfoPanel.style.zIndex=200;floatInfoPanel.className="voliviewer-floatInfoPanel";}
else{imgBgPanel=document.getElementById("imgBgPanel");navigationPanel=document.getElementById("navigationPanel");infoPanel=document.getElementById("infoPanel");imgPanel=document.getElementById("imgPanel");}
imgBgPanel.style.width=browserWidth;imgBgPanel.style.height=browserHeight;imgPanel.style.width=parseInt(imgL_Light.width)<MIN_IMGPANEL_WIDTH?MIN_IMGPANEL_WIDTH:imgL_Light.width;imgPanel.style.height=parseInt(imgL_Light.height)<MIN_IMGPANEL_HEIGHT?MIN_IMGPANEL_HEIGHT:imgL_Light.height;imgPanel.style.left=(browserWidth-parseInt(imgPanel.style.width))/2;imgPanel.style.top=document.body.scrollTop+(browserHeight-parseInt(imgPanel.style.height))/2;imgPanel.innerHTML="<img src='"+imgL_Light.src+"' alt='"+document.getElementById("L"+actualObjectID_Light).getElementsByTagName("img")[0].alt.toString()+"'>";imgPanel.onmousedown=function(e){isImageMoving=true;return false;}
imgPanel.onmouseup=function(e){isImageMoving=false;setObjectDefaultValues(imgPanel);return false;}
imgPanel.onmousemove=function(e){if(!isImageMoving)return;moveWithObject(e,imgPanel);}
if(!(isImageMovingHorizontal||isImageMovingVertical)){navigationPanel.style.width=parseInt(imgPanel.style.width)+(20*2);navigationPanel.style.height=parseInt(imgPanel.style.height)+20;navigationPanel.style.left=((browserWidth-parseInt(imgPanel.style.width))/2)-20;navigationPanel.style.top=(document.body.scrollTop+(browserHeight-parseInt(imgPanel.style.height))/2)-20;}
if(isState_fitImageToPage)fitImageToPage_Light();if(isImageMovingVertical||isImageMovingHorizontal){infoPanel.style.width=browserWidth;infoPanel.style.left="0px";infoPanel.style.top=browserHeight-infoPanel.offsetHeight;infoPanel.style.MozOpacity=MAX_OPACITY/100;infoPanel.style.opacity=MAX_OPACITY/100;infoPanel.style.filter="alpha(opacity="+MAX_OPACITY+")";}
else{infoPanel.style.width=browserWidth;infoPanel.style.left="0px";infoPanel.style.top=browserHeight-infoPanel.offsetHeight;}
if(!(isImageMovingHorizontal||isImageMovingVertical))imgPanel.onclick=function(e){closeImgPanel_Light();}
document.getElementById("voliviewer-info").innerHTML=document.getElementById("L"+actualObjectID_Light).getElementsByTagName("img")[0].alt.toString();window.onscroll=function(){if(isViewerStarting){document.body.scrollTop=0;}}
window.onresize=function(){if(isViewerOpened){if(isState_fitImageToPage)fitImageToPage_Light();showImage_Light(null);}}
defImgPosX=imgPanel.style.left;defImgPosY=imgPanel.style.top;if(IS_IMG_MOVE_TO_DEF_POS_Light){timer4_moveImgToDefPos_Light=setInterval(function(){moveImgToDefPos(imgPanel,defImgPosX,defImgPosY);},100);}
if(IS_OVER_IMAGE_LAYOUT)showOverImageLayout_Light(imgPanel);else isViewerOpened=true;if(isImageMovingHorizontal||isImageMovingVertical)fitImageToPage_Light();}
catch(e){}}
function showOverImageLayout_Light(imgPanel){try{var overImgLayout=document.createElement("div");overImgLayout.id="overImgLayout";overImgLayout.style.width=imgPanel.style.width;overImgLayout.style.height=imgPanel.style.height;overImgLayout.style.left=imgPanel.style.left;overImgLayout.style.top=imgPanel.style.top;overImgLayout.style.MozOpacity=1;overImgLayout.style.opacity=1;overImgLayout.style.filter="alpha(opacity=100)";opacityValue=DEFAULT_OPACITY_VALUE;document.getElementsByTagName("body")[0].appendChild(overImgLayout);oldImgPosX_step=0;timer1_Light=setInterval(function(){changeImgOverLayoutTransparency_Light();},ANIMATION_TIME);}
catch(e){}}
function changeImgOverLayoutTransparency_Light(){try{var overImgLayout=document.getElementById("overImgLayout");if(overImgLayout){if(document.getElementById("overImgLayout").style.MozOpacity<=0||document.getElementById("overImgLayout").style.opacity<=0||opacityValue<=0){oldImgSrc=imgL_Light.src;isViewerOpened=true;window.document.getElementsByTagName("body")[0].removeChild(document.getElementById("overImgLayout"));window.document.getElementsByTagName("body")[0].removeChild(document.getElementById("oldImg"));clearInterval(timer1_Light);return;}}
if(document.getElementById("overImgLayout")){document.getElementById("overImgLayout").style.MozOpacity-=MAX_OPACITY_OVERIMGLAYOUT/100;document.getElementById("overImgLayout").style.opacity-=MAX_OPACITY_OVERIMGLAYOUT/100;opacityValue-=MAX_OPACITY_OVERIMGLAYOUT;document.getElementById("overImgLayout").style.filter="alpha(opacity:"+opacityValue+")";}}
catch(e){}}
function setFloatInfoPanel_Light(e,obj){var posX=0;var posY=0;if(e){posX=e.clientX;posY=e.clientY;}
else if(event){posX=event.x;posY=event.y;}
obj.innerHTML=floatInfoPanelText;obj.style.display="block";obj.style.top=posY-20;obj.style.left=posX-document.getElementById("floatInfoPanel").offsetWidth-10;}
function closeImgPanel_Light(){clearInterval(timer1_Light);clearInterval(timer2_Light);clearInterval(timer3_Light);clearInterval(timer4_moveImgToDefPos_Light);isViewerOpened=false;isViewerStarting=false;isSetScrollPos_Light=false;isMoveImgToDefPos=false;isState_fitImageToPage=false;document.body.scrollLeft=oldScrollPosX_Light;document.body.scrollTop=oldScrollPosY_Light;removeEventListeners_Light();isImageMoving=false;isImageMovingHorizontal=false;isImageMovingVertical=false;document.body.style.cursor="default";window.document.body.style.overflow="auto";var obj=document.getElementById("imgPanel");if(obj){var imgElm=obj.getElementsByTagName("img")[0];imgElm_defWidth=0;imgElm_defHeight=0;}
var objectsToRemove=["navigationPanel","infoPanel","imgPanel","overImgLayout","oldImg","floatInfoPanel"];for(var i=0;i<objectsToRemove.length;i++){if(document.getElementById(objectsToRemove[i])!=null){window.document.getElementsByTagName("body")[0].removeChild(document.getElementById(objectsToRemove[i]));}}
timer6_Light=setTimeout(function(){if(document.getElementById("imgBgPanel")!=null)window.document.getElementsByTagName("body")[0].removeChild(document.getElementById("imgBgPanel"));clearTimeout(timer6_Light);},300);}
function keyPressed_handler_Light(e){if(isViewerOpened){try{var charCode=e.keyCode?e.keyCode:e.which;switch(charCode){case 27:closeImgPanel_Light();break;}}
catch(e){}}}
function createEventListeners_Light(){if(window.addEventListener){window.document.addEventListener("keyup",keyPressed_handler_Light,false);}
if(window.attachEvent){window.document.attachEvent("onkeyup",keyPressed_handler_Light);}}
function removeEventListeners_Light(){if(window.addEventListener){window.document.removeEventListener("keyup",keyPressed_handler_Light,false);}
else if(window.attachEvent){window.document.detachEvent("onkeyup",keyPressed_handler_Light);}
window.onkeyup=null;}
function createRequestObject_Light(){if(window.XMLHttpRequest){request=new XMLHttpRequest();}
else if(window.ActiveXObject){try{request=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e){try{request=new ActiveXObject("Microsoft.XMLHTTP");}
catch(e){xmlhttp=false;}}}}
function createRequest_Light(queryIndex,id_obce,id_fotopary,id_galerie){var result=null;try{request.open("POST","/VismoOnline_ActionScripts/voliviewer.asp",connAsynchronous);request.setRequestHeader('Content-type','application/x-www-form-urlencoded');request.send("queryIndex="+queryIndex+"&id_obce="+id_obce+"&id_fotopary="+id_fotopary+"&id_galerie="+id_galerie);result=request.responseText;}
catch(e){}
return result;}
function moveWithObject(e,objToMove){var curPos_help={x:0,y:0};if(e==null)e=window.event;if(e.button==0||e.button==1){if(curPos.x!=-1&&curPos.y!=-1){curPos_help.x=e.clientX;curPos_help.y=e.clientY;if(curPos_help.x>curPos.x)curPos_help.x-=curPos.x;else curPos_help.x=-(curPos.x-curPos_help.x);if(curPos_help.y>curPos.y)curPos_help.y-=curPos.y;else curPos_help.y=-(curPos.y-curPos_help.y);}
curPos.x=e.clientX;curPos.y=e.clientY;if(isImageMovingHorizontal&&parseInt(objToMove.style.left)+curPos_help.x<20&&parseInt(objToMove.style.left)+curPos_help.x+imgL_Light.width>browserWidth-20){objToMove.style.left=parseInt(objToMove.style.left)+curPos_help.x;}
if(isImageMovingVertical&&parseInt(objToMove.style.top)+curPos_help.y<20&&parseInt(objToMove.style.top)+curPos_help.y+imgL_Light.height>browserHeight-20){objToMove.style.top=parseInt(objToMove.style.top)+curPos_help.y;}
objToMove.onselectstart=function(){return false;};objToMove.ondragstart=function(){return false;};}}
function setObjectDefaultValues(objToMove){curPos.x=-1;curPos.y=-1;}
function prepareImageForMoving(objToMove){if(imgL_Light.width>browserWidth)isImageMovingHorizontal=true;if(imgL_Light.height>browserHeight)isImageMovingVertical=true;if(isImageMovingHorizontal||isImageMovingVertical){objToMove.style.cursor="move";}}
function moveImgToDefPos(objToMove,posX,posY){var IMG_TO_DEFAULT_POS_MAXSTEP=2;if(!isMoveImgToDefPos)return;if(!isImageMoving&&(isImageMovingHorizontal||isImageMovingVertical)){if(parseInt(objToMove.style.left)>=parseInt(posX)-IMG_TO_DEFAULT_POS_MAXSTEP&&parseInt(objToMove.style.left)<=parseInt(posX)+IMG_TO_DEFAULT_POS_MAXSTEP){objToMove.style.left=posX;}
else if(parseInt(objToMove.style.left)<parseInt(posX)){objToMove.style.left=parseInt(objToMove.style.left)+IMG_TO_DEFAULT_POS_MAXSTEP;}
else if(parseInt(objToMove.style.left)>parseInt(posX)){objToMove.style.left=parseInt(objToMove.style.left)-IMG_TO_DEFAULT_POS_MAXSTEP;}
if(parseInt(objToMove.style.top)>=parseInt(posY)-IMG_TO_DEFAULT_POS_MAXSTEP&&parseInt(objToMove.style.top)<=parseInt(posY)+IMG_TO_DEFAULT_POS_MAXSTEP){objToMove.style.top=posY;}
else if(parseInt(objToMove.style.top)<=parseInt(posY)){objToMove.style.top=parseInt(objToMove.style.top)+IMG_TO_DEFAULT_POS_MAXSTEP;}
else if(parseInt(objToMove.style.top)>parseInt(posY)){objToMove.style.top=parseInt(objToMove.style.top)-IMG_TO_DEFAULT_POS_MAXSTEP;}}}
function fitImageToPage_Light(){var obj=document.getElementById("imgPanel");var imgElm=obj.getElementsByTagName("img")[0];if(isImageMovingHorizontal||isImageMovingVertical){if(parseInt(imgElm.width)-parseInt(browserWidth)>parseInt(imgElm.height)-parseInt(browserHeight)){imgElm_defWidth=imgElm.width;imgElm.style.width=browserWidth;obj.style.left=defImgPosX;obj.style.top=(browserHeight-imgElm.height)/2;}
else{imgElm_defHeight=imgElm.height;imgElm.style.height=browserHeight-document.getElementById("infoPanel").offsetHeight;obj.style.left=defImgPosX;obj.style.top=0;}
isState_fitImageToPage=true;isImageMovingHorizontal=false;isImageMovingVertical=false;obj.style.cursor="default";document.getElementById("fitImageToPage").getElementsByTagName("img")[0].src=toolsImg_fitImageToPage_increase.src;document.getElementById("fitImageToPage").onmouseover=function(){floatInfoPanelText=navigationButtons[7];};document.getElementById("floatInfoPanel").innerHTML=navigationButtons[7];}
else{if(imgElm_defWidth>0)imgElm.style.width=imgElm_defWidth;else imgElm.style.height=imgElm_defHeight;imgElm_defWidth=0;imgElm_defHeight=0;obj.style.left=defImgPosX;obj.style.top=defImgPosY;prepareImageForMoving(obj);isState_fitImageToPage=false;document.getElementById("fitImageToPage").getElementsByTagName("img")[0].src=toolsImg_fitImageToPage_decrease.src;document.getElementById("fitImageToPage").onmouseover=function(){floatInfoPanelText=navigationButtons[6];};document.getElementById("floatInfoPanel").innerHTML=navigationButtons[6];}}
function centerImage_Light(){isMoveImgToDefPos=!isMoveImgToDefPos;if(isMoveImgToDefPos){document.getElementById("centerImage").getElementsByTagName("img")[0].src=toolsImg_centerImage_yes.src;document.getElementById("centerImage").onmouseover=function(){floatInfoPanelText=navigationButtons[8]};document.getElementById("floatInfoPanel").innerHTML=navigationButtons[8];}
else{document.getElementById("centerImage").getElementsByTagName("img")[0].src=toolsImg_centerImage_no.src;document.getElementById("centerImage").onmouseover=function(){floatInfoPanelText=navigationButtons[9]};document.getElementById("floatInfoPanel").innerHTML=navigationButtons[9];}}
function removeAttributeFromElement_Light(actObj,attributeName,isClearTitle){eval("actObj."+attributeName+"_backup=actObj.getAttribute(attributeName)");actObj.setAttribute(attributeName,"");if(isClearTitle)actObj.setAttribute("title","");actObj.removeAttribute(attributeName);}
function setAttributeToElementFromBackup_Light(actObj,attributeName,isRemoveTitle){eval("actObj.setAttribute(attributeName,actObj."+attributeName+"_backup)");if(isRemoveTitle&&actObj.getAttribute("title")!=undefined)actObj.removeAttribute("title");}
