window.addEvent("domready",function(){tips=new Tips(".tips");$$(".map").addEvent("click",function(A){loadGMap(460,300,9,points)});$$(".price TR.active").addEvent("mouseenter",function(A){this.toggleClass("enter")});$$(".price TR.active").addEvent("mouseleave",function(A){this.toggleClass("enter")});if($("calc")){$("calc").removeClass("none");$("calc").addEvent("submit",function(G){G.stop();var I=$("price_package").get("value");var A=$("price_shop").get("value");var C=$("price_seconds_count").get("value");var F=$("price_shop_count").get("value");var B=$("price_days_count").get("value");var D="";if(I==0){D=lng.error_price_package}else{if(A==0){D=lng.error_price_shop}else{if(C==""){D=lng.error_price_seconds_count}else{if(!C.test(/^\d+$/)){D=lng.error_price_seconds_correct}else{if(F==""){D=lng.error_price_shops_count}else{if(!F.test(/^\d+$/)){D=lng.error_price_shops_correct}else{if(B==""){D=lng.error_price_days_count}else{if(!B.test(/^\d+$/)){D=lng.error_price_days_correct}}}}}}}}if(D!=""){msg(D,"error")}else{var E=parseFloat($("price-"+I+"-"+A).get("text").replace(",","."));var H=((C*6/60)*(E)*15*F*B).toFixed(2);H=H.replace(".",",");$("total").set("text",H);$("total").getParent(".total").removeClass("none")}})}if($("filter")){$("filter").removeClass("none");$("filter").addEvent("submit",function(D){D.stop();var C;$$("#district_id OPTION").each(function(E){if(E.selected){C=E.get("text")}});var B;$$("#region_id OPTION").each(function(E){if(E.selected){B=E.get("text")}});$$(".price TBODY TR").each(function(E){E.removeClass("none")});var A=0;$$(".price TBODY TR").each(function(F){var E=false;if(C!=lng.l_none&&C!=F.getChildren(".district").get("text")){E=true}if(B!=lng.l_none&&B!=F.getChildren(".region").get("text")){E=true}if(E){F.addClass("none")}else{A+=parseInt(F.getChildren(".screens").get("text"))}});$("sum-screens").set("text",A)})}});function resultData(B,A){if(A!=null){loader(false);switch(B){case"gmap":break;default:alert("Такого ajax-действия не существует.")}}else{alert("Ajax-запрос вернул пустой результат.")}};