function _fs_visible(A){$(A).style.visibility="visible"}function _fs_notvisible(A){$(A).style.visibility="hidden"}function _fs_select(A){$(A).selected=true;$(A).onclick()}function _fs_ffUser(){_fs_visible("fetchFromUser");$("fetchFromUser").focus()}function _fs_saveSlideshowHandler(A){if(A.isException){alert(A);$("btnSave").style.visibility="visible";return }looopId=A.looopID;looop=il.getLooop(looopId);document.location=contextPath+"/slideshow/"+looopId+"/setuplooop.htm"}function _fs_saveSlideshow(){try{var E=$("fetchFrom");var C=$(E.options[E.selectedIndex].id);var B=$("fetchAmount");var K=$(B.options[B.selectedIndex].id);var D;var F=0;var A=$("fetchFromParam").value.strip?$("fetchFromParam").value.strip():$("fetchFromParam").value;switch(E.selectedIndex){case 0:if(!A){throw (fetchUrlErrorMsg)}break;case 1:if(!A){throw (fetchSetErrorMsg)}break;case 2:if(!A){throw (fetchUserErrorMsg)}break;case 3:if(!A){throw (fetchGroupErrorMsg)}break;case 4:if(!A){throw (fetchUserErrorMsg)}break;case 5:if(!A){throw (fetchUserErrorMsg)
}break;case 6:break}for(var H=document.forms.flickrimport.tags.length-1;H>=0;H--){if(document.forms.flickrimport.tags[H].checked){D=$(document.forms.flickrimport.tags[H]);break}}var J="extUpdateNow=true&extAttributes=fetchFrom&extAttributes="+C.value+"&extAttributes=fetchFromParam&extAttributes="+encodeURIComponent($("fetchFromParam").value)+"&extAttributes=fetchWithTags&extAttributes="+encodeURIComponent($("fetchWithTags").value)+"&extAttributes=fetchWithTagsMode&extAttributes="+D.value+"&extAttributes=fetchMax&extAttributes="+K.value+"&extAttributes=immediateFetch&extAttributes=true";try{if(_fs_looopId){il.rpcCall("imagelooop.updateExternalSourceLooop","looopId="+_fs_looopId+"&"+J,_fs_saveSlideshowHandler)}}catch(G){il.rpcCall("imagelooop.makeExternalSourceLooop","verify=true&extType=flickrSearch&"+J,_fs_saveSlideshowHandler)}}catch(I){throw (I)}return false}function _fs_showAdvancedOpts(){$("imageloopr-showAdvancedOpts").style.display="none";$("advancedOpts").style.display="block";$("imageloopr-select").style.display="block";
$("fetchFromParam").focus();return true}function _fs_fromChange(){var D=$("fetchFrom");var B=$(D.options[D.selectedIndex].id);var F=$("containerFromParam");for(var G=0;G<10;G++){var C=$("fromDescription_"+G);if(C!=null){C.style.display=(G==D.selectedIndex)?"block":"none"}}if("true"==B.getAttribute("xwithparam")){if(F.style.display=="none"){F.style.display="block"}var A=F.getElementsByTagName("span");for(foo=A.length-1;foo>=0;foo--){if(A[foo].id&&A[foo].id.indexOf(B.index)>-1){A[foo].style.display="inline"}else{A[foo].style.display="none"}}$("fetchFromParam").focus()}else{if(F.style.display!="none"){F.style.display="none"}}if("true"==B.getAttribute("xwithtags")){$("containerTags").style.visibility="visible"}else{$("containerTags").style.visibility="hidden"}var E=$("fetchAmount");if(B.getAttribute("xsize")!=null){$("uiFetchSize").style.display="none";E.selctedIndex=0}else{$("uiFetchSize").style.display="block"}};