blankPNG=new Image();blankPNG.src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/pixels/t_pixel.gif";function loadPNG(A){if(navigator.appName=="Microsoft Internet Explorer"){A.onload="";A.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+A.getAttribute("src")+'", sizingMethod="noscale")';A.src=blankPNG.src}}isIE=(navigator.appName.indexOf("Microsoft")==-1)?false:true;isMozilla=(navigator.appName.indexOf("Netscape")==-1)?false:true;stopSlideScrollBarConstant=0;menuBlocksAmount=0;lastCommentsObject1="";lastCommentsObject2="";lastVacancyObject="";lastVacancyPosition="";lastGalleryObject="";lastGalleryPhoto="";lastDropDownList="";function underlineTopMenu(B){var A=B.parentNode.getElementsByTagName("img")[0];A.className=(A.className=="")?"underline":""}function changeAmount(B,A){if(document.all[B].getAttribute("value")==1&&A==-1){return }persons=Number(document.all[B].getAttribute("value"))+A;document.all[B].setAttribute("value",persons);recountCalculatorSum()}function loadMenu(D){if(isIE){var E=document.body.getElementsByTagName("div");for(var B=0,A=E.length;B<A;B++){if(E[B].className=="container_calculator_popup_1"){E[B].onmouseover=function(){this.className="container_calculator_popup_2"};E[B].onmouseout=function(){this.className="container_calculator_popup_1"}}}var C=document.body.getElementsByTagName("span");for(var B=0,A=C.length;B<A;B++){if(C[B].className=="ingredients_container_1"){C[B].onmouseover=function(){this.className="ingredients_container_2"};C[B].onmouseout=function(){this.className="ingredients_container_1"}}}}}function roloverSubmenu(D,B,A){var C=D.parentNode.parentNode.parentNode;if(C.tagName.toLowerCase()!="td"){C=C.parentNode}var E=C.getElementsByTagName("div");E[B].style.display="none";E[A].style.display=""}function getCommentsParentObject(B){var A=B.parentNode;while(A.tagName.toLowerCase()!="td"){A=A.parentNode}return A}function loadMap(C){if(isIE){var D=document.all.map_1.getElementsByTagName("div");for(var B=0,A=D.length;B<A;B++){if(D[B].className=="map_1"){D[B].onmouseover=function(){this.className+=" active_map"};D[B].onmouseout=function(){this.className="map_1"}}}}}function expandVacancy(B,A,D){var C=B.getElementsByTagName("div")[1];if(C.style.display=="none"){if(lastVacancyObject){expandVacancy(lastVacancyObject,lastVacancyPosition,D)}C.style.display="";document.all.vacancy_popup.style.top=47*A-47;document.all.vacancy_popup.style.display="";document.all.vacancy_id.value=D;lastVacancyObject=B;lastVacancyPosition=A}else{C.style.display="none";document.all.vacancy_popup.style.display="none";lastVacancyObject=""}}function showMapAddress(B,A){if(A=="show"){document.all["map_address_"+B].className+=" active_map"}else{document.all["map_address_"+B].className="map_1"}}function loadGallery(A){if(A.className=="gallery_list_1"){if(lastGalleryObject){loadGallery(lastGalleryObject)}A.className+=" gallery_list_1_active";lastGalleryObject=A}else{A.className="gallery_list_1";lastGalleryObject=""}}function loadPhotos(C){if(isIE){var D=document.all.photos_container.getElementsByTagName("img");for(var B=0,A=D.length;B<A;B++){D[B].onmouseover=function(){this.parentNode.className+=" photo_1_active"};D[B].onmouseout=function(){this.parentNode.className=this.parentNode.className.replace(" photo_1_active","")}}}}function highlightArrow(B,A){var C=B.getElementsByTagName("img");if(A=="over"){C[0].style.display="none";C[1].style.display=""}else{C[0].style.display="";C[1].style.display="none"}}function showPhoto(A,B){if(lastGalleryPhoto){lastGalleryPhoto.className="photo_1"}A.className+=" photo_1_clicked";document.all.gallery_photo_container.getElementsByTagName("td")[0].innerHTML='<img src="'+A.getAttribute("photo_id")+'"><br>';document.all.gallery_photo_container.style.height=document.all.gallery_photo_container.getElementsByTagName("td")[0].getElementsByTagName("img")[0].height;lastGalleryPhoto=A;if(lastGalleryPhoto.getAttribute("id")==startphoto){document.getElementById("right_slider").style.display="block";document.getElementById("left_slider").style.display="none"}else{if(lastGalleryPhoto.getAttribute("id")==endphoto-1){document.getElementById("left_slider").style.display="block";document.getElementById("right_slider").style.display="none"}else{document.getElementById("left_slider").style.display="block";document.getElementById("right_slider").style.display="block"}}}function showPhotoInvite(A){if(lastGalleryPhoto){lastGalleryPhoto.className="photo_1"}A.className+=" photo_1_clicked";document.all.gallery_photo_container.innerHTML='<img src="'+A.getAttribute("photo_id")+'"><br>';document.all.invite_image.value=A.getAttribute("photo_id");setCookie("image",A.getAttribute("photo_id"));lastGalleryPhoto=A}function setCookie(A,B){document.cookie=A+"="+B}function setCookieExpires(B,C,A){document.cookie=B+"="+C+"; expires="+A}function setCookiePath(A,B){document.cookie=A+"="+B+"; path=/menu/;"}function setCookieExpiresPath(B,C,A){document.cookie=B+"="+C+"; expires="+A+"; path=/menu/;"}function getCookie(B){var D=" "+document.cookie;var C=" "+B+"=";var E=null;var F=0;var A=0;if(D.length>0){F=D.indexOf(C);if(F!=-1){F+=C.length;A=D.indexOf(";",F);if(A==-1){A=D.length}E=unescape(D.substring(F,A))}}return E}function checkInviteForm(preview){var Fields=new Array();Fields[0]="time";Fields[1]="name1";Fields[2]="name2";Fields[3]="email";Fields[4]="text";var Object=null;var FlagForm=true;for(i=0;i<Fields.length;i++){Object=eval("document.InviteForm."+Fields[i]);if(Object.value==""){showField(Fields[i]);FlagForm=false}else{if(Fields[i]=="email"){if(checkEMail(Object.value)!=true){showField(Fields[i]);FlagForm=false}}}}if(FlagForm==false){return false}else{if(preview==false){document.getElementById("InviteForm").submit()}return true}}function checkEMail(A){var B=false;reg=new RegExp("^([a-zA-Z0-9-._]+)(@)([a-zA-Z0-9-.]+)(.)([a-zA-Z]{2,4})$");B=reg.test(A);return B}function checkPhone(A){var B=false;reg=new RegExp("^[0-9-+]+$");Flag=reg.test(A);return Flag}function showField(field){var FormField=eval("document.InviteForm."+field);FormField.style.backgroundColor="#eeeeee";FormField.style.color="#000000"}function clearField(A){A.style.backgroundColor="#ffffff";A.style.color="#000000"}function slidePhoto(D){var E=document.all.photos_container.getElementsByTagName("div");if((D=="left"&&E[0].className.indexOf("photo_1_clicked")!=-1)||(D=="right"&&E[E.length-1].className.indexOf("photo_1_clicked")!=-1)){return }for(var B=0,A=E.length;B<A;B++){if(E[B].className.indexOf("photo_1_clicked")!=-1){var C=(D=="left")?E[B-1]:E[B+1];C.className+=" photo_1_clicked";document.all.gallery_photo_container.getElementsByTagName("td")[0].innerHTML='<img src="'+C.getAttribute("photo_id")+'"><br>';lastGalleryPhoto.className="photo_1";lastGalleryPhoto=C;if(lastGalleryPhoto.getAttribute("id")==startphoto){document.getElementById("left_slider").style.display="none"}else{if(lastGalleryPhoto.getAttribute("id")==endphoto-1){document.getElementById("right_slider").style.display="none"}else{document.getElementById("left_slider").style.display="block";document.getElementById("right_slider").style.display="block"}}return }}}function loadDropdown(D){var G=document.all.form_send_1.getElementsByTagName("div");for(var B=0,A=G.length;B<A;B++){if(G[B].className=="drop_down_1"){var C=G[B].getElementsByTagName("div");for(var F=0,E=C.length;F<E;F++){if(isIE){C[F].onmouseover=function(){this.className="drow_down_active"};C[F].onmouseout=function(){this.className=""}}C[F].onclick=function(){document.all[this.getAttribute("field_name")+"_id"].value=this.getAttribute("element_id");setCookie(this.getAttribute("field_name")+"_id",this.getAttribute("element_id"));document.all[this.getAttribute("field_name")+"_name"].value=this.innerHTML;document.all["form_"+this.getAttribute("field_name")].style.visibility="hidden"};if(F==0){setCookie(C[F].getAttribute("field_name")+"_id",C[F].getAttribute("element_id"))}}}}}function checkDropDownList(B){if(lastDropDownList){var A=(navigator.appName=="Microsoft Internet Explorer")?B.srcElement:B.target;while(A.tagName.toLowerCase()!="body"){if(A.getAttribute("dropdown")==lastDropDownList){return }A=A.parentNode}document.all["form_"+lastDropDownList].style.visibility="hidden"}}function showDropdownList(B,A){document.all["form_"+B].style.visibility="visible";checkDropDownList(A);lastDropDownList=B}function loadCompanySubmenu(A){document.all.company_submenu.onmouseover=function(){this.getElementsByTagName("table")[0].style.display=""};document.all.company_submenu.onmouseout=function(){this.getElementsByTagName("table")[0].style.display="none"}}function expandTestimonial(A){var B=A.parentNode.getElementsByTagName("div");if(B[2]){B[2].style.display=""}}function adjustIframDivWidth(A){var B=document.getElementById("table_menu_block_"+A).offsetWidth;document.getElementById("iframe_div_"+A).style.width=B;document.getElementById("iframe_block_"+A).style.width=B;return false}function switchMenuBlock(B,A){var E=B.getElementsByTagName("img");adjustIframDivWidth(A);if(E[0].style.display=="none"){E[1].style.display="none";E[0].style.display="";document.all["iframe_block_"+A].style.display="";B.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.cells[1].style.display="";OpenBlocks[A]=true}else{E[0].style.display="none";E[1].style.display="";document.all["iframe_block_"+A].style.display="none";B.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.cells[1].style.display="none";OpenBlocks[A]=false;closeWindow()}var D=document.getElementById("menu_right_border_"+A);if(D!=null){var C=document.getElementById("table_menu_block_"+A).offsetWidth-10;D.style.left=C}manageResize();return false}function manageResize(){if(PageID==12||PageID==13||PageID==14||PageID==15||PageID==17){resizeScrollbar(30);for(key in OpenBlocks){if(!isNaN(key)){resizeScrollbar(key)}}}adjustAllIframDivs();var J=200;var F=500;var G=1400;var B=970;var C=1260;var D=880;var H=document.body.clientWidth;if(H<C){var E=(H-D)/2}else{var E=H/100*15}if(E>=J){var A=0;var I="100%"}else{var A=-J+E;var I=document.body.scrollWidth-E-400}document.all.left_background.style.backgroundPosition=A+" 0px";document.all.right_background.style.backgroundPosition=I+" 0px";return false}function manageResizeOnLoad(){if(PageID==12||PageID==13||PageID==14||PageID==15||PageID==17){resizeScrollbar(30)}adjustAllIframDivs();var J=200;var F=500;var G=1400;var B=970;var C=1260;var D=880;var H=document.body.clientWidth;if(H<C){var E=(H-D)/2}else{var E=H/100*15}if(E>=J){var A=0;var I="100%"}else{var A=-J+E;var I=document.body.scrollWidth-E-400}rand=Math.ceil(Math.random()*3);document.all.left_background.style.backgroundImage="url(/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/backgrounds/main_left_"+rand+".jpg)";document.all.right_background.style.backgroundImage="url(/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/backgrounds/main_right_"+rand+".jpg)";document.all.left_background.style.backgroundRepeat="no-repeat";document.all.right_background.style.backgroundRepeat="no-repeat";document.all.left_background.style.backgroundPosition=A+" 0px";document.all.right_background.style.backgroundPosition=I+" 0px";return false}function adjustAllIframDivs(){var C=document.getElementsByTagName("table");for(var B=0;B<C.length;B++){if(C[B].id.indexOf("table_menu_block_")!=-1){var A=C[B].id.replace(/table_menu_block_/,"");var E=document.getElementById("table_menu_block_"+A).offsetWidth-5;document.getElementById("iframe_div_"+A).style.width=E;document.getElementById("iframe_block_"+A).style.width=E;var D=document.getElementById("menu_right_border_"+A);if(D!=null){D.style.left=E-10}}}return false}function resizeScrollbar(F){document.getElementById("iframe_"+F+"_div").parentNode.parentNode.style.display="";var C=document.getElementById("iframe_block_"+F).offsetWidth;var E=document.getElementById("iframe_block_table_"+F).offsetWidth;var A=((C-240)/E)*C-82;if(A<100){A=100}var D=document.getElementById("iframe_"+F+"_div").offsetWidth-60;if(D==0){return false}if(A<=D){document.getElementById("iframe_"+F+"_slider").style.width=A+"px";document.getElementById("iframe_"+F+"_slider").style.display="";document.getElementById("iframe_"+F+"_slider_left_area").style.width="0px";var B=(D-A-30);if(B>0){document.getElementById("iframe_"+F+"_slider_right_area").style.width=B}}else{document.getElementById("iframe_"+F+"_slider").style.width="0px";document.getElementById("iframe_"+F+"_slider").style.display="none";document.getElementById("iframe_"+F+"_slider_left_area").style.width="0px";document.getElementById("iframe_"+F+"_slider_right_area").style.width="0px";document.getElementById("iframe_"+F+"_div").parentNode.parentNode.style.display="none"}return false}var str_gDirection="";var int_gID="";var obj_gActivatedInterval=null;function fSlideScrollBar(B,A){document.onmouseup=fStopSlideScrollBar;str_gDirection=B;int_gID=A;fMoveProductDiv();obj_gActivatedInterval=window.setInterval("fMoveProductDiv()",50);return false}function fStopSlideScrollBar(){str_gDirection=null;int_gID=null;document.onmouseup=null;window.clearInterval(obj_gActivatedInterval);obj_gActivatedInterval=null;return false}function fMoveProductDiv(){if(int_gID!=""){var C="iframe_block_content_"+int_gID;var G=document.getElementById(C);var I=G.style.marginLeft;I=I.replace(/px/,"");var D=document.getElementById("iframe_block_table_"+int_gID).offsetWidth;var J=document.getElementById("iframe_block_"+int_gID).offsetWidth;var K=(D-J)*-1;if(str_gDirection=="right"){I=parseInt(I)-D*0.001}if(str_gDirection=="left"){I=parseInt(I)+D*0.001}if(I>0){I=0}if(I<K){I=K}G.style.marginLeft=I;var F=document.getElementById("iframe_"+int_gID+"_slider");var H=document.getElementById("iframe_"+int_gID+"_div");var E=parseInt(H.offsetWidth)-parseInt(F.offsetWidth)-1;var A=(I/K)*E;F.style.left=A+"px";var B=(document.getElementById("iframe_"+int_gID+"_div").offsetWidth)-F.offsetWidth;document.getElementById("iframe_"+int_gID+"_slider_left_area").style.width=(A)+"px";document.getElementById("iframe_"+int_gID+"_slider_right_area").style.width=(B-A-30)+"px"}return false}var intXPosition=null;var objElementActiveted=null;var intLeftOffset=0;var intMaxWidth=0;var intIFrameId=0;var intMaxWidthRight=0;function fgetGlobalCoord(A){var A;if(!A){window.MouseX=event.clientX;window.MouseY=event.clientY}else{window.MouseX=A.pageX;window.MouseY=A.pageY}return false}function fMouseMoveScroll(E){if(objElementActiveted==null){return false}fgetGlobalCoord(E);if(intXPosition==null){intXPosition=window.MouseX}else{var J=window.MouseX;var G=objElementActiveted.id+"_left_area";objScroll_Left_Area=document.getElementById(G);G=objElementActiveted.id+"_right_area";objScroll_Right_Area=document.getElementById(G);var A=J-intXPosition+intLeftOffset;if(A>intMaxWidth){A=intMaxWidth}if(A<0){A=0}objElementActiveted.style.left=A+"px";objScroll_Left_Area.style.width=A+"px";objScroll_Right_Area.style.width=(intMaxWidth-A)+"px";var B="iframe_block_content_"+intIFrameId;var D=document.getElementById(B);var F=D.style.marginLeft;F=F.replace(/px/,"");var C=document.getElementById("iframe_block_table_"+intIFrameId).offsetWidth;var H=document.getElementById("iframe_block_"+intIFrameId).offsetWidth;var I=(C-H)*-1;F=I*(A/intMaxWidth);if(F>0){F=0}if(F<I){F=I}D.style.marginLeft=F}return false}function fRemoveInitScrollBar(A){objElementActiveted=null;intXPosition=null;intXPosition=null;objElementActiveted=null;intLeftOffset=null;intMaxWidth=null;intIFrameId=null;document.onmousemove=null;document.onmouseup=null;return false}function fInitScrollBar(B,A){objElementActiveted=B;var C=objElementActiveted.id+"_left_area";objScroll_Left_Area=document.getElementById(C);C="iframe_"+A+"_div";objOverDiv=document.getElementById(C);intIFrameId=A;intLeftOffset=parseInt(objScroll_Left_Area.offsetWidth);intMaxWidth=parseInt(objOverDiv.offsetWidth)-parseInt(objElementActiveted.offsetWidth)-30;document.onmousemove=fMouseMoveScroll;document.onmouseup=fRemoveInitScrollBar;return false}function fMoveScrollBarByClick(A,J){var D="iframe_block_content_"+A;var H=document.getElementById(D);var K=H.style.marginLeft;K=K.replace(/px/,"");var E=document.getElementById("iframe_block_table_"+A).offsetWidth;var L=document.getElementById("iframe_block_"+A).offsetWidth;var M=(E-L)*-1;if(J=="right"){K=parseInt(K)-E*0.15}if(J=="left"){K=parseInt(K)+E*0.15}if(K>0){K=0}if(K<M){K=M}H.style.marginLeft=K;var G=document.getElementById("iframe_"+A+"_slider");var I=document.getElementById("iframe_"+A+"_div");var F=parseInt(I.offsetWidth)-parseInt(G.offsetWidth)-30;var B=(K/M)*F;G.style.left=B+"px";var C=(document.getElementById("iframe_"+A+"_div").offsetWidth)-G.offsetWidth;document.getElementById("iframe_"+A+"_slider_left_area").style.width=(B)+"px";document.getElementById("iframe_"+A+"_slider_right_area").style.width=(C-B-30)+"px";return false}function add_to_calculator_window(A,B){}function insertImage(A){A.setAttribute("src",A.getAttribute("to_load"))}function openYear(A,B){if(A.className=="archiveYearClose"){A.className="archiveYearOpen";document.getElementById(B).style.display="block"}else{A.className="archiveYearClose";document.getElementById(B).style.display="none"}}var arrayCalculator=new Array();var CalculatorInnerTXT="";var arrayCalculatorElements=new Array();var arrayCalculatorNumbers=new Array();var OpenCalculator=false;var CalculatorSum=0;function addToCalculator(A){if(notmoscow==0){str=getCookie("calculator");strNum=getCookie("calculatorNumbers");if(str!=null&&str!=""){arrayElements=str.split(",");arrayNumbers=strNum.split(",");var C=false;for(var B=0;B<arrayElements.length;B++){if(arrayElements[B]==A){C=true;nextElement=B;break}}if(C){arrayCalculatorElements=arrayElements;arrayNumbers[nextElement]=parseInt(arrayNumbers[nextElement])+1}else{nextElement=arrayElements.length;arrayElements[nextElement]=A;arrayNumbers[nextElement]=1}arrayCalculatorElements=arrayElements;arrayCalculatorNumbers=arrayNumbers;str=arrayElements.join(",");strNum=arrayNumbers.join(",");setCookie("calculator",str);setCookiePath("calculator",str);setCookie("calculatorNumbers",strNum);setCookiePath("calculatorNumbers",strNum)}else{arrayCalculatorElements[0]=A;arrayCalculatorNumbers[0]=1;str=A;strNum=1;setCookie("calculator",str);setCookiePath("calculator",str);setCookie("calculatorNumbers",strNum);setCookiePath("calculatorNumbers",strNum)}getCalculatorArray()}}function minusFromCalculator(A){str=getCookie("calculator");strNum=getCookie("calculatorNumbers");arrayElements=str.split(",");arrayNumbers=strNum.split(",");var C=false;for(var B=0;B<arrayElements.length;B++){if(arrayElements[B]==A){C=true;nextElement=B;break}}arrayCalculatorElements=arrayElements;arrayNumbers[nextElement]=parseInt(arrayNumbers[nextElement])-1;arrayCalculatorNumbers=arrayNumbers;str=arrayElements.join(",");strNum=arrayNumbers.join(",");setCookie("calculator",str);setCookiePath("calculator",str);setCookie("calculatorNumbers",strNum);setCookiePath("calculatorNumbers",strNum);getCalculatorArray()}function reloadCalculator(){if(!OpenCalculator&&arrayCalculatorElements.length){if(navigator.appName=="Microsoft Internet Explorer"){switchCalculatorVisibility();OpenCalculator=true}else{if(arrayCalculatorElements[0]!=""){switchCalculatorVisibility();OpenCalculator=true}}}else{if(OpenCalculator&&!arrayCalculatorElements.length){switchCalculatorVisibility();OpenCalculator=false}}CalculatorSum=0;CalculatorInnerTXT='<table cellpadding="0" cellspacing="0" id="iframe_block_table_30"><tr>';i=0;for(key in arrayCalculatorElements){if(!isNaN(key)){elementID=arrayCalculatorElements[key];if(elementID!=""){i++;CalculatorSum+=Number(arrayCalculator[elementID]["price"]*parseInt(arrayCalculatorNumbers[key]));CalculatorInnerTXT+='<td width="180">';CalculatorInnerTXT+='<div class="calculator_menu" style="background-image: url(\'/CommonFiles/Yaposhka/01_Products/'+arrayCalculator[elementID]["image"]+"/"+arrayCalculator[elementID]["image"]+"_Calculator.jpg')\">";CalculatorInnerTXT+='<div class="dash">';CalculatorInnerTXT+='<div class="price_1">'+(arrayCalculator[elementID]["price"])+".—</div>";CalculatorInnerTXT+='<div class="quantity">Количество: '+(parseInt(arrayCalculatorNumbers[key]))+" шт.</div>";if(parseInt(arrayCalculatorNumbers[key])==1){CalculatorInnerTXT+='<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/icons/close_1.gif" class="close_1" alt="Убрать" title="Убрать" onClick="deleteFromCalculator('+key+')">'}else{CalculatorInnerTXT+='<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/icons/minus_1.gif" class="minus_1" alt="Уменьшить" title="Уменьшить" onClick="minusFromCalculator('+elementID+')">'}CalculatorInnerTXT+='<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/icons/plus_1.gif" class="plus_1" alt="Увеличить" title="Увеличить" onClick="addToCalculator('+elementID+')">';CalculatorInnerTXT+='<div class="title">'+arrayCalculator[elementID]["name"]+"</div>";CalculatorInnerTXT+="</div>";CalculatorInnerTXT+="</div>";CalculatorInnerTXT+="</td>"}}}CalculatorInnerTXT+="</tr></table>";if(!i){CalculatorInnerTXT='<table cellpadding="0" cellspacing="0" id="iframe_block_table_30"><tr><td width="180">&nbsp;</td></tr></table>'}document.getElementById("iframe_block_content_30").innerHTML=CalculatorInnerTXT;document.getElementById("calculator").innerHTML=(CalculatorSum*document.getElementById("calculator_amount").value)+".-";manageResize()}function switchCalculatorVisibility(){if(notmoscow==0){if(arrayCalculatorElements.length){if(document.all.calculator_block.style.visibility=="hidden"){var B="visible";var A="hidden";document.all.calculator_block.style.position="relative";document.all.calculator_block.style.width="100%";OpenCalculator=true;resizeScrollbar(30)}else{var B="hidden";var A="visible";document.all.calculator_block.style.position="absolute";document.all.calculator_block.style.width="1%";OpenCalculator=false}}else{var B="hidden";var A="visible";document.all.calculator_block.style.position="absolute";document.all.calculator_block.style.width="1%";OpenCalculator=false}document.all.calculator_block.style.visibility=B;if(B=="hidden"){$("#orderButton").removeClass("orderButtonActive");$("#orderhidden").show();$("#ordervisible").hide()}else{$("#orderButton").addClass("orderButtonActive");$("#orderhidden").hide();$("#ordervisible").show()}document.all.calculator_pixel_div.style.visibility="visible"}else{return false}}function getCalculatorFromCookie(){str=getCookie("calculator");strNum=getCookie("calculatorNumbers");if(str!=null){arrayElements=str.split(",");arrayNumbers=strNum.split(",");nextElement=arrayElements.length;arrayCalculatorElements=arrayElements;arrayCalculatorNumbers=arrayNumbers}}function deleteFromCalculator(A){arrayCalculatorElements.splice(A,1);arrayCalculatorNumbers.splice(A,1);str=arrayCalculatorElements.join(",");strNum=arrayCalculatorNumbers.join(",");setCookie("calculator",str);setCookiePath("calculator",str);setCookie("calculatorNumbers",strNum);setCookiePath("calculatorNumbers",strNum);getCalculatorArray()}function recountCalculatorSum(){document.getElementById("calculator").innerHTML=CalculatorSum}function showSaveMenu(){document.getElementById("savemenu").style.display="block"}function hideSaveMenu(){document.getElementById("savemenu").style.display="none";document.getElementById("savemenu_save").style.display="block";document.getElementById("savemenu_field").style.display="block";document.getElementById("savemenu_name").style.display="block";document.getElementById("message").style.display="none"}function saveSaveMenu(){name=document.getElementById("savemenu_name").value;if(name!=""){menuID=getCookie("menu");if(menuID==null){menuID=1}else{menuID++}menu=arrayCalculatorElements.join(",");setCookieExpires("menulist["+menuID+"][name]",name,"Mon, 01-Jan-2010 00:00:00 GMT");setCookieExpires("menulist["+menuID+"][menu]",menu,"Mon, 01-Jan-2010 00:00:00 GMT");setCookieExpires("menulist["+menuID+"][sum]",CalculatorSum,"Mon, 01-Jan-2010 00:00:00 GMT");setCookieExpires("menu",menuID,"Mon, 01-Jan-2010 00:00:00 GMT");document.getElementById("savemenu_save").style.display="none";document.getElementById("savemenu_field").style.display="none";document.getElementById("savemenu_name").style.display="none";document.getElementById("message").style.display="block"}}function show_gallerylist(){str="";for(i=0;i<list.length;i++){str+=list[i]}document.getElementById("gallerylist").innerHTML=str}function show_galleries(A){show_gallerylist()}var startphoto;var endphoto;function show_photoes(A){max_photoes_page=15;if(max_photoes_page<=photoes.length){max=max_photoes_page}else{max=photoes.length}str="";startphoto=max*(A-1);endphoto=max*A;for(i=startphoto;i<endphoto;i++){if(!isNaN(photoes[i])){j=i;str+='<div id="'+i+'" class="photo_1" onclick="showPhoto(this)" photo_id="'+photoes[i]["big"]+'"><img src="'+photoes[i]["small"]+'"></div>'}}endphoto=j+1;document.getElementById("photos_container").innerHTML=str;pages=Math.ceil(photoes.length/max_photoes_page);if(pages>1){show_pages(max_photoes_page,photoes.length,A)}showPhoto(document.getElementById(startphoto))}function show_photoes_invite(A){max_photoes_page=15;if(max_photoes_page<=photoes.length){max=max_photoes_page}else{max=photoes.length}str="";startphoto=max*(A-1);endphoto=max*A;for(i=A-1;i<max*A;i++){str+='<div id="'+i+'" class="photo_1" onclick="showPhotoInvite(this)" photo_id="'+photoes[i]["big"]+'" id="'+i+'"><img src="'+photoes[i]["small"]+'"></div>'}document.getElementById("photos_container").innerHTML=str;pages=Math.ceil(photoes.length/max_photoes_page);if(pages>1){show_pages(max_photoes_page,photoes.length,A)}showPhotoInvite(document.getElementById(startphoto))}function show_pages(C,B,A){pages=Math.ceil(B/C);str='<table width="7%" cellpadding="0" cellspacing="0" class="paging_1"><tr>';for(i=0;i<pages;i++){curr=i+1;if(curr==A){str+='<td><div class="active">'+curr+"</div></td>"}else{str+='<td><div><a href="javascript:show_photoes('+curr+')" class="small_2">'+curr+"</a></div></td>"}}str+="</tr></table>";document.getElementById("photoes_pages").innerHTML=str}function AJAXInteractionBlocks(BlockID,GroupID){var req=init();var Bid=BlockID;var Gid=GroupID;var BlockArray=new Array();req.onreadystatechange=getBlock;function init(){var HttpRequest=null;try{HttpRequest=new XMLHttpRequest()}catch(e){try{HttpRequest=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){Httprequest=new ActiveXObject("Microsoft.XMLHTTP")}}return HttpRequest}function getBlock(){if(req.readyState==4||req.readyState=="complete"){Response=req.responseText;BlockArray=eval("("+Response+")");showBlock()}}function showBlock(){txt='<table cellpadding="0" cellspacing="0" id="iframe_block_table_'+Bid+'"><tr>';for(key in BlockArray){if(!isNaN(key)){rating=getRating(key);image="/CommonFiles/Yaposhka/01_Products/"+BlockArray[key]["art"]+"/"+BlockArray[key]["art"]+"_Menu.jpg";if(BlockArray[key]["novelty"]==0){novelty=""}else{novelty='<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/parts/new.png" width="54" height="54" class="new" onload="loadPNG(this)">'}if(BlockArray[key]["light"]==0){light=""}else{light='<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/parts/light.png" width="74" height="74" class="light" onload="loadPNG(this)">'}if(BlockArray[key]["weight"]==""){weight=""}else{weight="("+BlockArray[key]["weight"]+")";weight=weight.replace(" ","&nbsp;")}if(BlockArray[key]["consist"]==""){consist=""}else{consist="<li>";consist+='<span class="ingredients_container_1">';consist+='<a href="javascript:void(0)" class="gray_1">Состав</a>';consist+='<div class="container_ingredients_popup_1">';consist+='<table cellpadding="0" cellspacing="0" class="ingredients_popup">';consist+='<tr><td><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/parts/popup_1_1.png" width="220" height="7" onload="loadPNG(this)"><br></td></tr>';consist+='<tr><td class="link">'+BlockArray[key]["consist"]+"</td></tr>";consist+='<tr><td><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/parts/popup_1_3.png" width="220" height="8" onload="loadPNG(this)"><br></td></tr>';consist+="</table></div></span></li>"}txt+='<td width="226" id="card_'+key+'" >';txt+='<div class="menu_line_1">';txt+='<div class="menu_price_1">'+BlockArray[key]["price"]+".—</div>";txt+='<div class="menu_line_2">';txt+='<div class="menu_line_3">';txt+='<div class="menu_line_4">';txt+='<div class="menu_product_1" style="background: url(\''+image+"') no-repeat 100% 100%\">";if(BlockArray[key]["usefororder"]=="1"){txt+='<div class="container_calculator_popup_1">';txt+='<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/icons/to_calculator_1.gif" width="9" height="12" alt="В корзину" title="В корзину" class="add_to_calculator"   onmouseout="add_to_calculator_window(0,this);" onmouseover="add_to_calculator_window(1,this);" onclick="javascript:addToCalculator('+key+');">';txt+='<table cellpadding="0" cellspacing="0" class="add_to_calculator_popup" onmouseout="add_to_calculator_window(0,this);" onmouseover="add_to_calculator_window(1,this);">';txt+='<tr><td><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/parts/popup_1_1.png" width="149" height="7" onload="loadPNG(this)"><br></td></tr>';txt+='<tr><td class="link"><a href="javascript:addToCalculator('+key+')" class="blue_1">добавить в корзину</a><br></td></tr>';txt+='<tr><td><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/parts/popup_1_3.png" width="149" height="8" onload="loadPNG(this)"><br></td></tr>';txt+="</table></div>"}txt+='<div style="width:160px;">';if(BlockArray[key]["usefororder"]=="1"){txt+='<a href="javascript:addToCalculator('+key+')" class="black_1" title="Добавить блюдо в корзину">'+BlockArray[key]["name"]+"</a>"}else{txt+="<strong>"+BlockArray[key]["name"]+"</strong>"}txt+=' <b class="weight_1">'+weight+"</b></div>";txt+=rating;txt+='<ul class="bullets_1">';txt+=consist;txt+='<li><a href="javascript:void(0)" class="gray_1" onClick="showCommentWindow('+key+',event)">Отзывы</a>';txt+="</li></ul>";txt+="</div></div></div></div>";txt+=novelty;txt+=light;txt+="</div></td>"}}txt+="</tr></table>";document.getElementById("iframe_block_content_"+Bid).innerHTML=txt;loadMenu();resizeScrollbar(Bid)}function getRating(key){flag=true;if(getCookie("vote_"+key)==null){flag=false}rating="";rate=Number(BlockArray[key]["rating"]);rate_floor=Math.floor(rate);for(i=1;i<=rate_floor;i++){if(flag||isNaN(Gid)){rating+='<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/icons/star_1.gif" width="18" height="16" class="star_1"><!--<div class="star_one"></div>-->'}else{rating+='<a href="javascript:SetRate('+i+","+key+')"><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/icons/star_1.gif" width="18" height="16" class="star_1" id="star_'+i+"_"+key+'" onMouseOver="RateOver('+i+","+key+')" onMouseOut="RateOut('+key+')"></a>'}}for(i=rate_floor+1;i<=5;i++){if(i==Math.ceil(rate)){if(flag||isNaN(Gid)){rating+='<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/icons/star_3.gif" width="18" height="16" class="star_1">'}else{rating+='<a href="javascript:SetRate('+i+","+key+')"><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/icons/star_3.gif" width="18" height="16" class="star_1" id="star_'+i+"_"+key+'" onMouseOver="RateOver('+i+","+key+')" onMouseOut="RateOut('+key+')"></a>'}}else{if(flag||isNaN(Gid)){rating+='<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/icons/star_2.gif" width="18" height="16" class="star_1">'}else{rating+='<a href="javascript:SetRate('+i+","+key+')"><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/icons/star_2.gif" width="18" height="16" class="star_1" id="star_'+i+"_"+key+'" onMouseOver="RateOver('+i+","+key+')" onMouseOut="RateOut('+key+')"></a>'}}}return rating}this.LoadBlock=function(){URL="/?reqMode=xHTTP&reqType=Block&reqGroup="+Gid;req.open("GET",URL,true);req.send(null)}}function AJAXInteractionMy(BlockID,GroupID){var req=init();var Bid=BlockID;var Gid=GroupID;var BlockArray=new Array();req.onreadystatechange=getBlock;function init(){var HttpRequest=null;try{HttpRequest=new XMLHttpRequest()}catch(e){try{HttpRequest=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){Httprequest=new ActiveXObject("Microsoft.XMLHTTP")}}return HttpRequest}function getBlock(){if(req.readyState==4||req.readyState=="complete"){Response=req.responseText;BlockArray=eval("("+Response+")");showBlock()}}function showBlock(){txt='<table cellpadding="0" cellspacing="0" id="iframe_block_table_'+Bid+'"><tr>';for(key in BlockArray){if(!isNaN(key)){rating=getRating(key);image="/CommonFiles/Yaposhka/01_Products/"+BlockArray[key]["art"]+"/"+BlockArray[key]["art"]+"_Menu.jpg";if(BlockArray[key]["novelty"]==""){novelty=""}else{novelty='<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/parts/new.png" width="54" height="54" class="new" onload="loadPNG(this)">'}if(BlockArray[key]["weight"]==""){weight=""}else{weight="("+BlockArray[key]["weight"]+")";weight=weight.replace(" ","&nbsp;")}if(BlockArray[key]["consist"]==""){consist=""}else{consist="<li>";consist+='<span class="ingredients_container_1">';consist+='<a href="javascript:void(0)" class="gray_1">Состав</a>';consist+='<div class="container_ingredients_popup_1">';consist+='<table cellpadding="0" cellspacing="0" class="ingredients_popup">';consist+='<tr><td><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/parts/popup_1_1.png" width="149" height="7" onload="loadPNG(this)"><br></td></tr>';consist+='<tr><td class="link">'+BlockArray[key]["consist"]+"</td></tr>";consist+='<tr><td><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/parts/popup_1_3.png" width="149" height="8" onload="loadPNG(this)"><br></td></tr>';consist+="</table></div></span></li>"}txt+='<td width="226" id="card_'+key+'">';txt+='<div class="menu_line_1">';txt+='<div class="menu_price_1">'+BlockArray[key]["price"]+".—</div>";txt+='<div class="menu_line_2">';txt+='<div class="menu_line_3">';txt+='<div class="menu_line_4">';txt+='<div class="menu_product_1" style="background: url(\''+image+"') no-repeat 100% 100%\">";txt+='<div class="container_calculator_popup_1">';txt+='<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/icons/to_calculator_1.gif" width="9" height="11" alt="В корзину" title="В корзину" class="add_to_calculator"   onmouseout="add_to_calculator_window(0,this);" onmouseover="add_to_calculator_window(1,this);">';txt+='<table cellpadding="0" cellspacing="0" class="add_to_calculator_popup" onmouseout="add_to_calculator_window(0,this);" onmouseover="add_to_calculator_window(1,this);">';txt+='<tr><td><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/parts/popup_1_1.png" width="149" height="7" onload="loadPNG(this)"><br></td></tr>';txt+='<tr><td class="link"><a href="javascript:addToCalculator('+key+')" class="blue_1">добавить в корзину</a><br></td></tr>';txt+='<tr><td><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/parts/popup_1_3.png" width="149" height="8" onload="loadPNG(this)"><br></td></tr>';txt+="</table></div>";txt+='<div style="width:150px;"><a href="javascript:addToCalculator('+key+')" class="black_1">'+BlockArray[key]["name"]+'</a> <b class="weight_1">'+weight+"</b></div>";txt+=rating;txt+='<ul class="bullets_1">';txt+=consist;txt+='<li><a href="javascript:void(0)" class="gray_1" onClick="showCommentWindow('+key+',event)">Отзывы</a>';txt+="</li></ul>";txt+="</div></div></div></div>";txt+=novelty;txt+="</div></td>"}}txt+="</tr></table>";document.getElementById("iframe_block_content_"+Bid).innerHTML=txt;loadMenu();resizeScrollbar(Bid)}function getRating(key){flag=true;if(getCookie("vote_"+key)==null){flag=false}rating="";rate=Number(BlockArray[key]["rating"]);rate_floor=Math.floor(rate);for(i=1;i<=rate_floor;i++){if(flag){rating+='<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/icons/star_1.gif" width="18" height="16" class="star_1">'}else{rating+='<a href="javascript:SetRate('+i+","+key+')"><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/icons/star_1.gif" width="18" height="16" class="star_1" id="star_'+i+"_"+key+'" onMouseOver="RateOver('+i+","+key+')" onMouseOut="RateOut('+key+')"></a>'}}for(i=rate_floor+1;i<=5;i++){if(i==Math.ceil(rate)){if(flag){rating+='<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/icons/star_3.gif" width="18" height="16" class="star_1">'}else{rating+='<a href="javascript:SetRate('+i+","+key+')"><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/icons/star_3.gif" width="18" height="16" class="star_1" id="star_'+i+"_"+key+'" onMouseOver="RateOver('+i+","+key+')" onMouseOut="RateOut('+key+')"></a>'}}else{if(flag){rating+='<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/icons/star_2.gif" width="18" height="16" class="star_1">'}else{rating+='<a href="javascript:SetRate('+i+","+key+')"><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/icons/star_2.gif" width="18" height="16" class="star_1" id="star_'+i+"_"+key+'" onMouseOver="RateOver('+i+","+key+')" onMouseOut="RateOut('+key+')"></a>'}}}return rating}this.LoadBlock=function(){URL="?reqMode=xHTTP&reqType=MyFood&reqGroup="+Gid;req.open("GET",URL,true);req.send(null)}}var HttpRequest=null;function getHttpRequest(){var A=null;try{A=new XMLHttpRequest()}catch(B){try{A=new ActiveXObject("Msxml2.XMLHTTP")}catch(B){Httprequest=new ActiveXObject("Microsoft.XMLHTTP")}}return A}var test=new Array();var BlockID=null;var GroupID=null;var FoodID=0;var InnerTXT="";var OpenBlocks=new Array();var LoadedBlocks=new Array();function GetContent(B,A){BlockID=B;GroupID=A;InnerTXT="";if(OpenBlocks[B]){if(LoadedBlocks[B]==undefined){FoodID=1;test[B]=new AJAXInteractionBlocks(B,A);test[B].LoadBlock();LoadedBlocks[B]=B}}else{showList(BlockID)}}function showList(A){txt='<table cellpadding="0" cellspacing="0" id="iframe_block_table_'+A+'"><tr>';txt+=InnerTXT;txt+='<td id="preload" width="226" style="background:url(/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/parts/preload.gif) no-repeat center center;">&nbsp;</td>';txt+="</tr></table>";return txt}function GetContentMy(B,A){BlockID=B;GroupID=A;InnerTXT="";if(OpenBlocks[B]){FoodID=1;test[B]=new AJAXInteractionMy(B,A);test[B].LoadBlock();LoadedBlocks[B]=B}else{showList(BlockID)}}function LoadBlockMy(A){HttpRequest=getHttpRequest();HttpRequest.onreadystatechange=ShowFoodCardMy;URL="/?reqMode=xHTTP&reqType=MyFood&reqId="+FoodID+"&reqGroup="+A;HttpRequest.open("GET",URL,true);HttpRequest.send(null)}function LoadAdditionalBlockMy(A){FoodID++;HttpRequest=getHttpRequest();HttpRequest.onreadystatechange=ShowFoodCardMy;URL="/?reqMode=xHTTP&reqType=MyFood&reqId="+FoodID+"&reqGroup="+A;HttpRequest.open("GET",URL,true);HttpRequest.send(null)}function ShowFoodCardMy(){if(HttpRequest.readyState==4||HttpRequest.readyState=="complete"){HttpResponse=HttpRequest.responseText;HttpRequest=null;if(HttpResponse!=""){InnerTXT+=HttpResponse;document.getElementById("iframe_block_content_"+BlockID).innerHTML=showList(BlockID);resizeScrollbar(BlockID);loadMenu();if(isNaN(GroupID)&&FoodID<=10){LoadAdditionalBlockMy(GroupID)}else{if(!isNaN(GroupID)){setTimeout("LoadAdditionalBlockMy("+GroupID+")",500)}}}else{document.getElementById("preload").style.display="none";resizeScrollbar(BlockID)}}}function GetContentR(A){GroupID=BlocksID[CurrentBlockID];BlockID=Blocks[GroupID];InnerTXT="";OpenBlocks[Blocks[CurrentBlockID]]=true;switchMenuBlock(document.getElementById("block1_"+BlockID),BlockID);if(OpenBlocks[BlockID]){FoodID=1;test[BlockID]=new AJAXInteractionBlocks(BlockID,GroupID);test[BlockID].LoadBlock();LoadedBlocks[BlockID]=BlockID}else{showList(BlockID)}}function LoadBlockR(A){HttpRequest=getHttpRequest();HttpRequest.onreadystatechange=ShowFoodCardR;URL="/?reqMode=xHTTP&reqType=Food&reqId="+FoodID+"&reqGroup="+A;HttpRequest.open("GET",URL,true);HttpRequest.send(null)}function LoadAdditionalBlockR(A){FoodID++;HttpRequest=getHttpRequest();HttpRequest.onreadystatechange=ShowFoodCardR;URL="/?reqMode=xHTTP&reqType=Food&reqId="+FoodID+"&reqGroup="+A;HttpRequest.open("GET",URL,true);HttpRequest.send(null)}function ShowFoodCardR(){if(HttpRequest.readyState==4||HttpRequest.readyState=="complete"){HttpResponse=HttpRequest.responseText;HttpRequest=null;if(HttpResponse!=""){InnerTXT+=HttpResponse;document.getElementById("iframe_block_content_"+BlockID).innerHTML=showListR(BlockID);resizeScrollbar(BlockID);loadMenu();if(isNaN(GroupID)&&FoodID<=10){LoadAdditionalBlockR(GroupID)}else{if(!isNaN(GroupID)){setTimeout("LoadAdditionalBlockR("+GroupID+")",500)}}}else{document.getElementById("preload_"+BlockID).style.display="none";resizeScrollbar(BlockID);CurrentBlockID++;if(!isNaN(BlocksID[CurrentBlockID])){GetContentR(CurrentBlockID)}else{getCalculatorFromCookie();getCalculatorArray()}}}}function showListR(A){txt='<table cellpadding="0" cellspacing="0" id="iframe_block_table_'+A+'"><tr>';txt+=InnerTXT;txt+='<td id="preload_'+A+'" width="226" style="background:url(/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/parts/preload.gif) no-repeat center center;">&nbsp;</td>';txt+="</tr></table>";return txt}var Stars=new Array();var CardID=null;function RateOver(A,B){for(i=1;i<=5;i++){Stars[i]=document.getElementById("star_"+i+"_"+B).src}for(i=1;i<=A;i++){document.getElementById("star_"+i+"_"+B).src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/icons/star_1.gif"}for(i=A+1;i<=5;i++){document.getElementById("star_"+i+"_"+B).src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/icons/star_2.gif"}}function RateOut(A){for(i=1;i<=5;i++){document.getElementById("star_"+i+"_"+A).src=Stars[i]}}function SetRate(A,B){setCookieExpires("vote_"+B,A,"Mon, 01-Jan-2010 00:00:00 GMT");setCookieExpiresPath("vote_"+B,A,"Mon, 01-Jan-2010 00:00:00 GMT");CardID=B;HttpRequest=getHttpRequest();HttpRequest.onreadystatechange=ReloadCard;URL="/?reqMode=xHTTP&reqType=Vote&reqId="+CardID+"&reqRate="+A;HttpRequest.open("GET",URL,true);HttpRequest.send(null)}function ReloadCard(){if(HttpRequest.readyState==4||HttpRequest.readyState=="complete"){HttpResponse=HttpRequest.responseText;HttpRequest=null;document.getElementById("card_"+CardID).innerHTML=HttpResponse;GetContent(1,"c"+TopID)}}function getCalculatorArray(){HttpRequest=getHttpRequest();HttpRequest.onreadystatechange=putCalculator;URL="?reqMode=xHTTP&reqType=Calculator&reqAction=get";HttpRequest.open("GET",URL,true);HttpRequest.send(null)}function putCalculator(){if(HttpRequest.readyState==4||HttpRequest.readyState=="complete"){HttpResponse=HttpRequest.responseText;HttpRequest=null;if(HttpResponse!=""){arrayCalculator=eval("("+HttpResponse+")")}reloadCalculator()}}var CategoryID=null;var GroupID2=null;var FoodID2=null;function loadCommentsCategory(B,A){CategoryID=B;objectComments=A;HttpRequest=getHttpRequest();HttpRequest.onreadystatechange=getMenuOneInformation;URL="/?reqMode=xHTTP&reqType=Comments&reqGet=Category&reqId="+CategoryID;HttpRequest.open("GET",URL,true);HttpRequest.send(null)}function loadCommentsAddress(B,A){CategoryID=B;objectComments=A;HttpRequest=getHttpRequest();HttpRequest.onreadystatechange=getMenuOneInformationAddress;URL="/?reqMode=xHTTP&reqType=Comments&reqGet=Address&reqId="+CategoryID;HttpRequest.open("GET",URL,true);HttpRequest.send(null)}function getMenuOneInformationAddress(){if(HttpRequest.readyState==4||HttpRequest.readyState=="complete"){HttpResponse=HttpRequest.responseText;HttpRequest=null;if(HttpResponse!=""){arrayComments=eval("("+HttpResponse+")")}putMenuOne(false)}}function loadCommentsAddressLast(B,A){CategoryID=B;objectComments=A;HttpRequest=getHttpRequest();HttpRequest.onreadystatechange=getMenuOneInformationAddressLast;URL="/?reqMode=xHTTP&reqType=Comments&reqGet=Address&reqId="+CategoryID;HttpRequest.open("GET",URL,true);HttpRequest.send(null)}function getMenuOneInformationAddressLast(){if(HttpRequest.readyState==4||HttpRequest.readyState=="complete"){HttpResponse=HttpRequest.responseText;HttpRequest=null;if(HttpResponse!=""){arrayComments=eval("("+HttpResponse+")")}i=0;for(key in arrayComments){if(!i&&!isNaN(key)){loadAddress(key,document.getElementById("g"+key));i++}}putMenuOne(false)}}function getMenuOneInformation(){if(HttpRequest.readyState==4||HttpRequest.readyState=="complete"){HttpResponse=HttpRequest.responseText;HttpRequest=null;if(HttpResponse!=""){arrayComments=eval("("+HttpResponse+")")}putMenuOne(true)}}function loadCommentsGroup(A,B){GroupID2=A;objectComments2=B;HttpRequest=getHttpRequest();HttpRequest.onreadystatechange=getMenuTwoInformation;URL="/?reqMode=xHTTP&reqType=Comments&reqGet=Group&reqId="+GroupID2;HttpRequest.open("GET",URL,true);HttpRequest.send(null)}function getMenuTwoInformation(){if(HttpRequest.readyState==4||HttpRequest.readyState=="complete"){HttpResponse=HttpRequest.responseText;HttpRequest=null;if(HttpResponse!=""){arrayComments2=eval("("+HttpResponse+")")}putMenuTwo()}}function loadFood(A){FoodID2=A;HttpRequest=getHttpRequest();HttpRequest.onreadystatechange=getFoodInformation;URL="/?reqMode=xHTTP&reqType=Comments&reqGet=Food&reqId="+FoodID2;HttpRequest.open("GET",URL,true);HttpRequest.send(null)}function getFoodInformation(){if(HttpRequest.readyState==4||HttpRequest.readyState=="complete"){HttpResponse=HttpRequest.responseText;HttpRequest=null;arrayCommentsCard=eval("("+HttpResponse+")");showComments()}}function loadAddress(A){FoodID2=A;HttpRequest=getHttpRequest();HttpRequest.onreadystatechange=getAddressInformation;URL="/?reqMode=xHTTP&reqType=Comments&reqGet=SingleAddress&reqId="+FoodID2;HttpRequest.open("GET",URL,true);HttpRequest.send(null)}function getAddressInformation(){if(HttpRequest.readyState==4||HttpRequest.readyState=="complete"){HttpResponse=HttpRequest.responseText;HttpRequest=null;arrayCommentsCard=eval("("+HttpResponse+")");showAddressComments()}}function getCommentsNumber(A,B){var C=getHttpRequest();C.onreadystatechange=function(){if(C.readyState==4||C.readyState=="complete"){HttpResponse=C.responseText;C=null;document.getElementById("cn"+A).innerHTML="("+HttpResponse+")"}};URL="/?reqMode=xHTTP&reqType=Comments&reqGet=Number&reqId="+A+"&reqObject="+B;C.open("GET",URL,true);C.send(null)}var ObjectID=null;var CommentType=false;function putCommentObject(C,B,A){if(checkCommentForm()){ObjectID=C;HttpRequest=getHttpRequest();HttpRequest.onreadystatechange=ReloadComments;URL="/?reqMode=xHTTP&reqType=Comments&reqGet=Put&reqId="+ObjectID+"&reqObject="+B;HttpRequest.open("POST",URL,true);HttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");HttpRequest.send("name="+document.getElementById("cName").value+"&text="+document.getElementById("cText").value+"&phone="+document.getElementById("cPhone").value+"&mail="+document.getElementById("cMail").value)}else{errorFields()}}function ReloadComments(){if(HttpRequest.readyState==4||HttpRequest.readyState=="complete"){HttpResponse=HttpRequest.responseText;HttpRequest=null;document.getElementById("cText").value="Ваш отзыв добавлен и ждет одобрения модератора. После одобрения, он будет добавлен на сайт"}}function ReloadCommentWindow(){if(HttpRequest.readyState==4||HttpRequest.readyState=="complete"){HttpResponse=HttpRequest.responseText;HttpRequest=null;document.getElementById("comment").innerHTML="Спасибо! Ваш отзыв сохранен."}}var CommentType="";function loadLastComment(A){CommentType=A;HttpRequest=getHttpRequest();HttpRequest.onreadystatechange=openLastComment;URL="/?reqMode=xHTTP&reqType=Comments&reqGet=Last&reqObject="+A;HttpRequest.open("GET",URL,true);HttpRequest.send(null)}function openLastComment(){if(HttpRequest.readyState==4||HttpRequest.readyState=="complete"){HttpResponse=HttpRequest.responseText;HttpRequest=null;if(HttpResponse!="{}"){lastCommentArray=eval("("+HttpResponse+")");if(CommentType=="ADM"){loadCommentsAddressLast(lastCommentArray.cid,document.getElementById("c"+lastCommentArray.cid))}else{loadCommentsCategory2(lastCommentArray.cid,document.getElementById("c"+lastCommentArray.cid))}}}}function loadCommentsCategory2(B,A){CategoryID=B;objectComments=A;HttpRequest=getHttpRequest();HttpRequest.onreadystatechange=getMenuOneInformation2;URL="/?reqMode=xHTTP&reqType=Comments&reqGet=Category&reqId="+CategoryID;HttpRequest.open("GET",URL,true);HttpRequest.send(null)}function getMenuOneInformation2(){if(HttpRequest.readyState==4||HttpRequest.readyState=="complete"){HttpResponse=HttpRequest.responseText;HttpRequest=null;if(HttpResponse!=""){arrayComments=eval("("+HttpResponse+")")}putMenuOne(true);loadCommentsGroup2(lastCommentArray.gid,document.getElementById("g"+lastCommentArray.gid))}}function loadCommentsGroup2(A,B){GroupID2=A;objectComments2=B;HttpRequest=getHttpRequest();HttpRequest.onreadystatechange=getMenuTwoInformation2;URL="/?reqMode=xHTTP&reqType=Comments&reqGet=Group&reqId="+GroupID2;HttpRequest.open("GET",URL,true);HttpRequest.send(null)}function getMenuTwoInformation2(){if(HttpRequest.readyState==4||HttpRequest.readyState=="complete"){HttpResponse=HttpRequest.responseText;HttpRequest=null;if(HttpResponse!=""){arrayComments2=eval("("+HttpResponse+")")}putMenuTwo();loadFood(lastCommentArray.id)}}var Blocks=new Array();var BlocksID=new Array();var CurrentBlockID=0;function addBlockList(B,A){Blocks[A]=B}function formBlocksID(){i=0;tmp_array=new Array();for(key in arrOpenBlocks){if(!isNaN(key.replace("c",""))){BlocksID[i]=key;tmp_array[i]=key;i++}}str=tmp_array.join(",");setCookieExpires("blocks["+PageID+"]",str,"Mon, 01-Jan-2010 00:00:00 GMT");setCookieExpiresPath("blocks["+PageID+"]",str,"Mon, 01-Jan-2010 00:00:00 GMT")}function OpenBlock(){getCalculatorFromCookie();getCalculatorArray();if(PageID==12||PageID==13||PageID==14||PageID==15||PageID==17){formBlocksID();for(key in BlocksID){if(!isNaN(key.replace("c",""))){gid=BlocksID[key];id=Blocks[gid];OpenBlocks[Blocks[key]]=true;switchMenuBlock(document.getElementById("block1_"+id),id);test[key]=new AJAXInteractionBlocks(id,gid);test[key].LoadBlock();LoadedBlocks[key]=key}}manageResize()}}function checkOpenBlock(A){if(OpenBlocks[A]==true){addOpenBlock(A,PageID)}else{removeOpenBlock(A,PageID)}}function addOpenBlock(B,A){for(key in Blocks){if(Blocks[key]==B){block_gid=key}}blockArray=formCookieBlock(A);if(blockArray==null){str=block_gid}else{newElement=blockArray.length;blockArray[newElement]=block_gid;str=blockArray.join(",")}setCookieExpires("blocks["+A+"]",str,"Mon, 01-Jan-2010 00:00:00 GMT");setCookieExpiresPath("blocks["+A+"]",str,"Mon, 01-Jan-2010 00:00:00 GMT")}function removeOpenBlock(B,A){for(key in Blocks){if(Blocks[key]==B){block_gid=key}}blockArray=formCookieBlock(A);if(blockArray!=null){newBlockArray=new Array();i=0;for(key in blockArray){if(!isNaN(key)&&blockArray[key]!=block_gid){newBlockArray[i]=blockArray[key];i++}}str=newBlockArray.join(",");setCookieExpires("blocks["+A+"]",str,"Mon, 01-Jan-2010 00:00:00 GMT");setCookieExpiresPath("blocks["+A+"]",str,"Mon, 01-Jan-2010 00:00:00 GMT")}}function formCookieBlock(A){str=getCookie("blocks["+A+"]");if(str==null){blockArray=str}else{blockArray=str.split(",")}return blockArray}function getColors(A){if(A>10){color=A-10*Math.floor(A/10)}else{color=A}}var arrayComments=new Array();var arrayComments2=new Array();var objectComments=null;var objectComments2=null;var CommentMenuOneTXT="";var arrayCommentsCard=new Array();var CommentsCardTXT="";var CommentsTXT="";function putMenuOne(A){if(A){formMenuOne()}else{formMenuOneAddress()}showCommentsMenu1(objectComments)}function formMenuOne(){CommentMenuOneTXT='<table width="100%" cellpadding="0" cellspacing="0" class="submenu_4">';for(key in arrayComments){if(!isNaN(key)){CommentMenuOneTXT+='<tr class="first" onclick="loadCommentsGroup('+key+',this)" id="g'+key+'">';CommentMenuOneTXT+='<th><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/2_1_1.gif" class="image_1"><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/2_2_1.gif" class="image_2"></th>';CommentMenuOneTXT+="<td><div>"+arrayComments[key]["name"]+" <span>("+arrayComments[key]["count"]+")</span></div></td>";CommentMenuOneTXT+='<th><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/2_1_2.gif" class="image_1"><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/2_2_2.gif" class="image_2"></th>';CommentMenuOneTXT+="</tr>"}}CommentMenuOneTXT+="</table>"}function formMenuOneAddress(){CommentMenuOneTXT='<table width="100%" cellpadding="0" cellspacing="0" class="submenu_4">';for(key in arrayComments){if(!isNaN(key)){CommentMenuOneTXT+='<tr class="first" onclick="loadAddress('+key+',this)" id="g'+key+'">';CommentMenuOneTXT+='<th><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/2_1_1.gif" class="image_1"><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/2_2_1.gif" class="image_2"></th>';CommentMenuOneTXT+="<td><div>"+arrayComments[key]["name"]+", "+arrayComments[key]["street"]+" <span>("+arrayComments[key]["count"]+")</span></div></td>";CommentMenuOneTXT+='<th><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/2_1_2.gif" class="image_1"><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/2_2_2.gif" class="image_2"></th>';CommentMenuOneTXT+="</tr>"}}CommentMenuOneTXT+="</table>"}function putMenuTwo(){formMenuTwo();showCommentsMenu2(objectComments2)}function formMenuTwo(){CommentMenuTwoTXT='<table width="100%" cellpadding="0" cellspacing="0" class="submenu_4">';for(key in arrayComments2){if(!isNaN(key)){CommentMenuTwoTXT+='<tr class="first" onclick="loadFood('+key+')">';CommentMenuTwoTXT+='<th><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/2_1_1.gif" class="image_1"><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/2_2_1.gif" class="image_2"></th>';CommentMenuTwoTXT+="<td><div>"+arrayComments2[key]["name"]+" <span>("+arrayComments2[key]["count"]+")</span></div></td>";CommentMenuTwoTXT+='<th><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/2_1_2.gif" class="image_1"><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/2_2_2.gif" class="image_2"></th>';CommentMenuTwoTXT+="</tr>"}}CommentMenuTwoTXT+="</table>"}function hideCommentsMenu1(){if(lastCommentsObject1){lastCommentsObject1.className=lastCommentsObject1.className.replace(" active","");lastCommentsObject1.getElementsByTagName("div")[0].style.background=""}lastCommentsObject2=null;hideComments()}function hideCommentsMenu2(){if(lastCommentsObject2){lastCommentsObject2.className=lastCommentsObject2.className.replace(" active","");lastCommentsObject2.getElementsByTagName("div")[0].style.background=""}hideComments()}function showCommentsMenu1(A){if(A.className.indexOf("active")==-1){hideCommentsMenu1();A.className+=" active";A.getElementsByTagName("div")[0].style.background="#E6EEE9";lastCommentsObject1=A;document.getElementById("menuOne").innerHTML=CommentMenuOneTXT}}function showCommentsMenu2(B,A){if(B.className.indexOf("active")==-1){hideCommentsMenu2();B.className+=" active";B.getElementsByTagName("div")[0].style.background="#E6EEE9";lastCommentsObject2=B;document.getElementById("menuTwo").innerHTML=CommentMenuTwoTXT}}function showComments(){showCommentsCard();showCommentsList()}function showAddressComments(){showAddressCommentsCard();showAddressCommentsList()}function showCommentsCard(){FoodCard=arrayCommentsCard.information;txt="";txt+='<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/pixels/t_pixel.gif" class="separator_2"><br><br>';txt+='<table width="100%" cellpadding="0" cellspacing="0"><tr>';txt+='<td width="1%" class="testimonial_photo">';txt+='<table width="2%" cellpadding="0" cellspacing="0"><tr>';txt+='<td width="1%"><div class="photo_frame_1" style="width:120px;height:120px;background:url('+FoodCard.image+') no-repeat center center;">&nbsp;</div></td>';txt+='<td width="1%" style="vertical-align: bottom"><div class="price"><span>'+FoodCard.price+" руб.</span></div></td>";txt+="</tr></table>";txt+="</td>";txt+='<td width="39%" style="font-size: 11px; padding: 5 5 0 0"><b>'+FoodCard.name+"</b> "+FoodCard.weight+"<br>"+FoodCard.consist+"</td>";txt+='<td width="60%">';txt+='<form name="commentForm" method="post" action="">';txt+='<table width="100%" cellpadding="0" cellspacing="0"><tr>';txt+='<td width="50%" style="padding: 5 0 10 0"><b>Оставь свой отзыв</b></td>';txt+='<td width="50%" style="padding: 0 0 10 0">';txt+='<table width="100%" cellpadding="0" cellspacing="0"><tr>';txt+='<td width="1%" class="input_padding_1"><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_1.gif" width="6" height="24"><br></td>';txt+='<td width="98%"><input type="text" name="" id="cName" value="Ваше имя" class="input2" onfocus="if (this.value == \'Ваше имя\') {this.value = \'\'}; this.style.backgroundColor=\'#ffffff\';" onblur="if (this.value == \'\') {this.value = \'Ваше имя\'}"><br></td>';txt+='<td width="1%" class="input_padding_1"><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_2.gif" width="6" height="24"><br></td>';txt+="</tr></table>";txt+="</td>";txt+="</tr></table>";txt+='<table width="100%" cellpadding="0" cellspacing="0"><tr>';txt+='<td width="50%" style="padding: 0 5 10 0">';txt+='<table width="100%" cellpadding="0" cellspacing="0"><tr>';txt+='<td width="1%" class="input_padding_1"><div style="width:6px;height:24px;background:url(/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_1.gif) no-repeat center center;"></div><!--<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_1.gif" width="6" height="24"><br>--></td>';txt+='<td width="98%"><input type="text" name="" id="cPhone" value="Ваш телефон" class="input2" onfocus="if (this.value == \'Ваш телефон\') {this.value = \'\'}; this.style.backgroundColor=\'#ffffff\';" onblur="if (this.value == \'\') {this.value = \'Ваш телефон\'}"><br></td>';txt+='<td width="1%" class="input_padding_1"><div style="width:6px;height:24px;background:url(/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_2.gif) no-repeat center center;"></div><!--<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_2.gif" width="6" height="24"><br>--></td>';txt+="</tr></table>";txt+="</td>";txt+='<td width="50%" style="padding: 0 0 0 5">';txt+='<table width="100%" cellpadding="0" cellspacing="0"><tr>';txt+='<td width="1%" class="input_padding_1"><div style="width:6px;height:24px;background:url(/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_1.gif) no-repeat center center;"></div><!--<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_1.gif" width="6" height="24"><br>--></td>';txt+='<td width="98%"><input type="text" name="" id="cMail" value="Ваш E-mail" class="input2" onfocus="if (this.value == \'Ваш E-mail\') {this.value = \'\'}; this.style.backgroundColor=\'#ffffff\';" onblur="if (this.value == \'\') {this.value = \'Ваш E-mail\'}"><br></td>';txt+='<td width="1%" class="input_padding_1"><div style="width:6px;height:24px;background:url(/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_2.gif) no-repeat center center;"></div><!--<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_2.gif" width="6" height="24"><br>--></td>';txt+="</tr></table>";txt+="</td>";txt+="</tr></table>";txt+='<div class="comment_1">';txt+='<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/4_1.gif" width="6" height="6" style="position: absolute; top: -1; left: -1"><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/4_2.gif" width="6" height="6" style="position: absolute; top: -1; right: -2"><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/4_3.gif" width="6" height="6" style="position: absolute; right: -2; bottom: -1"><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/4_4.gif" width="6" height="6" style="position: absolute; left: -1; bottom: -1">';txt+="<textarea name=\"\" id=\"cText\" class=\"input3\" onfocus=\"if (this.value == 'Оставьте ваш отзыв') {this.value = ''}; this.style.backgroundColor='#ffffff';\" onblur=\"if (this.value == '') {this.value = 'Оставьте ваш отзыв'}\">Оставьте ваш отзыв</textarea><br>";txt+='<a href="javascript:putCommentObject('+arrayCommentsCard.information["id"]+',\'PDM\',true)" class="gray_3"><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/icons/send_1.gif" width="20" height="20" alt="Отправить" title="Отправить" class="sinput1">Отправить</a><br>';txt+='</div></form><div style="text-align:center;line-height:26px;height:26px;;font-size:11px;">*поля "Ваше имя" и "Отзыв" обязательны, а так же "Телефон" или "E-mail"</div></td>';txt+="</tr></table>";txt+='<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/pixels/t_pixel.gif" class="separator_3"><br>';CommentsCardTXT=txt;document.getElementById("info").innerHTML=CommentsCardTXT}function showCommentsList(){FoodComments=arrayCommentsCard.comments;txt="";for(key in FoodComments){if(!isNaN(key)){txt+='<div class="comment_2">';txt+="<div>"+FoodComments[key]["name"]+"</div>";txt+=FoodComments[key]["body"];txt+="</div>"}}CommentsTXT=txt;document.getElementById("comments").innerHTML=CommentsTXT}function showAddressCommentsCard(){FoodCard=arrayCommentsCard.information;txt="";txt+='<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/pixels/t_pixel.gif" class="separator_2"><br><br>';txt+='<table width="100%" cellpadding="0" cellspacing="0"><tr>';txt+='<td width="1%" class="testimonial_photo">';txt+='<table width="2%" cellpadding="0" cellspacing="0"><tr>';txt+='<td width="1%"><div class="photo_frame_1" style="width:120px;height:120px;background:url('+FoodCard.image+') no-repeat center center;">&nbsp;</div></td>';txt+='<td width="1%" style="vertical-align: bottom"></td>';txt+="</tr></table>";txt+="</td>";txt+='<td width="39%" style="font-size: 11px; padding: 5 0 0 0"></td>';txt+='<td width="60%">';txt+='<form name="commentForm" method="post" action="">';txt+='<table width="100%" cellpadding="0" cellspacing="0"><tr>';txt+='<td width="50%" style="padding: 5 0 10 0"><b>Оставь свой отзыв</b></td>';txt+='<td width="50%" style="padding: 0 0 10 0">';txt+='<table width="100%" cellpadding="0" cellspacing="0"><tr>';txt+='<td width="1%" class="input_padding_1"><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_1.gif" width="6" height="24"><br></td>';txt+='<td width="98%"><input type="text" name="" id="cName" value="Ваше имя" class="input2" onfocus="if (this.value == \'Ваше имя\') {this.value = \'\'}; this.style.backgroundColor=\'#ffffff\';" onblur="if (this.value == \'\') {this.value = \'Ваше имя\'}"><br></td>';txt+='<td width="1%" class="input_padding_1"><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_2.gif" width="6" height="24"><br></td>';txt+="</tr></table>";txt+="</td>";txt+="</tr></table>";txt+='<table width="100%" cellpadding="0" cellspacing="0"><tr>';txt+='<td width="50%" style="padding: 0 5 10 0">';txt+='<table width="100%" cellpadding="0" cellspacing="0"><tr>';txt+='<td width="1%" class="input_padding_1"><div style="width:6px;height:24px;background:url(/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_1.gif) no-repeat center center;"></div><!--<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_1.gif" width="6" height="24"><br>--></td>';txt+='<td width="98%"><input type="text" name="" id="cPhone" value="Ваш телефон" class="input2" onfocus="if (this.value == \'Ваш телефон\') {this.value = \'\'}; this.style.backgroundColor=\'#ffffff\';" onblur="if (this.value == \'\') {this.value = \'Ваш телефон\'}"><br></td>';txt+='<td width="1%" class="input_padding_1"><div style="width:6px;height:24px;background:url(/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_2.gif) no-repeat center center;"></div><!--<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_2.gif" width="6" height="24"><br>--></td>';txt+="</tr></table>";txt+="</td>";txt+='<td width="50%" style="padding: 0 0 0 5">';txt+='<table width="100%" cellpadding="0" cellspacing="0"><tr>';txt+='<td width="1%" class="input_padding_1"><div style="width:6px;height:24px;background:url(/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_1.gif) no-repeat center center;"></div><!--<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_1.gif" width="6" height="24"><br>--></td>';txt+='<td width="98%"><input type="text" name="" id="cMail" value="Ваш E-mail" class="input2" onfocus="if (this.value == \'Ваш E-mail\') {this.value = \'\'}; this.style.backgroundColor=\'#ffffff\';" onblur="if (this.value == \'\') {this.value = \'Ваш E-mail\'}"><br></td>';txt+='<td width="1%" class="input_padding_1"><div style="width:6px;height:24px;background:url(/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_2.gif) no-repeat center center;"></div><!--<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_2.gif" width="6" height="24"><br>--></td>';txt+="</tr></table>";txt+="</td>";txt+="</tr></table>";txt+='<div class="comment_1">';txt+='<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/4_1.gif" width="6" height="6" style="position: absolute; top: -1; left: -1"><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/4_2.gif" width="6" height="6" style="position: absolute; top: -1; right: -2"><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/4_3.gif" width="6" height="6" style="position: absolute; right: -2; bottom: -1"><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/4_4.gif" width="6" height="6" style="position: absolute; left: -1; bottom: -1">';txt+="<textarea name=\"\" id=\"cText\" class=\"input3\" onfocus=\"if (this.value == 'Оставьте ваш отзыв') {this.value = ''}; this.style.backgroundColor='#ffffff';\" onblur=\"if (this.value == '') {this.value = 'Оставьте ваш отзыв'}\">Оставьте ваш отзыв</textarea><br>";txt+='<a href="javascript:putCommentObject('+arrayCommentsCard.information["id"]+',\'ADM\',true)" class="gray_3" onClick="CommentType=true"><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/icons/send_1.gif" width="20" height="20" alt="Отправить" title="Отправить" class="sinput1">Отправить</a><br>';txt+='</div></form><div style="text-align:center;line-height:26px;height:26px;font-size:11px;">*поля "Ваше имя" и "Отзыв" обязательны, а так же "Телефон" или "E-mail"</div></td>';txt+="</tr></table>";txt+='<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/pixels/t_pixel.gif" class="separator_3"><br>';CommentsCardTXT=txt;document.getElementById("info").innerHTML=CommentsCardTXT}function showAddressCommentsList(){FoodComments=arrayCommentsCard.comments;txt="";for(key in FoodComments){if(!isNaN(key)){txt+='<div class="comment_2">';txt+="<div>"+FoodComments[key]["name"]+"</div>";txt+=FoodComments[key]["body"];txt+="</div>"}}CommentsTXT=txt;document.getElementById("comments").innerHTML=CommentsTXT}function hideComments(){document.getElementById("info").innerHTML="";document.getElementById("comments").innerHTML="";document.getElementById("menuTwo").innerHTML=""}function showCommentWindow(B,A){x=Number(A.clientX)+Number(document.body.scrollLeft);y=Number(A.clientY)+Number(document.body.scrollTop);document.getElementById("comment").style.top=y+"px";document.getElementById("comment").style.left=x+"px";txt="";txt+='<div style="width:300px;height:200px;position:absolute;z-index:150;filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/backgrounds/comment1.png\', sizingMethod=\'noscale\')"><img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/backgrounds/comment1.png" style="position:absolute" onLoad="loadPNG(this)"></div><div style="width:280px;height:180px;margin-top:10px;margin-left:10px;z-index:200;position:absolute;"><form name="commentForm" method="post" action="">';txt+='<table width="100%" cellpadding="0" cellspacing="0"><tr>';txt+='<td width="280" style="padding: 0 0 10 0">';txt+='<table width="100%" cellpadding="0" cellspacing="0"><tr>';txt+='<td width="1%" class="input_padding_1"><div style="width:6px;height:24px;background:url(/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_1.gif) no-repeat center center;"></div><!--<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_1.gif" width="6" height="24"><br>--></td>';txt+='<td width="98%"><input type="text" name="" id="cName" value="Ваше имя" class="input2" onfocus="if (this.value == \'Ваше имя\') {this.value = \'\'}; this.style.backgroundColor=\'#ffffff\';" onblur="if (this.value == \'\') {this.value = \'Ваше имя\'}"><br></td>';txt+='<td width="1%" class="input_padding_1"><div style="width:6px;height:24px;background:url(/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_2.gif) no-repeat center center;"></div><!--<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_2.gif" width="6" height="24"><br>--></td>';txt+="</tr></table>";txt+="</td>";txt+='<td width="20" valign="top" align="right">';txt+='<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/backgrounds/savemenu_close.gif" style="width:9px;height:9px;position:relative;margin-left:10px;" onClick="closeWindow('+B+')">';txt+="</td>";txt+="</tr></table>";txt+='<table width="100%" cellpadding="0" cellspacing="0"><tr>';txt+='<td width="140" style="padding: 0 5 10 0">';txt+='<table width="100%" cellpadding="0" cellspacing="0"><tr>';txt+='<td width="1%" class="input_padding_1"><div style="width:6px;height:24px;background:url(/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_1.gif) no-repeat center center;"></div><!--<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_1.gif" width="6" height="24"><br>--></td>';txt+='<td width="98%"><input type="text" name="" id="cPhone" value="Ваш телефон" class="input2" onfocus="if (this.value == \'Ваш телефон\') {this.value = \'\'}; this.style.backgroundColor=\'#ffffff\';" onblur="if (this.value == \'\') {this.value = \'Ваш телефон\'}"><br></td>';txt+='<td width="1%" class="input_padding_1"><div style="width:6px;height:24px;background:url(/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_2.gif) no-repeat center center;"></div><!--<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_2.gif" width="6" height="24"><br>--></td>';txt+="</tr></table>";txt+="</td>";txt+='<td width="140" style="padding: 0 0 0 5">';txt+='<table width="100%" cellpadding="0" cellspacing="0"><tr>';txt+='<td width="1%" class="input_padding_1"><div style="width:6px;height:24px;background:url(/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_1.gif) no-repeat center center;"></div><!--<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_1.gif" width="6" height="24"><br>--></td>';txt+='<td width="98%"><input type="text" name="" id="cMail" value="Ваш E-mail" class="input2" onfocus="if (this.value == \'Ваш E-mail\') {this.value = \'\'}; this.style.backgroundColor=\'#ffffff\';" onblur="if (this.value == \'\') {this.value = \'Ваш E-mail\'}"><br></td>';txt+='<td width="1%" class="input_padding_1"><div style="width:6px;height:24px;background:url(/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_2.gif) no-repeat center center;"></div><!--<img src="/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/corners/3_1_2.gif" width="6" height="24"><br>--></td>';txt+="</tr></table>";txt+="</td>";txt+="</tr></table>";txt+='<div class="comment_1">';txt+='<div class="corner_1"></div><div class="corner_2"></div><div class="corner_3"></div><div class="corner_4"></div>';txt+="<textarea name=\"\" id=\"cText\" class=\"input3\" onfocus=\"if (this.value == 'Оставьте ваш отзыв') {this.value = ''}; this.style.backgroundColor='#ffffff';\" onblur=\"if (this.value == '') {this.value = 'Оставьте ваш отзыв'}\">Оставьте ваш отзыв</textarea><br>";txt+='<a href="javascript:putCommentObject('+B+',\'PDM\',false)" class="gray_3"><div style="width:20px;height:20px;background:url(/CommonFiles/Yaposhka/WPG_Templates/Images/Yaposhka/icons/send_1.gif) no-repeat center center; float:left;"></div><div style="margin-top:3px;width:100px;">Отправить</div></a>';txt+='</div></form><div style="text-align:center;line-height:26px;height:26px;font-size:11px;">*поля "Ваше имя" и "Отзыв" обязательны, а так же "Телефон" или "E-mail"</div></div>';document.getElementById("comment").innerHTML=txt;document.getElementById("comment").style.display="block"}function closeWindow(A){document.getElementById("comment").style.display="none"}var errorArray=new Array();function checkCommentForm(){flag=true;objName=document.getElementById("cName");objText=document.getElementById("cText");objPhone=document.getElementById("cPhone");objMail=document.getElementById("cMail");if(objName.value==""||objName.value=="Ваше имя"){errorArray[errorArray.length]="cName";flag=false}if(objText.value==""||objText.value=="Оставьте ваш отзыв"||objText.value=="Ваш отзыв добавлен и ждет одобрения модератора. После одобрения, он будет добавлен на сайт"){errorArray[errorArray.length]="cText";flag=false}if(objMail.value!=""&&objMail.value!="Ваш E-mail"&&!checkEMail(objMail.value)){errorArray[errorArray.length]="cMail";flag=false}if(objPhone.value!=""&&objPhone.value!="Ваш телефон"&&!checkPhone(objPhone.value)){errorArray[errorArray.length]="cPhone";flag=false}if((objMail.value==""||objMail.value=="Ваш E-mail")&&(objPhone.value==""||objPhone.value=="Ваш телефон")){errorArray[errorArray.length]="cPhone";errorArray[errorArray.length]="cMail";flag=false}return flag}function errorFields(){for(key in errorArray){if(!isNaN(key)){obj=document.getElementById(errorArray[key]);obj.style.backgroundColor="#eeeeee";obj.style.color="#000000"}}errorArray.splice(0,errorArray.length)}var flashinstalled=0;var flashversion=0;MSDetect="false";if(navigator.plugins&&navigator.plugins.length){x=navigator.plugins["Shockwave Flash"];if(x){flashinstalled=2;if(x.description){y=x.description;flashversion=y.charAt(y.indexOf(".")-1)}}else{flashinstalled=1}if(navigator.plugins["Shockwave Flash 2.0"]){flashinstalled=2;flashversion=2}}else{if(navigator.mimeTypes&&navigator.mimeTypes.length){x=navigator.mimeTypes["application/x-shockwave-flash"];if(x&&x.enabledPlugin){flashinstalled=2}else{flashinstalled=1}}else{MSDetect="true"}}if(MSDetect=="true"){var doc='<script language="VBScript"> \n';doc+="on error resume next \n";doc+="	For i = 3 to 10\n";doc+='		If Not(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & i))) Then\n';doc+="\n";doc+="		Else\n";doc+="			flashinstalled = 2\n";doc+="			flashversion = i\n";doc+="		End If\n";doc+="	Next\n";doc+="\n";doc+="If flashinstalled = 0 Then\n";doc+="	flashinstalled = 1\n";doc+="End If\n";doc+="<\/script> \n";document.write(doc)}function overwriteWithFlash(F,E,C,B,A){if(!DetectFlashVer(A,0,0)){return false}var D='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ';D+='codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" ';D+='width="'+C+'" height="'+B+'" id="oSwf'+E+'" align="middle">';D+='<param name="movie" value="'+F+'" />';D+='<param name="quality" value="high" />';D+='<param name="bgcolor" value="#ffffff" />';D+='<param name="wmode" value="opaque" />';D+='<embed src="'+F+'" ';D+='quality="high" bgcolor="#ffffff" ';D+='width="'+C+'" height="'+B+'" ';D+='name="oSwf'+E+'" align="middle" type="application/x-shockwave-flash" wmode="opaque" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';document.getElementById(E).innerHTML=D}var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;function ControlVersion(){var A;var B;var C;try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");A=B.GetVariable("$version")}catch(C){}if(!A){try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");A="WIN 6,0,21,0";B.AllowScriptAccess="always";A=B.GetVariable("$version")}catch(C){}}if(!A){try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");A=B.GetVariable("$version")}catch(C){}}if(!A){try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");A="WIN 3,0,18,0"}catch(C){}}if(!A){try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");A="WIN 2,0,0,11"}catch(C){A=-1}}return A}function GetSwfVer(){var G=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var F=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var A=navigator.plugins["Shockwave Flash"+F].description;var E=A.split(" ");var C=E[2].split(".");var H=C[0];var B=C[1];var D=E[3];if(D==""){D=E[4]}if(D[0]=="d"){D=D.substring(1)}else{if(D[0]=="r"){D=D.substring(1);if(D.indexOf("d")>0){D=D.substring(0,D.indexOf("d"))}}}var G=H+"."+B+"."+D}}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1){G=4}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1){G=3}else{if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1){G=2}else{if(isIE&&isWin&&!isOpera){G=ControlVersion()}}}}}return G}function DetectFlashVer(F,D,C){versionStr=GetSwfVer();if(versionStr==-1){return false}else{if(versionStr!=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",")}else{versionArray=versionStr.split(".")}var E=versionArray[0];var A=versionArray[1];var B=versionArray[2];if(E>parseFloat(F)){return true}else{if(E==parseFloat(F)){if(A>parseFloat(D)){return true}else{if(A==parseFloat(D)){if(B>=parseFloat(C)){return true}}}}}return false}}}function AC_AddExtension(B,A){if(B.indexOf("?")!=-1){return B.replace(/\?/,A+"?")}else{return B+A}}function AC_Generateobj(E,D,A){var C="";if(isIE&&isWin&&!isOpera){C+="<object ";for(var B in E){C+=B+'="'+E[B]+'" '}C+=">";for(var B in D){C+='<param name="'+B+'" value="'+D[B]+'" /> '}C+="</object>"}else{C+="<embed ";for(var B in A){C+=B+'="'+A[B]+'" '}C+="> </embed>"}document.write(C)}function AC_FL_RunContent(){var A=AC_GetArgs(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(A.objAttrs,A.params,A.embedAttrs)}function AC_SW_RunContent(){var A=AC_GetArgs(arguments,".dcr","src","clsid:166B1BCA-3F9C-11CF-8075-444553540000",null);AC_Generateobj(A.objAttrs,A.params,A.embedAttrs)}function AC_GetArgs(B,E,G,D,H){var A=new Object();A.embedAttrs=new Object();A.params=new Object();A.objAttrs=new Object();for(var C=0;C<B.length;C=C+2){var F=B[C].toLowerCase();switch(F){case"classid":break;case"pluginspage":A.embedAttrs[B[C]]=B[C+1];break;case"src":case"movie":B[C+1]=AC_AddExtension(B[C+1],E);A.embedAttrs.src=B[C+1];A.params[G]=B[C+1];break;case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblclick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":case"type":case"codebase":case"id":A.objAttrs[B[C]]=B[C+1];break;case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"tabindex":A.embedAttrs[B[C]]=A.objAttrs[B[C]]=B[C+1];break;default:A.embedAttrs[B[C]]=A.params[B[C]]=B[C+1]}}A.objAttrs.classid=D;if(H){A.embedAttrs.type=H}return A}notmoscow=0;$(document).ready(function(){notmoscow=Number(getCookie("notmoscow"));if(notmoscow==1){setCookie("calculator","");setCookiePath("calculator","");setCookie("calculatorNumbers","");setCookiePath("calculatorNumbers","");$("#ordervisible, #orderhidden").hide();$("#ordernotmoscow").show();$("#orderBoxButton").css("cursor","default")}else{$("#orderhidden").show()}});$(window).load(function(){var D=$("#window_call_form");if(D.size()>0){D.centerwindowhandler({bgzindex:10000,bgclickable:true,fadespeed:200});D.find("a.window_close_button").eq(0).click(function(){D.centerwindowhandlerStopAction();return false});var E=$("#window_call_form_response");if(E.size()>0){E.centerwindowhandler({bgzindex:10000,bgclickable:true,fadespeed:200});E.find("a.window_close_button").eq(0).click(function(){E.centerwindowhandlerStopAction();return false})}var C=$("#callButton");if(C.size()>0){C.click(function(){D.centerwindowhandlerStartAction();return false})}}if(notmoscow==0){var B=$("#window_order_form");if(B.size()>0){B.centerwindowhandler({bgzindex:10000,bgclickable:true,fadespeed:200});B.find("a.window_close_button").eq(0).click(function(){B.centerwindowhandlerStopAction();return false});var A=$("#window_order_form_response");if(A.size()>0){A.centerwindowhandler({bgzindex:10000,bgclickable:true,fadespeed:200});A.find("a.window_close_button").eq(0).click(function(){A.centerwindowhandlerStopAction();return false})}var G=$("#window_order_form_response2");if(G.size()>0){G.centerwindowhandler({bgzindex:10000,bgclickable:true,fadespeed:200});G.find("a.window_close_button").eq(0).click(function(){G.centerwindowhandlerStopAction();return false})}var F=$("#orderButton");if(F.size()>0){F.click(function(){if(!F.hasClass("orderButtonActive")){return false}else{var H=parseInt($("#calculator").text().replace(".-",""));if(H>=1000){B.centerwindowhandlerStartAction()}else{G.centerwindowhandlerStartAction()}}return false})}}}else{var F=$("#orderButton");if(F.size()>0){F.click(function(){return false})}}});function fCheckCallForm(){var A=new Array("callName","callPhone","callTime");var C=new Array("Вы не представились","Вы ввели недопустимый телефон","Вы не указали время звонка");var D=false;var F=$("#window_call_form");F.find("div.window_form_data_error").removeClass("window_form_data_error");F.find("label.window_form_data_label_error").removeClass("window_form_data_label_error");F.find("td.window_form_error").text("");var E="";for(var B=0;B<A.length;B++){if(F.find("#"+A[B]).val()==""||(F.find("#"+A[B]).attr("id")=="callPhone"&&!/[0-9\ \+\-\(\)]+/.test(F.find("#"+A[B]).val()))){E=C[B];F.find('label[for="'+F.find("#"+A[B]).attr("id")+'"]').addClass("window_form_data_label_error");F.find("#"+A[B]).parent().addClass("window_form_data_error");F.find("#"+A[B]).parent().find("div").addClass("arrowError");F.find("td.window_form_error").text(E);D=true;break}}if(!D){$.ajax({type:"POST",url:"/?reqMode=xHTTP&reqType=call",data:{callName:F.find("#callName").val(),callPhone:F.find("#callPhone").val(),callTime:F.find("#callTime").val()},success:function(G){if(G==""){F.centerwindowhandlerStopAction();$("#window_call_form_response").centerwindowhandlerStartAction()}else{F.find("td.window_form_error").text(G)}}})}return false}function fCheckOrderForm(){var A=new Array("orderName","orderPhone","orderMetro","orderStreet","orderHouse","orderPorch","orderCode","orderFloor","orderFlat");var C=new Array("Вы не представились","Вы не указали телефон","Вы не указали станцию метро","Вы не указали улицу","Вы не указали номер дома","Вы не указали номер корпуса","Вы не указали номер подъезда","Вы не указали этаж","Вы не указали номер квартиры");var D=false;var E=$("#window_order_form");E.find("div.window_form_data_error").removeClass("window_form_data_error");E.find("label.window_form_data_label_error").removeClass("window_form_data_label_error");E.find("div.arrowError").removeClass("arrowError");E.find("td.window_form_error").text("");for(var B=0;B<A.length;B++){if(E.find("#"+A[B]).val()==""){E.find("#"+A[B]).parent().addClass("window_form_data_error");E.find('label[for="'+E.find("#"+A[B]).attr("id")+'"]').addClass("window_form_data_label_error");E.find("#"+A[B]).parent().find("div").addClass("arrowError");E.find("td.window_form_error").text(C[B]);D=true;break}}if(!D){$.ajax({type:"POST",url:"/?reqMode=xHTTP&reqType=order",data:{orderName:E.find("#orderName").val(),orderPhone:E.find("#orderPhone").val(),orderEmail:E.find("#orderEmail").val(),orderMetro:E.find("#orderMetro").val(),orderStreet:E.find("#orderStreet").val(),orderHouse:E.find("#orderHouse").val(),orderBlock:E.find("#orderBlock").val(),orderPorch:E.find("#orderPorch").val(),orderCode:E.find("#orderCode").val(),orderFloor:E.find("#orderFloor").val(),orderFlat:E.find("#orderFlat").val(),orderDesc:E.find("#orderDesc").val(),orderElements:getCookie("calculator"),orderNumbers:getCookie("calculatorNumbers")},success:function(F){if(F==""){E.centerwindowhandlerStopAction();$("#window_order_form_response").centerwindowhandlerStartAction();setCookie("calculator","");setCookie("calculatorNumbers","");arrayCalculatorElements=new Array();arrayCalculatorNumbers=new Array();reloadCalculator()}else{E.find("td.window_form_error").text(F)}}})}return false};