var Ajax;if(Ajax&&(Ajax!=null)){Ajax.Responders.register({onCreate:function(){if($("spinner")&&Ajax.activeRequestCount>0){Effect.Appear("spinner",{duration:0.5,queue:"end"})}},onComplete:function(){if($("spinner")&&Ajax.activeRequestCount==0){Effect.Fade("spinner",{duration:0.5,queue:"end"})}}})}var loadingStack=0;function loading(B){var A=$("loading");if(B){loadingStack++;A.style.display="block"}else{if(--loadingStack<=0){A.style.display="none"}}}function updateFormRemote(E,A,D,C){var B=Form.serialize(document.forms[E]);if(C!=undefined){B+="&"+Object.toQueryString(C)}new Ajax.Updater(A,D,{asynchronous:true,evalScripts:true,on404:function(F){alert("Sorry. Cannot connect to service.")},onLoaded:function(F){loading(false)},onLoading:function(F){loading(true)},parameters:B,onComplete:function(F){mapUpdater.parseForOverlays(true,true)}})}function updateEventSearchFormular(A){updateFormRemote("event_search","event_result_list","/events/list",A)}function updateGeneraltypeSearchFormular(B,A){updateFormRemote("generaltype_search","category_body","/generaltype/get_category_body",B)}var bodyOnloadFunctions=new Array();function bodyOnload(A){bodyOnloadFunctions.push(A)}function callBodyOnload(B){for(var A=0;A<bodyOnloadFunctions.length;A++){bodyOnloadFunctions[A].call(B)}}function openWindow(A){var B=window.open(A,"Popup","width=500,height=400,status=yes,scrollbars=yes,resizable=yes");B.focus()}function openWindow(B,C,A){var D=window.open(B,"Popup","width="+C+",height="+A+",status=yes,scrollbars=yes,resizable=yes");D.focus()}function toggleSearchForms(){if($("place_selector").checked){$("type_form").style.display="none";$("place_form").style.display="block"}else{$("place_form").style.display="none";$("type_form").style.display="block"}}var Defaulter=Class.create({initialize:function(A,C){var B=$(A);if(B==undefined){return }B.style.color="#888";B.value=C;B.onfocus=function(){if(B.value==C){B.style.color="#000";B.value=""}};B.onblur=function(){if(B.value==""){B.style.color="#888";B.value=C}}}});function observeMarker(){var B=$$(".marker");var A=$$(".remove_marker");B.each(function(C,D){C.observe("mouseout",function(){A[D].toggle()});C.observe("mouseover",function(){A[D].toggle()})})}function loadImage(A,B){if(!B.contains("/images/1px.png")){$(A).src=B}};