function getEBI(objId){var obj=null;with(document){if(getElementById){obj=getElementById(objId)}}if(obj){return obj}else{return false}}function correctPNG(){var g=navigator.appVersion.split("MSIE");var h=parseFloat(g[1]);if((h>=5.5)&&(document.body.filters)){for(var d=0;d<document.images.length;d++){var e=document.images[d];var k=e.src.toUpperCase();if(k.substring(k.length-3,k.length)=="PNG"){var f=(e.id)?"id='"+e.id+"' ":"";var l=(e.className)?"class='"+e.className+"' ":"";var b=(e.title)?"title='"+e.title+"' ":"title='"+e.alt+"' ";var j="display:inline-block;"+e.style.cssText;if(e.align=="left"){j="float:left;"+j}if(e.align=="right"){j="float:right;"+j}if(e.parentElement.href){j="cursor:hand;"+j}var a="<span "+f+l+b+' style="width:'+e.width+"px; height:"+e.height+"px;"+j+";filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+e.src+"', sizingMethod='scale');\"></span>";e.outerHTML=a;d=d-1}}}}function galleryStep(b,j,g,e,k){setFrame(e,b,"gallery");if(getEBI("picturemainframe")){getEBI("picturemainframe").innerHTML="";var d=document.createElement("div");var l=document.createElement("img");l.setAttribute("src","/img/misc/loading3.gif");d.setAttribute("id","spindiv");d.setAttribute("name","spindiv");d.setAttribute("style","padding:50px 0; text-align:center");d.appendChild(l);if(getEBI("picturemainframecenter")){getEBI("picturemainframe").removeChild(getEBI("picturemainframecenter"))}getEBI("picturemainframe").appendChild(d);getEBI("picturemainframe").style.display="block"}var f=document.getElementById("orderDiv");if(getEBI("pic_area")){if(getEBI("orderDiv")){getEBI("pic_area").removeChild(f)}}var a="/inc/ajax/getgallery.php";var h="aid="+b+"&frmid="+g+"&jobid="+e+"&num="+j;httpPOST("post",a,e,h,"getgallery",0,j,"",k)}function privateStep(b,j,g,e,k){setFrame(e,b,"gallery");if(getEBI("picturemainframe")){getEBI("picturemainframe").innerHTML="";var d=document.createElement("div");var l=document.createElement("img");l.setAttribute("src","/img/misc/loading3.gif");d.setAttribute("id","spindiv");d.setAttribute("name","spindiv");d.setAttribute("style","padding:50px 0; text-align:center");d.appendChild(l);if(getEBI("picturemainframecenter")){getEBI("picturemainframe").removeChild(getEBI("picturemainframecenter"))}getEBI("picturemainframe").appendChild(d);getEBI("picturemainframe").style.display="block"}var f=document.getElementById("orderDiv");if(getEBI("pic_area")){if(getEBI("orderDiv")){getEBI("pic_area").removeChild(f)}}var a="/inc/ajax/getgallery.php";var h="aid="+b+"&frmid="+g+"&jobid="+e+"&num="+j;httpPOST("post",a,e,h,"getgallery",0,j,"",k)}function changeInfo2(b,g,f,k,l,m,j){if(j){setFrame(f,j,l)}else{setFrame(f,b,l)}if(getEBI("picturemainframe")){getEBI("picturemainframe").style.display="block";var d=document.createElement("div");var n=document.createElement("img");n.setAttribute("src","/img/misc/loading3.gif");d.setAttribute("id","spindiv");d.setAttribute("name","spindiv");d.setAttribute("style","padding:50px 0; text-align:center");d.appendChild(n);if(getEBI("picturemainframecenter")){getEBI("picturemainframe").removeChild(getEBI("picturemainframecenter"))}getEBI("picturemainframe").appendChild(d)}var e=document.getElementById("orderDiv");if(getEBI("pic_area")){if(getEBI("orderDiv")){getEBI("pic_area").removeChild(e)}}var a="/inc/ajax/getanketarecord.php";if(l=="anketa"){k=1}var h="aid="+b+"&frmid="+g+"&jobid="+f+"&num="+k;if(j){h+="&galid="+j}httpPOST("post",a,f,h,"getanketarecord",0,k,l,m)}function httpPOST(a,d,e,f,g,b,k,h,j){if(window.XMLHttpRequest){var l=new XMLHttpRequest();l.open(a,d,true);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.setRequestHeader("Content-length",f.length);l.setRequestHeader("Connection","close");l.onreadystatechange=function(){if(l.readyState==4){if(l.status==200){switch(g){case"getanketas":displayFoundAnketas2(l.responseXML,e,b,h,j);break;case"getcatlist":displayCatList(l.responseText,e);break;case"getfid":displayFirst(l.responseText,e,k,h,j);break;case"getanketarecord":displayRecord(l.responseXML,h,j);break;case"getgallery":displayGallery(l.responseXML,j);break;case"orderform":displayOrderForm(l.responseText,e,f,g);break;case"login":updatelogin(l.responseText);break;case"logout":logoff(l.responseText);break;case"city":doChangeCity(l.responseText);break}}else{alert("Сервер занят. Попробуйте позднее")}}};l.send(f)}else{if(window.ActiveXObject){var l=new ActiveXObject("Microsoft.XMLHTTP");if(l){l.open(a,d,true);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.setRequestHeader("Content-length",f.length);l.setRequestHeader("Connection","close");l.onreadystatechange=function(){if(l.readyState==4){if(l.status==200){switch(g){case"getanketas":displayFoundAnketas2(l.responseXML,e,b,h,j);break;case"getcatlist":displayCatList(l.responseText,e);break;case"getfid":displayFirst(l.responseText,e,k,h,j);break;case"getanketarecord":displayRecord(l.responseXML,h,j);break;case"getgallery":displayGallery(l.responseXML,j);break;case"orderform":displayOrderForm(l.responseText,e,f,g);break;case"login":updatelogin(l.responseText);break;case"logout":logoff(l.responseText);break;case"city":doChangeCity(l.responseText);break}}else{alert("Сервер занят. Попробуйте позднее")}}};l.send(f)}}}}function displayRecord(b,o,e){if(getEBI("largebanner")){getEBI("largebanner").style.display="none"}if(getEBI("pic_area")){getEBI("pic_area").style.display="block"}if(getEBI("details")){getEBI("details").style.display="block"}if(getEBI("company_name")){getEBI("company_name").style.display="block"}if(getEBI("company_phones")){getEBI("company_phones").style.display="block"}if(getEBI("order_area")){getEBI("order_area").style.display="block"}var z=b.getElementsByTagName("record");var f=z[0].getAttribute("job");var E="";switch(f){case"3":E="платье ";break;case"17":E="костюм ";break;case"7":E="букет ";break;case"10":E="автомобиль № ";break}E=E+z[0].getAttribute("articul");var r=z[0].getAttribute("id");var j=z[0].getAttribute("galid");var a=z[0].getAttribute("fid");var x=z[0].getAttribute("rid");var g=z[0].getAttribute("num");var h=z[0].getAttribute("orient");var y=z[0].getAttribute("k");var u=z[0].getAttribute("picdir");var q=z[0].getAttribute("src");var l=z[0].getAttribute("wd");var D=z[0].getAttribute("ht");var C=Url.decode(z[0].getAttribute("firmname"));if(getEBI("path_job")){getEBI("path_job").innerHTML=z[0].getAttribute("jobname");getEBI("path_job").setAttribute("href","/catalog-"+e)}if(getEBI("path_goods")){getEBI("path_goods").innerHTML=z[0].getAttribute("goodsname");getEBI("path_goods").setAttribute("href","/catalog-"+e)}if(getEBI("path_firm")){getEBI("path_firm").innerHTML=C;if(f==6||f==22||f==35||f==44){getEBI("path_firm").setAttribute("href","/catalog-"+e+"/"+x)}else{getEBI("path_firm").setAttribute("href","/catalog-"+e+"/"+a)}}if(o=="anketa"&&(f==6||f==22||f==35||f==44)){if(getEBI("last_sep")){getEBI("last_sep").style.display="none"}}else{if(getEBI("path_anketa")){getEBI("path_anketa").innerHTML=E}if(getEBI("last_sep")){getEBI("last_sep").style.display="inline"}}if(getEBI("path_firmlink")){if(f==6||f==22||f==35||f==44){getEBI("path_firmlink").innerHTML='<a id="path_firm" name="firmpath" href="/catalog-'+e+"/"+x+'" class="pathway">'+C+"</a>"}else{getEBI("path_firmlink").innerHTML='<a id="path_firm" name="firmpath" href="/catalog-'+e+"/"+a+'" class="pathway">'+C+"</a>"}}if(getEBI("firmid")){getEBI("firmid").value=a}if(f==6||f==22||f==35||f==44){if(getEBI("anketa_art")){getEBI("anketa_art").innerHTML=E}if(getEBI("objart")){getEBI("objart").value=E}}else{if(getEBI("anketa_art")){getEBI("anketa_art").innerHTML=E;if(getEBI("objart")){getEBI("objart").value=E}}}if(getEBI("objid")){getEBI("objid").value=r}if(getEBI("order_area")){getEBI("order_area").style.display="block"}var p=r;if((f==6||f==22||f==35||f==44)&&o!="anketa"){p=j}if(getEBI("prev_link_"+p)){prev_id=getEBI("prev_link_"+p).getAttribute("name");prev_fid=getEBI("prev_link_"+p).getAttribute("fid");prev_galid=getEBI("prev_link_"+p).getAttribute("name")}if(getEBI("next_link_"+p)){next_id=getEBI("next_link_"+p).getAttribute("name");next_fid=getEBI("next_link_"+p).getAttribute("fid");next_galid=getEBI("next_link_"+p).getAttribute("name")}newhtml='<table align="center" width="334" border="0" cellpadding="0" cellspacing="0"><tr valign="top">';newhtml+='<td style="width:75px; text-align:left">';if(getEBI("prev_link_"+p)&&prev_id!=0){if((f==6||f==22||f==35||f==44)&&o!="anketa"){newhtml+='<a onclick="changeInfo2('+x+","+prev_fid+","+f+","+g+",'"+o+"','"+e+"',"+prev_galid+')" style="text-decoration:none" href="javascript:void(0)">&lt;&lt;&nbsp;пред.</a>&nbsp;'}else{newhtml+='<a onclick="changeInfo2('+prev_id+","+prev_fid+","+f+","+g+",'"+o+"','"+e+'\')" style="text-decoration:none" href="javascript:void(0)">&lt;&lt;&nbsp;пред.</a>&nbsp;'}}newhtml+="</td>";newhtml+='<td style="width:184px; text-align:center">';newhtml+='<a id="ank_req_but" href="javascript:void(0)" onclick="getOrderForm('+r+","+f+","+a+",'"+E+"')\">Узнать о наличии</a>&nbsp;";newhtml+="</td>";newhtml+='<td style="width:75px; text-align:right">';if(getEBI("next_link_"+p)&&next_id!=0){if((f==6||f==22||f==35||f==44)&&o!="anketa"){newhtml+='<a onclick="changeInfo2('+x+","+next_fid+","+f+","+g+",'"+o+"','"+e+"',"+next_galid+')" style="text-decoration:none" href="javascript:void(0)">след.&nbsp;&gt;&gt;</a>'}else{newhtml+='<a onclick="changeInfo2('+next_id+","+next_fid+","+f+","+g+",'"+o+"','"+e+'\')" style="text-decoration:none" href="javascript:void(0)">след.&nbsp;&gt;&gt;</a>'}}newhtml+="</td>";newhtml+="</tr></table>";if(getEBI("ank_req_div")){getEBI("ank_req_div").innerHTML=newhtml}var m=document.createElement("IMG");m.src="/img.php?imagename="+u+q;switch(h){case"hor":m.setAttribute("width","390");m.setAttribute("height",Math.round(390/y));break;case"ver":m.setAttribute("height","480");m.setAttribute("width",Math.round(480*y));break;default:m.setAttribute("height","480");m.setAttribute("width",Math.round(480*y));break}m.setAttribute("border","0");m.setAttribute("data-magnifysrc","/img.php?imagename="+u+q);m.setAttribute("id","z_"+r);var n=document.getElementById("picturemainframe");n.innerHTML="";var B=document.createElement("CENTER");B.setAttribute("id","picturemainframecenter");n.appendChild(B);document.getElementById("picturemainframecenter").appendChild(m);var w={lens:true,imageOpacity:0.5,showPreload:true,zoomWidth:330,zoomHeight:330,xOffset:10,yOffset:0,position:"right"};if(l*D>=343000&&u!="/img/"){MojoMagnify.makeMagnifiable(document.getElementById("z_"+r),"/img.php?imagename="+u+q)}var A="?aid="+r+"&frmid="+a+"&jobid="+f+"&num="+g+"&view="+o;if(j){A+="&galid="+j}var d="/inc/ajax/getdressdetails.php"+A;loadXMLDoc("get",d,r,"details",f,g)}function displayGallery(g,h){if(getEBI("largebanner")){getEBI("largebanner").style.display="none"}if(getEBI("pic_area")){getEBI("pic_area").style.display="block"}if(getEBI("details")){getEBI("details").style.display="block"}if(getEBI("company_name")){getEBI("company_name").style.display="block"}if(getEBI("company_phones")){getEBI("company_phones").style.display="block"}if(getEBI("order_area")){getEBI("order_area").style.display="block"}var A=g.getElementsByTagName("record");var j=A[0].getAttribute("job");art=Url.decode(A[0].getAttribute("articul"));var r=A[0].getAttribute("id");var x=A[0].getAttribute("rid");var d=A[0].getAttribute("fid");var l=A[0].getAttribute("num");var m=A[0].getAttribute("orient");var z=A[0].getAttribute("k");var u=A[0].getAttribute("picdir");var q=A[0].getAttribute("src");var n=A[0].getAttribute("wd");var F=A[0].getAttribute("ht");var C=Url.decode(A[0].getAttribute("gdesc"));var G=Url.decode(A[0].getAttribute("firmname"));var B=A[0].getAttribute("video");if(getEBI("firmname")){getEBI("firmname").innerHTML='<a href="/catalog-'+h+"/"+d+'" >'+G+"</a>"}if(getEBI("path_job")){getEBI("path_job").innerHTML=A[0].getAttribute("jobname");getEBI("path_job").setAttribute("href","/catalog-"+h)}if(getEBI("path_goods")){getEBI("path_goods").innerHTML=A[0].getAttribute("goodsname");getEBI("path_goods").setAttribute("href","/catalog-"+h)}if(getEBI("path_firm")){getEBI("path_firm").innerHTML=G;if(j==6||j==22||j==35||j==44){getEBI("path_firm").setAttribute("href","/catalog-"+h+"/"+d)}else{getEBI("path_firm").setAttribute("href","/catalog-"+h+"/"+x)}}if(getEBI("path_anketa")){getEBI("path_anketa").innerHTML=art}if(getEBI("last_sep")){getEBI("last_sep").style.display="inline"}if(j==6||j==22||j==35||j==44){if(getEBI("path_firmlink")){getEBI("path_firmlink").innerHTML='<a id="path_firm" name="firmpath" href="/catalog-'+h+"/"+x+'" class="pathway">'+G+"</a>"}}else{if(getEBI("path_firmlink")){getEBI("path_firmlink").innerHTML='<a id="path_firm" name="firmpath" href="/catalog-'+h+"/"+d+'" class="pathway">'+G+"</a>"}}if(getEBI("firmid")){getEBI("firmid").value=d}if(getEBI("anketa_art")){getEBI("anketa_art").innerHTML=art;if(getEBI("objart")){getEBI("objart").value=art}}if(getEBI("objid")){getEBI("objid").value=r}if(getEBI("order_area")){getEBI("order_area").style.display="block"}if(getEBI("prev_link_"+r)){prev_id=getEBI("prev_link_"+r).getAttribute("name")}if(getEBI("next_link_"+r)){next_id=getEBI("next_link_"+r).getAttribute("name")}newhtml='<table align="center" width="334" border="0" cellpadding="0" cellspacing="0"><tr valign="top">';newhtml+='<td style="width:75px; text-align:left">';if(getEBI("prev_link_"+r)&&prev_id!=0){newhtml+='<a onclick="javascript:galleryStep('+prev_id+","+l+","+d+","+j+",'"+h+'\')" style="text-decoration:none" href="javascript:void(0)">&lt;&lt;&nbsp;пред.</a>&nbsp;'}newhtml+="</td>";newhtml+='<td style="width:184px; text-align:center">';newhtml+='<a id="ank_req_but" href="javascript:void(0)" onclick="getOrderForm('+r+","+j+","+d+",'"+art+"')\">Узнать о наличии</a>&nbsp;";newhtml+="</td>";newhtml+='<td style="width:75px; text-align:right">';if(getEBI("next_link_"+r)&&next_id!=0){newhtml+='<a onclick="javascript:galleryStep('+next_id+","+l+","+d+","+j+",'"+h+'\')" style="text-decoration:none" href="javascript:void(0)">след.&nbsp;&gt;&gt;</a>'}newhtml+="</td>";newhtml+="</tr></table>";if(getEBI("ank_req_div")){getEBI("ank_req_div").innerHTML=newhtml}if(B==0){var o=document.createElement("IMG");o.src="/img.php?imagename="+u+q;switch(m){case"hor":o.setAttribute("width","390");o.setAttribute("height",Math.round(390/z));break;case"ver":o.setAttribute("height","480");o.setAttribute("width",Math.round(480*z));break;default:o.setAttribute("height","480");o.setAttribute("width",Math.round(480*z));break}o.setAttribute("border","0");o.setAttribute("data-magnifysrc","/img.php?imagename="+u+q);o.setAttribute("id","z_"+r);var p=document.getElementById("picturemainframe");p.innerHTML="";var E=document.createElement("CENTER");E.setAttribute("id","picturemainframecenter");p.appendChild(E);document.getElementById("picturemainframecenter").appendChild(o);var w={lens:true,imageOpacity:0.5,showPreload:true,zoomWidth:330,zoomHeight:330,xOffset:10,yOffset:0,position:"right"};if(n*F>=343000&&u!="/img/"){MojoMagnify.makeMagnifiable(document.getElementById("z_"+r),"/img.php?imagename="+u+q)}}else{var y=document.createElement("OBJECT");y.setAttribute("id","MediaPlayer");y.setAttribute("width","400");y.setAttribute("height","380");y.setAttribute("classid","CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95");y.setAttribute("standby","Loading Windows Media Player components...");y.setAttribute("type","application/x-oleobject");y.setAttribute("codebase","http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701");var f=document.createElement("param");f.setAttribute("name","fileName");f.setAttribute("value",u+q);y.appendChild(f);var e=document.createElement("param");e.setAttribute("name","animationatStart");e.setAttribute("value","1");y.appendChild(e);var b=document.createElement("param");b.setAttribute("name","autoStart");b.setAttribute("value","1");y.appendChild(b);var a=document.createElement("param");a.setAttribute("name","ShowControls");a.setAttribute("value","0");y.appendChild(a);var J=document.createElement("param");J.setAttribute("name","ShowDisplay");J.setAttribute("value","0");y.appendChild(J);var I=document.createElement("param");I.setAttribute("name","ShowStatusBar");I.setAttribute("value","0");y.appendChild(I);var H=document.createElement("param");H.setAttribute("name","loop");H.setAttribute("value","1");y.appendChild(H);var D=document.createElement("embed");D.setAttribute("type","application/x-mplayer2");D.setAttribute("pluginspage","pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'");D.setAttribute("src",u+q);D.setAttribute("displaysize","4");D.setAttribute("autosize","0");D.setAttribute("showdisplay","0");D.setAttribute("showstatusbar","0");D.setAttribute("videoborder3d","0");D.setAttribute("autostart","1");D.setAttribute("designtimesp","5311");D.setAttribute("loop","0");D.setAttribute("width","400");D.setAttribute("height","350");var p=document.getElementById("picturemainframe");p.innerHTML="";var E=document.createElement("CENTER");E.setAttribute("id","picturemainframecenter");if(navigator.appVersion.indexOf("MSIE")>0){E.appendChild(D);p.appendChild(E)}else{y.appendChild(D);E.appendChild(y);p.appendChild(E)}}if(getEBI("company_services")){getEBI("company_services").innerHTML="<h2>"+art+"</h2>"+C}}function loadXMLDoc(h,b,g,f,e,a){if(window.XMLHttpRequest){var d=new XMLHttpRequest();d.onreadystatechange=function(){if(d.readyState==4){if(d.status==200){switch(f){case"total":display_total(d.responseText,e);break;default:loadData(d.responseText,g,f,e,a);break}}else{alert("Сервер занят. Попробуйте позднее")}}};d.open(h,b,true);d.send(null)}else{if(window.ActiveXObject){var d=new ActiveXObject("Microsoft.XMLHTTP");if(d){d.onreadystatechange=function(){if(d.readyState==4){if(d.status==200){switch(f){case"total":display_total(d.responseText,e);break;default:loadData(d.responseText,g,f,e,a);break}}else{alert("Сервер занят. Попробуйте позднее")}}};d.open(h,b,true);d.send(null)}}}}function loadData(a,f,e,d,b){if(getEBI(e)){getEBI(e).innerHTML=a}}function getSearchResults(h,a,g){switch(h){case 3:var f=getEBI("Dress_found_ids").value.split("|");st="платьев";break;case 17:var f=getEBI("Suite_found_ids").value.split("|");st="костюмов";break;case 10:var f=getEBI("Auto_found_ids").value.split("|");st="автомобилей";break;case 22:case 35:case 44:case 6:var f=getEBI("Rest_found_ids").value.split("|");st="ресторанов";break;case 7:var f=getEBI("Flower_found_ids").value.split("|");st="букетов";break}if(f.length>500){alert("Найдено слишком много "+st+". Уточните критерии поиска");return false}if(getEBI("anketa_art")){getEBI("anketa_art").innerHTML=""}if(getEBI("order_area")){getEBI("order_area").style.display="none"}if(getEBI("details")){getEBI("details").innerHTML=""}if(getEBI("picturemainframe")){getEBI("picturemainframe").innerHTML=""}if(a!="anketa"){document.location="/search-"+g+"/"}else{if(document.location.pathname.indexOf(g)==-1){document.location="/search-"+g+"/"}else{if(getEBI("searchResults")){getEBI("searchResults").innerHTML='<img src="/img/misc/loading3.gif" border="0" />'}switch(h){case 3:var e=getEBI("Dress_found_ids").value;switch(getEBI("dress_color_value").selectedIndex){case 1:c="#fff";break;case 2:c="#87a3de";break;case 3:c="#ff0000";break;case 4:c="#f3e19b";break;case 5:c="#ff7bfd";break;default:c="#ffcc80";break}var b="<img align='absmiddle' src='/img/empty.gif' width='1' height='1' border='0' style='margin:3px 5px 2px 0; border:1px solid #fff; padding:4px; background-color:"+c+"' />";if(getEBI("anketainfo_div")){getEBI("anketainfo_div").setAttribute("class","back_ssln");getEBI("anketainfo_div").setAttribute("className","back_ssln")}getEBI("anketasfoundtitle").innerHTML="Все платья, найденные по Вашему запросу <span id='anketasfoundnote' style='margin:0 0 0 30px; font-size:0.7em; font-weight:normal; width:auto;'></span>";if(getEBI("dress_color_value")&&getEBI("dress_color_value").selectedIndex!=0){getEBI("anketasfoundnote").innerHTML=b+"Цвет платья на фото может отличаться от заданного"}break;case 17:var e=getEBI("Suite_found_ids").value;if(getEBI("anketainfo_div")){getEBI("anketainfo_div").setAttribute("class","back_suit");getEBI("anketainfo_div").setAttribute("className","back_suit")}getEBI("anketasfoundtitle").innerHTML="Все костюмы, найденные по Вашему запросу";getEBI("anketasfoundnote").innerHTML="";break;case 7:var e=getEBI("Flower_found_ids").value;if(getEBI("anketainfo_div")){getEBI("anketainfo_div").setAttribute("class","back_flow");getEBI("anketainfo_div").setAttribute("className","back_flow")}getEBI("anketasfoundtitle").innerHTML="Все букеты, найденные по Вашему запросу";getEBI("anketasfoundnote").innerHTML="";break;case 10:var e=getEBI("Auto_found_ids").value;if(getEBI("anketainfo_div")){getEBI("anketainfo_div").setAttribute("class","back_auto");getEBI("anketainfo_div").setAttribute("className","back_auto")}getEBI("anketasfoundtitle").innerHTML="Все автомобили, найденные по Вашему запросу";getEBI("anketasfoundnote").innerHTML="";break;case 22:case 35:case 44:case 6:var e=getEBI("Rest_found_ids").value;if(getEBI("anketainfo_div")){getEBI("anketainfo_div").setAttribute("class","back_rest");getEBI("anketainfo_div").setAttribute("className","back_rest")}getEBI("anketasfoundtitle").innerHTML="Все рестораны, найденные по Вашему запросу";getEBI("anketasfoundnote").innerHTML="";break}var d="/inc/ajax/getfoundanketas2.php";var j="ids="+e+"&jobid="+h;httpPOST("post",d,h,j,"getanketas",e,0,a,g)}}}function displayFoundAnketas2(b,g,p,n,f){var r=b.getElementsByTagName("record");var e=document.createElement("tr");p=p.split("|");firstnum=1;if(getEBI("foundanketasids")){var x=getEBI("foundanketasids");x.value=""}else{var x=document.createElement("INPUT");x.value="";x.setAttribute("type","hidden");x.setAttribute("id","foundanketasids")}function j(){sendingObj=event.srcElement;changeInfo2(sendingObj.id,sendingObj.fid,sendingObj.job,sendingObj.num,sendingObj.view2,sendingObj.jobalias2)}for(i=0;i<r.length;i++){var h=document.createElement("td");h.setAttribute("class","thumbcontainer");h.setAttribute("className","thumbcontainer");var l=document.createElement("img");l.setAttribute("src",r[i].getAttribute("src"));if(i==0){firstnum=r[i].getAttribute("num")}l.id=r[i].getAttribute("id");l.fid=r[i].getAttribute("fid");l.job=r[i].getAttribute("job");l.num=r[i].getAttribute("num");l.view2=n;l.jobalias2=f;l.setAttribute("width",r[i].getAttribute("width"));l.setAttribute("height",r[i].getAttribute("height"));l.setAttribute("class","anketalinkimg");l.setAttribute("className","anketalinkimg");l.setAttribute("border",0);var a=document.createElement("div");a.setAttribute("class","wr_idle");a.setAttribute("className","wr_idle");a.setAttribute("id","wr_"+l.id);a.setAttribute("name","wr_"+l.id);var q=document.createElement("a");q.setAttribute("href","javascript:void(0)");q.setAttribute("class","anketalink");q.setAttribute("className","anketalink");if(l.attachEvent){l.attachEvent("onclick",j)}else{l.setAttribute("onclick","changeInfo2("+l.id+", "+l.fid+", "+l.job+", "+l.num+", '"+n+"', '"+f+"')")}q.appendChild(l);a.appendChild(q);if(r.length>1){var m=document.createElement("A");var u=document.createElement("A");m.setAttribute("id","prev_link_"+l.id);u.setAttribute("id","next_link_"+l.id);if(i==0){m.setAttribute("name","0");m.setAttribute("fid","0");u.setAttribute("name",r[i+1].getAttribute("id"));u.setAttribute("fid",r[i+1].getAttribute("fid"))}else{if(i==r.length-1&&i>0){m.setAttribute("name",r[i-1].getAttribute("id"));m.setAttribute("fid",r[i-1].getAttribute("fid"));u.setAttribute("name","0");u.setAttribute("fid","0")}else{m.setAttribute("name",r[i-1].getAttribute("id"));m.setAttribute("fid",r[i-1].getAttribute("fid"));u.setAttribute("name",r[i+1].getAttribute("id"));u.setAttribute("fid",r[i+1].getAttribute("fid"))}}h.appendChild(m);h.appendChild(u)}h.appendChild(a);e.appendChild(h)}var k=document.createElement("tbody");var o=document.createElement("table");k.appendChild(e);o.appendChild(k);getEBI("searchResults").innerHTML="";getEBI("searchResults").appendChild(o);id=p[0];if(id==""){id=p[1]}var d="/inc/ajax/get_r_firm_id.php";var w="aid="+id+"&jobid="+g;if(g==6||g==22||g==35||g==44){firstnum=1}else{firstnum=id}httpPOST("post",d,g,w,"getfid",p,firstnum,n,f)}function displayFirst(a,f,e,b,d){t=a.split("|");changeInfo2(t[0],t[1],f,e,b,d)}function getCatList(b){var a="/inc/ajax/getcatlist.php";var d="jobid="+b;httpPOST("post",a,b,d,"getcatlist")}function displayCatList(a,b){getEBI("catlist").innerHTML=a}function getJobTitle(b){var a="/inc/ajax/getjobheader.php";var d="jobid="+b;httpPOST("post",a,b,d,"getjobtitle")}function displayJobTitle(a,b){getEBI("jobtitle").innerHTML=a}function getAnketas(e){switch(e){case 3:getEBI("dress_count_null").style.display="none";getEBI("dress_count_button").style.display="none";getEBI("dress_count_button_loading").style.display="block";break;case 17:getEBI("suite_count_null").style.display="none";getEBI("suite_count_button").style.display="none";getEBI("suite_count_button_loading").style.display="block";break;case 7:getEBI("flower_count_null").style.display="none";getEBI("flower_count_button").style.display="none";getEBI("flower_count_button_loading").style.display="block";break;case 10:getEBI("auto_count_null").style.display="none";getEBI("auto_count_button").style.display="none";getEBI("auto_count_button_loading").style.display="block";break;case 22:case 35:case 44:case 6:getEBI("rest_count_null").style.display="none";getEBI("rest_count_button").style.display="none";getEBI("rest_count_button_loading").style.display="block";break}switch(e){case 3:var b=getEBI("dress_type_value").value;var y=getEBI("dress_type2_value").value;var q=getEBI("dress_color_value").value;var h=getEBI("dress_fason_value").value;var p=getEBI("dress_country_value").value;var o=getEBI("dress_details_shoulders_value").value;var l=getEBI("dress_details_skirt_value").value;var g=getEBI("dress_details_back_value").value;var r=getEBI("dress_details_sleeve_value").value;var x=getEBI("dress_price_lower").value;var f=getEBI("dress_price_value").value;var z="type="+b+"&type2="+y+"&color="+q+"&fason="+h+"&country="+p+"&dshoulders="+o+"&dskirt="+l+"&dback="+g+"&dsleeve="+r+"&loprice="+x+"&hiprice="+f;break;case 17:var h=getEBI("suite_fason_value").value;var p=getEBI("suite_country_value").value;var m=getEBI("suite_kroi_value").value;var j=getEBI("suite_complect_value").value;var x=getEBI("suite_price_lower").value;var f=getEBI("suite_price_value").value;var z="fason="+h+"&country="+p+"&kroi="+m+"&complect="+j+"&loprice="+x+"&hiprice="+f;break;case 7:var n=getEBI("flower_forma_value").value;var a=getEBI("flower_note_value").value;var q=getEBI("flower_color_value").value;var z="forma="+n+"&note="+a+"&color="+q;break;case 10:var k=getEBI("auto_klass_value").value;var q=getEBI("auto_color_value").value;var x=getEBI("auto_price_lower").value;var f=getEBI("auto_price_value").value;var B=getEBI("auto_retro_value").value;var u=getEBI("auto_mest_value").value;var z="klass="+k+"&color="+q+"&retro="+B+"&mest="+u+"&loprice="+x+"&hiprice="+f;break;case 22:case 35:case 44:case 6:var A=getEBI("rest_metro_value").value;var b=getEBI("rest_type_value").value;var x=getEBI("rest_price_lower").value;var f=getEBI("rest_price_value").value;var w=getEBI("rest_kitchen_value").value;var u=getEBI("rest_mest_value").value;var z="metro="+A+"&type="+b+"&kitchen="+w+"&mest="+u+"&loprice="+x+"&hiprice="+f;break}var d="/inc/ajax/countanketas.php?"+z+"&jobid="+e;loadXMLDoc("get",d,0,"total",e,0)}function display_total(a,b){switch(b){case 3:a=a.split("~");count=a[0];ids=a[1];getEBI("dress_count").innerHTML=count;getEBI("Dress_found_ids").value=ids;if(count!=0){getEBI("dress_count_p").style.display="block";getEBI("dress_count_button").style.display="block";getEBI("dress_count_null").style.display="none"}else{getEBI("dress_count_p").style.display="none";getEBI("dress_count_button").style.display="none";getEBI("dress_count_null").style.display="block"}break;case 17:a=a.split("~");count=a[0];ids=a[1];getEBI("suite_count").innerHTML=count;getEBI("Suite_found_ids").value=ids;if(count!=0){getEBI("suite_count_p").style.display="block";getEBI("suite_count_button").style.display="block";getEBI("suite_count_null").style.display="none"}else{getEBI("suite_count_p").style.display="none";getEBI("suite_count_button").style.display="none";getEBI("suite_count_null").style.display="block"}break;case 7:a=a.split("~");count=a[0];ids=a[1];getEBI("flower_count").innerHTML=count;getEBI("Flower_found_ids").value=ids;if(count!=0){getEBI("flower_count_p").style.display="block";getEBI("flower_count_button").style.display="block";getEBI("flower_count_null").style.display="none"}else{getEBI("flower_count_p").style.display="none";getEBI("flower_count_button").style.display="none";getEBI("flower_count_null").style.display="block"}break;case 10:a=a.split("~");count=a[0];ids=a[1];getEBI("auto_count").innerHTML=count;getEBI("Auto_found_ids").value=ids;if(count!=0){getEBI("auto_count_p").style.display="block";getEBI("auto_count_button").style.display="block";getEBI("auto_count_null").style.display="none"}else{getEBI("auto_count_p").style.display="none";getEBI("auto_count_button").style.display="none";getEBI("auto_count_null").style.display="block"}break;case 22:case 35:case 44:case 6:a=a.split("~");count=a[0];ids=a[1];getEBI("rest_count").innerHTML=count;getEBI("Rest_found_ids").value=ids;if(count!=0){getEBI("rest_count_p").style.display="block";getEBI("rest_count_button").style.display="block";getEBI("rest_count_null").style.display="none"}else{getEBI("rest_count_p").style.display="none";getEBI("rest_count_button").style.display="none";getEBI("rest_count_null").style.display="block"}break}getEBI("dress_count_button_loading").style.display="none";getEBI("suite_count_button_loading").style.display="none";getEBI("flower_count_button_loading").style.display="none";getEBI("auto_count_button_loading").style.display="none";getEBI("rest_count_button_loading").style.display="none"}function clearForm(a){switch(a){case 3:getEBI("dress_type_value").selectedIndex=0;getEBI("dress_type2_value").selectedIndex=0;getEBI("dress_color_value").selectedIndex=0;getEBI("dress_fason_value").selectedIndex=0;getEBI("dress_country_value").selectedIndex=0;getEBI("dress_details_shoulders_value").selectedIndex=0;getEBI("dress_details_skirt_value").selectedIndex=0;getEBI("dress_details_back_value").selectedIndex=0;getEBI("dress_details_sleeve_value").selectedIndex=0;getEBI("dress_price_lower").selectedIndex=0;getEBI("dress_price_value").selectedIndex=3;break;case 17:getEBI("suite_fason_value").selectedIndex=0;getEBI("suite_country_value").selectedIndex=0;getEBI("suite_kroi_value").selectedIndex=0;getEBI("suite_complect_value").selectedIndex=0;break;case 7:getEBI("flower_forma_value").selectedIndex=0;getEBI("flower_color_value").selectedIndex=0;getEBI("flower_note_value").selectedIndex=0;break;case 10:getEBI("auto_klass_value").selectedIndex=0;getEBI("auto_color_value").selectedIndex=0;getEBI("auto_price_lower").selectedIndex=0;getEBI("auto_price_value").selectedIndex=3;getEBI("auto_retro_value").selectedIndex=0;getEBI("auto_mest_value").value=0;break;case 22:case 35:case 44:case 6:getEBI("rest_metro_value").selectedIndex=0;getEBI("rest_type_value").selectedIndex=0;getEBI("rest_price_lower").selectedIndex=0;getEBI("rest_price_value").selectedIndex=3;getEBI("rest_kitchen_value").selectedIndex=0;getEBI("rest_mest_value").value=0;break}getAnketas(a)}function validateprice(d){switch(d){case 3:if(getEBI("dress_price_lower")){var b=getEBI("dress_price_lower").value;loselect=getEBI("dress_price_lower")}if(getEBI("dress_price_value")){var a=getEBI("dress_price_value").value;hiselect=getEBI("dress_price_value")}break;case 17:if(getEBI("suite_price_lower")){var b=getEBI("suite_price_lower").value;loselect=getEBI("suite_price_lower")}if(getEBI("suite_price_value")){var a=getEBI("suite_price_value").value;hiselect=getEBI("suite_price_value")}break;case 10:if(getEBI("auto_price_lower")){var b=getEBI("auto_price_lower").value;loselect=getEBI("auto_price_lower")}if(getEBI("auto_price_value")){var a=getEBI("auto_price_value").value;hiselect=getEBI("auto_price_value")}break;case 22:case 35:case 44:case 6:if(getEBI("rest_price_lower")){var b=getEBI("rest_price_lower").value;loselect=getEBI("rest_price_lower")}if(getEBI("rest_price_value")){var a=getEBI("rest_price_value").value;hiselect=getEBI("rest_price_value")}break}if(hiselect.selectedIndex<loselect.selectedIndex){alert("Скорректируйте ценовой диапазон");return false}getAnketas(d)}function goto_catalog(b,a){if(b!=0){document.location="/catalog-"+a+"/"}}function display_addresses(d){switch(d){case"block":if(!getEBI("adrdiv")){if(getEBI("pic_area")){var a=getEBI("pic_area")}if(getEBI("picturemainframe")){getEBI("picturemainframe").style.display="none"}if(getEBI("addresses")){var b=getEBI("addresses").innerHTML}var e=document.createElement("DIV");e.setAttribute("id","adrdiv");e.innerHTML=b;a.appendChild(e)}break;case"none":if(getEBI("adrdiv")){if(getEBI("adrdiv")&&getEBI("pic_area")){getEBI("pic_area").removeChild(getEBI("adrdiv"))}if(getEBI("picturemainframe")){getEBI("picturemainframe").style.display="block"}}break}return}function getOrderForm(g,b,f,e){var a="/inc/ajax/getorderform.php";var d="objid="+g+"&jobid="+b+"&fid="+f+"&art="+e;httpPOST("post",a,b,d,"orderform",0,0,0)}function displayOrderForm(b,e,f,a){if(!document.getElementById("orderDiv")){var d=document.createElement("DIV");d.setAttribute("id","orderDiv");d.innerHTML=b;if(getEBI("picturemainframe")){getEBI("picturemainframe").style.display="none"}if(getEBI("pic_area")){getEBI("pic_area").appendChild(d)}}}function hideOrder(){var a=document.getElementById("orderDiv");if(getEBI("pic_area")){getEBI("pic_area").removeChild(a)}if(getEBI("picturemainframe")){getEBI("picturemainframe").style.display="block"}}function setFrame(d,e,a){display_addresses("none");var b="";d=d*1;if(a=="anketa"){switch(d){case 3:b="Dress";break;case 17:b="Suite";break;case 10:b="Auto";break;case 7:b="Flower";break;case 22:case 35:case 44:case 6:b="Rest";break}}else{if(a=="gallery"){if(d<2500){b="Gallery"}else{b="Private"}}else{switch(d){case 3:b="FrmDress";break;case 17:b="FrmSuite";break;case 10:b="FrmAuto";break;case 7:b="FrmFlower";break;case 22:case 35:case 44:case 6:b="FrmRest";break}}}b+="_found_ids";if(getEBI(b)){b=getEBI(b).value.split("|");for(i=0;i<b.length;i++){if(getEBI("wr_"+b[i])){getEBI("wr_"+b[i]).setAttribute("class","wr_idle");getEBI("wr_"+b[i]).setAttribute("className","wr_idle")}}if(getEBI("wr_"+e)){getEBI("wr_"+e).setAttribute("class","wr_active");getEBI("wr_"+e).setAttribute("className","wr_active")}}return}function showlogin(b){if(document.getElementById("loginformdiv")){var a=document.getElementById("loginformdiv")}else{return false}switch(b){case"show":a.style.display="block";break;case"hide":a.style.display="none";break}}function logout(){var a="/inc/ajax/login.php";var b="email=logout";httpPOST("POST",a,0,b,"logout",0,0,0,0)}function getlogin(d,b){var a="/inc/ajax/login.php";var e="email="+d+"&password="+b;httpPOST("POST",a,0,e,"login",0,0,0,0)}function updatelogin(a){if(a!="0"){if(getEBI("loginstatus")){getEBI("loginstatus").innerHTML=a;showlogin("hide")}}else{if(getEBI("loginstatus")){getEBI("loginstatus").innerHTML="<a onclick=\"showlogin('show');\" href=\"javascript:void(0)\">Вход для рекламодателей</a>. <span class='loginerror'>Пароль или e-mail неверные</span>";showlogin("hide")}}return true}function logoff(a){updatelogin(a);document.location.reload()}function displayCitySelector(){var b=document.getElementById("Allcities");var a=document.getElementById("AllcitiesIframe");if(b){if(b.style.display=="block"){b.style.display="none";a.style.display="none"}else{b.style.display="block";a.style.display="block"}}return true}function hideCitySelector(){var b=document.getElementById("Allcities");var a=document.getElementById("AllcitiesIframe");if(b){b.style.display="none";a.style.display="none"}return true}function changeCity(d){var a="/inc/ajax/changecity.php";var b="cid="+d;httpPOST("post",a,0,b,"city","",0,"","");return displayCitySelector()}function doChangeCity(a){var b=document.getElementById("selectcity");if(b){b.innerHTML=a}}function validatedateform(){var b=18;var q=11;var g=2009;var j=new Date(g,q-1,b);var o=new Date();yesterday=o-86500000;o=new Date(yesterday);var e=o.getDate();var r=o.getMonth();r++;var h=o.getYear();var l=Array(Array(0,31,28,31,30,31,30,31,31,30,31,30,31),Array(0,31,29,31,30,31,30,31,31,30,31,30,31));var n=document.getElementById("day").value;var f=document.getElementById("mon").value;var p=document.getElementById("yea").value;chdate=new Date(p,f-1,n);var a=0;if(p!=0&&p%4==0){a=1}if(n!=0&&f!=0&&p!=0){if(n<=l[a][f]){s=false;v="Посмотреть"}}if(chdate<j||chdate>o){s=true;v="нет данных"}var k=document.getElementById("datesubmit");k.disabled=s;k.value=v}function show_private_full(a){if(getEBI("fullnameplate_"+a)){getEBI("fullnameplate_"+a).style.display="block"}}function hide_private_full(a){if(getEBI("fullnameplate_"+a)){getEBI("fullnameplate_"+a).style.display="none"}};