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; var isSaf = (navigator.userAgent.indexOf("Apple") != -1) ? true : false; var massid=[]; var strchp; var valchp; document.documentElement.id="js"; function $(id) {return document.getElementById(id)} function getForm(obj){ $("shadow").style.left=0; //$("shadow").style.width='100%'; //$("shadow").style.height='100%'; $("shadow").style.zIndex=2; $("hide").style.width='242px' $("hide").style.height=(isIE)?'170px':'161px' $("hide").style.top='170px' $("hide").style.left='64%' document.forms.enterform.reset(); if (isIE){ $("valbox").style.display='none'; $("arbox").style.display='none'; } if(obj.id=="entrance" || obj.id=="vxod"){ var div=$("hide"); var tab=$("avtor");} else if(obj.id=="choose"){ if($("trust")) $("trust").id="hideplace";var div=$("hideplace"); var tab=$("chplace");} div.style.zIndex=3; $("regtab").style.display='none';$("regtab").style.visibility='hidden'; $("changetab").style.display='none';$("changetab").style.visibility='hidden'; $("forgot_pass").style.display='none';$("forgot_pass").style.visibility='hidden' $("error_auth").style.display='none'; if(obj.id=="choose"){ if($("trust")) $("trust").id="hideplace"; $("hideplace").style.display="block";$("hideplace").style.left=65+'%';$("hideplace").style.top=180+'px'; $("entr").innerHTML=''; $("chplace").style.display='block'; } if($("Katal")&&isIE) $("Katal").style.display='none' if($("Alls")) for(var i=0;i<$("Alls").getElementsByTagName('*').length;i++){ massid.push($("Alls").getElementsByTagName('*')[i].id); $("Alls").getElementsByTagName('*')[i].id='HER'+i; //alert(massid[i]); } if($('thisplace').innerHTML.length<2){ if(isIE&&$("Allss")){ $('Allss').childNodes[2].style.display='none';$('Allss').childNodes[2].style.visibility='hidden';$("longmet").value="";} else{$("country").style.display='none';$("country").style.visibility='hidden';$("longmet").value="";} $("regio").style.display='none';$("regio").style.visibility='hidden';$("region").value=""; $("city").style.display='none';$("city").style.visibility='hidden';$("gorod").value=""; $("okrug").style.display='none';$("okrug").style.visibility='hidden';$("district").value=""; $("metropolitan").style.display='none';$("metropolitan").style.visibility='hidden';$("metrop").value=""; $("allplaces").style.display='block';$("allplaces").style.visibility='visible'; $("mesta").value='Начните ввод города или страны'; } else { //alert($("takeplace").value) var reschp=$("fullplace").value.split(/:/); if(isIE&&$("Allss")){ $('Allss').childNodes[2].style.display='block';$('Allss').childNodes[2].style.visibility='visible';$("longmet").value="";} $("country").style.display='block';$("country").style.visibility='visible';$("longmet").value=reschp[4]; $("regio").style.display='block';$("regio").style.visibility='visible';$("region").value=reschp[3]; $("city").style.display='block';$("city").style.visibility='visible';$("gorod").value=reschp[2]; if(reschp[2]=='Москва'||reschp[2]=='москва'){ $("okrug").style.display='block';$("okrug").style.visibility='visible';$("district").value=reschp[1]; $("metropolitan").style.display='block';$("metropolitan").style.visibility='visible';$("metrop").value=reschp[0]; } $("allplaces").style.display='none';$("allplaces").style.visibility='hidden'; } $("hide").style.display="block"; $("avtor").style.visibility='visible';$("avtor").style.display='block'; } function closeForm(){ $("shadow").style.left='-2000px'; $("shadow").style.zIndex=0; $("hidereg").style.display='none';$("hidereg").visibility='hidden'; if (navigator.appVersion.indexOf("MSIE") != -1){ $("valbox").style.display='inline-block'; $("arbox").style.display='inline-block'; } if($("hide")){ $("hide").style.left='-100%'; $("hide").style.zIndex=0; $("hide").style.display="none"; } if($("hideplace")){ $("hideplace").style.left='-100%'; $("hideplace").style.zIndex=0; $("hideplace").style.display="none"; if($("Alls")) for(var i=0;i<$("Alls").getElementsByTagName('*').length;i++) $("Alls").getElementsByTagName('*')[i].id=massid[i]; $("mesta").value='Начните ввод города или страны'; if($("Katal")&&isIE) $("Katal").style.display='block' } massid=[]; //document.forms.enterform.reset(); } function CheckPlace(){ var str=($("metrop").value)?$("gorod").value+", "+$("metrop").value:($("district").value)?$("gorod").value+", "+$("district").value:($("gorod").value)?$("gorod").value+ "("+$("longmet").value+", "+$("region").value+")":($("region").value)?$("longmet").value+", "+$("region").value:$("longmet").value; //$("oncaseinn").innerHTML=''+str+''; strchp=str; $("takeplace").value=($("metrop").value)?$("metrop").value:($("district").value)?$("district").value:($("gorod").value)?$("gorod").value:($("region").value)?$("region").value:($("longmet").value)?$("longmet").value:""; $("choplace").value=($("metrop").value)?"5":($("district").value)?"4":($("gorod").value)?"3":($("region").value)?"2":($("longmet").value)?"1":""; $("metrop").value=($("metrop").value.length)?$("metrop").value:' '; $("district").value=($("district").value.length)?$("district").value:' '; $("region").value=($("region").value.length)?$("region").value:' '; $("gorod").value=($("gorod").value.length)?$("gorod").value:' '; $("longmet").value=($("longmet").value.length)?$("longmet").value:' '; $("fullplace").value=$("metrop").value+":"+$("district").value+":"+$("gorod").value+":"+$("region").value+":"+$("longmet").value; fullchp=$("fullplace").value; $("thisplace").innerHTML=str; $("oncaseinn").style.paddingTop=10+'px'; valchp=$("takeplace").value; closeForm(); } function showRegForm(obj){ if($("falselog")) {$("falselog").style.display="none";$("falselog").innerHTML="";$("log").style.background="none";$("log").style.color="#ffffff";} $("falsepass").style.display="none";$("falsepass").innerHTML="";$("pass").style.background="none";$("pass").style.color="#ffffff"; $("falseconf").style.display="none";$("falseconf").innerHTML="";$("confpass").style.background="none";$("confpass").style.color="#ffffff"; $("falsepasss").style.display="none";$("falsepasss").innerHTML="";$("passs").style.background="none";$("passs").style.color="#ffffff"; $("falseconfs").style.display="none";$("falseconfs").innerHTML="";$("confpasss").style.background="none";$("confpasss").style.color="#ffffff"; if($("error_reg")){$("error_reg").style.display="none";$("error_reg").innerHTML="";} if($("beuser")){$("beuser").style.display="none";$("beuser").innerHTML="";} $("forgot_pass").style.display='none';$("forgot_pass").style.visibility='hidden'; $("falsemail").style.display="none";$("falsemail").innerHTML="";$("mail").style.background="none";$("mail").style.color="#ffffff"; $("avtor").style.visibility='hidden';$("avtor").style.display='none'; if(obj.id=='ui'){ $("shadow").style.left=0; //$("shadow").style.width='100%'; //$("shadow").style.height='100%'; $("shadow").style.zIndex=2; $("changetab").style.display='none';$("changetab").style.visibility='hidden'; $("regtab").style.display=(isIE)?'block':'table';$("regtab").style.visibility='visible'; if (isIE){ $("valbox").style.display='none'; $("arbox").style.display='none'; } $("hide").style.display="block"; $("hide").style.zIndex=5; $("hide").style.width='410px' $("hide").style.height='480px' $("hide").style.top='7px' $("hide").style.left='56%' $('fieldons').innerHTML='' } else if(obj.id=='chmydat'){ $("shadow").style.left=0; //$("shadow").style.width='100%'; //$("shadow").style.height='100%'; $("shadow").style.zIndex=2; $("regtab").style.display='none';$("regtab").style.visibility='hidden'; $("changetab").style.display=(isIE)?'block':'table';$("changetab").style.visibility='visible'; $("hide").style.display="block"; $("hide").style.zIndex=5; $("hide").style.width='410px' $("hide").style.height=(isIE)?'400px':'360px' $("hide").style.top='7px' $("hide").style.left='56%' $('fieldons').innerHTML='' $('fclose').innerHTML='' } if($("error_reg"))$("error_reg").style.display="none" $("error_auth").style.display='none' $("hidereg").style.display='block'; $("hidereg").visibility='visible'; $("hidereg").zIndex=4; document.forms.regform.reset(); } function getObj(obj) { this.get=get; this.post=post; function getTransport() { var obj; try {obj=new XMLHttpRequest()} catch(e) { try {obj=new ActiveXObject("Msxml2.XMLHTTP")} catch(e) { try {obj=new ActiveXObject("Microsoft.XMLHTTP")} catch(oc) {obj=null} } } return obj; } function get(url,response) { var transport=getTransport(); transport.open("GET",url,true); transport.onreadystatechange=function() { if(transport.readyState==4) { if((transport.status==200)||(transport.status==0)) { response(transport.responseText); } else {response("Ошибка получения данных:"+transport.status);}; } } transport.send(null); } function post(url,params,response) { var transport=getTransport(); transport.open("POST",url,true); transport.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); transport.setRequestHeader("Content-length", params.length); transport.setRequestHeader("Connection", "close"); transport.onreadystatechange=function() { if(transport.readyState==4) { if((transport.status==200)||(transport.status==0)) { response(transport.responseText); } else {response("Ошибка получения данных:"+transport.status);}; } } transport.send(params); } } var getObj=new getObj(); var code,codesid; var requests; function sendMain(obj){ obj.disabled=true; if(strchp!=''){ if(window.location.href.search(/give/)!=-1) var redir='/?log=give&strchp='+strchp+'&valchp='+valchp+'&fullchp='+fullchp; else var redir='/?log=take&strchp='+strchp+'&valchp='+valchp+'&fullchp='+fullchp; document.forms.main.setAttribute('action',redir); } document.forms.main.submit(); } function showZay(obj) { obj.disabled=true; if($("timeloc")) var times=encodeURI($("timeloc").value); else times=''; $("sendza").innerHTML='
'; requests="commit=no&header="+encodeURI($("header").value)+"&"+ "categor="+encodeURI($("Katal").value)+"&"+ "country="+encodeURI($("longmet").value)+"&"+ "district="+encodeURI($("district").value)+"&"+ "region="+encodeURI($("region").value)+"&"+ "gorod="+encodeURI($("gorod").value)+"&"+ "metropol="+encodeURI($("metrop").value)+"&"+ "timeloc="+times+"&"+ "fromsquare="+encodeURI($("fsq").value)+"&"+ "tillsquare="+encodeURI($("tsq").value)+"&"+ "fromexp="+encodeURI($("fexp").value)+"&"+ "tillexp="+encodeURI($("texp").value)+"&"+ "addtext="+encodeURI($("additive").value)+"&"+ "zasrok="+encodeURI($("zsrok").value)+"&"+ "zawsrok="+encodeURI($("zwsrok").value)+"&"+ "code="+encodeURI($("code").value)+"&"+ "code_sid="+encodeURI($("code_sid").value); tim=new Date(); getObj.post('/zayavki.php?t='+tim.getTime(),requests,function (inhtml) { html=inhtml.split("\n"); inhtml=inhtml.replace(html[0]+"\n"+html[1]+"\n","") if(html[0].substr(0,2)=='ok') { $("code_img").src="/bitrix/tools/captcha.php?captcha_sid="+html[1]; $("code_sid").value=html[1]; $("code").value=""; $("zayavka-add").innerHTML=''; $("comment-error").innerHTML=""; $("additive").value=""; $("container").style.display='block'; $("container").innerHTML=inhtml; $("conform").style.display='none'; } else { $("code_img").src="/bitrix/tools/captcha.php?captcha_sid="+html[1]; $("code_sid").value=html[1]; $("code").value=""; $("zayavka-add").innerHTML='' if(inhtml.substr(8)=='олучения данных:503') $("comment-error").innerHTML='
Ошибка получения данных:сервер перегружен (перезапустите браузер)
'; else $("comment-error").innerHTML='
'+inhtml+'
'; } obj.disabled=false; }); } function updatZay(obj){ obj.disabled=true; if($("timeloc")) var times=encodeURI($("timeloc").value); else times=''; $("sendza").innerHTML='
'; requests="commit=no&updat=yes&header="+encodeURI($("header").value)+"&"+ "zid="+encodeURI($("zayids").value)+"&"+ "categor="+encodeURI($("Katal").value)+"&"+ "country="+encodeURI($("longmet").value)+"&"+ "district="+encodeURI($("district").value)+"&"+ "region="+encodeURI($("region").value)+"&"+ "gorod="+encodeURI($("gorod").value)+"&"+ "metropol="+encodeURI($("metrop").value)+"&"+ "timeloc="+times+"&"+ "fromsquare="+encodeURI($("fsq").value)+"&"+ "tillsquare="+encodeURI($("tsq").value)+"&"+ "fromexp="+encodeURI($("fexp").value)+"&"+ "tillexp="+encodeURI($("texp").value)+"&"+ "addtext="+encodeURI($("additive").value)+"&"+ "zasrok="+encodeURI($("zsrok").value)+"&"+ "zawsrok="+encodeURI($("zwsrok").value)+"&"+ "code="+encodeURI($("code").value)+"&"+ "code_sid="+encodeURI($("code_sid").value); tim=new Date(); getObj.post('/zayavki.php?t='+tim.getTime(),requests,function (inhtml) { html=inhtml.split("\n"); inhtml=inhtml.replace(html[0]+"\n"+html[1]+"\n","") if(html[0].substr(0,2)=='ok') { $("code_img").src="/bitrix/tools/captcha.php?captcha_sid="+html[1]; $("code_sid").value=html[1]; $("code").value=""; $("zayavka-add").innerHTML=''; $("comment-error").innerHTML=""; $("additive").value=""; $("container").style.display='block'; $("container").innerHTML=inhtml; $("conform").style.display='none'; } else { $("code_img").src="/bitrix/tools/captcha.php?captcha_sid="+html[1]; $("code_sid").value=html[1]; $("code").value=""; $("zayavka-add").innerHTML='' if(inhtml.substr(8)=='олучения данных:503') $("comment-error").innerHTML='
Ошибка получения данных:сервер перегружен (перезапустите браузер)
'; else $("comment-error").innerHTML='
'+inhtml+'
'; } obj.disabled=false; }); } function addZay(obj){ obj.disabled=true; requests+="&"+"commit=yes&what=take"; tim=new Date(); getObj.post('/zayavki.php?t='+tim.getTime(),requests,function (inhtml) { html=inhtml.split("\n"); inhtml=inhtml.replace(html[0]+"\n"+html[1]+"\n","") if(html[0].substr(0,2)=='ok') { $("code_img").src="/bitrix/tools/captcha.php?captcha_sid="+html[1]; $("code_sid").value=html[1]; $("code").value=""; $("zayavka-add").innerHTML=''; $("comment-error").innerHTML=""; $("additive").value=""; $("allplaces").style.display="block"; $("country").style.visibility="hidden";$("country").style.display="none";$("longmet").value=''; $("regio").style.visibility="hidden";$("regio").style.display="none";$("region").value=''; $("city").style.visibility="hidden";$("city").style.display="none";$("gorod").value=''; $("okrug").style.visibility="hidden";$("okrug").style.display="none";$("district").value=''; $("metropolitan").style.visibility="hidden";$("metropolitan").style.display="none";$("metrop").value=''; $("metropolitan").style.display='none'; document.forms.addzavform.reset(); $("container").style.display='none'; $("container").innerHTML=inhtml; $("conform").style.display='block'; $("checkbase").innerHTML='Ваша заявка добавлена в базу' $("checkbase").style.background='#a40a0e'; window.document.location.replace('/privat.php?o=myzay&id='+html[2]); } else { $("code_img").src="/bitrix/tools/captcha.php?captcha_sid="+html[1]; $("code_sid").value=html[1]; $("code").value=""; $("zayavka-add").innerHTML='' $("comment-error").innerHTML='
'+inhtml.substr(8)+'
'; } obj.disabled=false; }); } function updaZay(obj){ obj.disabled=true; requests+="&"+"commit=yes&what=take&upda=yes"; tim=new Date(); //alert(requests) getObj.post('/zayavki.php?t='+tim.getTime(),requests,function (inhtml) { html=inhtml.split("\n"); inhtml=inhtml.replace(html[0]+"\n"+html[1]+"\n","") if(html[0].substr(0,2)=='ok') { $("code_img").src="/bitrix/tools/captcha.php?captcha_sid="+html[1]; $("code_sid").value=html[1]; $("code").value=""; $("zayavka-add").innerHTML=''; $("comment-error").innerHTML=""; $("additive").value=""; $("allplaces").style.display="block"; $("country").style.visibility="hidden";$("country").style.display="none";$("longmet").value=''; $("regio").style.visibility="hidden";$("regio").style.display="none";$("region").value=''; $("city").style.visibility="hidden";$("city").style.display="none";$("gorod").value=''; $("okrug").style.visibility="hidden";$("okrug").style.display="none";$("district").value=''; $("metropolitan").style.visibility="hidden";$("metropolitan").style.display="none";$("metrop").value=''; $("metropolitan").style.display='none'; document.forms.addzavform.reset(); $("container").style.display='none'; $("container").innerHTML=inhtml; $("conform").style.display='block'; $("checkbase").innerHTML='Ваша заявка отредактирована' $("checkbase").style.background='#a40a0e'; window.document.location.replace('/privat.php?o=myzay&id='+$("zayids").value); } else { $("code_img").src="/bitrix/tools/captcha.php?captcha_sid="+html[1]; $("code_sid").value=html[1]; $("code").value=""; $("zayavka-add").innerHTML='' $("comment-error").innerHTML='
'+inhtml.substr(8)+'
'; } obj.disabled=false; }); } function delZay(obj){ obj.disabled=true; var request="delete=true"; getObj.post('/zayavki.php',request,function (inhtml) { html=inhtml.split("\n"); inhtml=inhtml.replace(html[0]+"\n"+html[1]+"\n","") //alert(inhtml) $("code_img").src="/bitrix/tools/captcha.php?captcha_sid="+html[1]; $("code_sid").value=html[1]; $("container").style.display="none"; $("conform").style.display="block"; $("checkbase").innerHTML=''; $("checkbase").style.background='none' $("allplaces").style.display="block"; $("mesta").value="Начните ввод города или страны"; $("country").style.visibility="hidden";$("country").style.display="none";$("longmet").value=''; $("regio").style.visibility="hidden";$("regio").style.display="none";$("region").value=''; $("city").style.visibility="hidden";$("city").style.display="none";$("gorod").value=''; $("okrug").style.visibility="hidden";$("okrug").style.display="none";$("district").value=''; $("metropolitan").style.visibility="hidden";$("metropolitan").style.display="none";$("metrop").value=''; //document.forms.addzavform.reset(); if($("zayids")) $("zayavka-add").innerHTML='' else $("zayavka-add").innerHTML='' obj.disabled=false; }); } function updZay(obj){ obj.disabled=true; var request="update=true"; getObj.post('/zayavki.php',request,function (inhtml) { html=inhtml.split("\n"); inhtml=inhtml.replace(html[0]+"\n"+html[1]+"\n","") /*$("allplaces").style.display="block";$("mesta").value="Начните ввод города или страны"; $("country").style.visibility="hidden";$("country").style.display="none";$("longmet").value=''; $("regio").style.visibility="hidden";$("regio").style.display="none";$("region").value=''; $("city").style.visibility="hidden";$("city").style.display="none";$("gorod").value=''; $("okrug").style.visibility="hidden";$("okrug").style.display="none";$("district").value=''; $("metropolitan").style.visibility="hidden";$("metropolitan").style.display="none";$("metrop").value='';*/ $("code_img").src="/bitrix/tools/captcha.php?captcha_sid="+html[1]; $("code_sid").value=html[1]; $("container").style.display="none"; $("conform").style.display="block"; $("checkbase").innerHTML=''; $("checkbase").style.background='none' document.forms.addzavform.reset(); if($("zayids")) $("zayavka-add").innerHTML='' else $("zayavka-add").innerHTML='' obj.disabled=false; }); } function delZayav(obj){ obj.disabled=true; if(obj.id=="delzayav"){ if(isIE) var request="commit=fuck&delzay=true&nam="+obj.parentNode.previousSibling.childNodes[0].innerHTML; else request="commit=fuck&delzay=true&nam="+obj.parentNode.previousSibling.childNodes[1].innerHTML; } else{ if(isIE) var request="commit=fuck&delnew=true&nam="+obj.parentNode.previousSibling.previousSibling.childNodes[0].innerHTML; else request="commit=fuck&delnew=true&nam="+obj.parentNode.previousSibling.previousSibling.childNodes[0].innerHTML; } getObj.post('/zayavki.php',request,function (inhtml) { html=inhtml.split("\n"); inhtml=inhtml.replace(html[0]+"\n"+html[1]+"\n","") if(obj.id=="delzayav"){ if($("hideinfo").getElementsByTagName('TABLE').length=='1'){ //$("section-navigator").style.display='none'; //$('nozay').style.display="block"; window.location.reload(true) } $("hideinfo").removeChild(obj.parentNode.parentNode.parentNode.parentNode) } else{ if($("center-center").getElementsByTagName('TABLE').length=='1'){ //$("section-navigator").style.display='none'; $('nonews').style.display="block"; } $("center-center").removeChild(obj.parentNode.parentNode.parentNode.parentNode) } obj.disabled=false; }); } function delOffice(obj){ obj.disabled=true; var request="commit=fuck&deloff=true&nam="+obj.nextSibling.firstChild.innerHTML; getObj.post('/zayavki.php',request,function (inhtml) { html=inhtml.split("\n"); inhtml=inhtml.replace(html[0]+"\n"+html[1]+"\n","") if(countByClassName($("section-list"))=='1'){ //$("section-navigator").style.display='none'; //$("nozay").style.display="block"; window.location.reload(true) } $("section-list").removeChild(obj.parentNode); obj.disabled=false; }); } function Logout(obj){ obj.disabled=true; var request="islogout=yes"; getObj.post('/reg/index.php',request,function (inhtml){ html=inhtml.split("\n"); inhtml=inhtml.replace(html[0]+"\n"+html[1]+"\n","") //alert(inhtml) if(html[0].substr(0,2)=='ok') { $("fwel").innerHTML='' $("fwelcab").innerHTML='' $("autos").innerHTML='ВОЙТИ
'; if("presents") $("presents").innerHTML="Для размещения объявлений или отправки заявок необходимо авторизоваться.

Так же Вам станет доступен «Личный кабинет», где вы сможете просматривать и управлять своими заявками, отслеживать обновления на сайте." if($("hideinfo")) $("hideinfo").style.display='none'; if($("authreq")) $("authreq").style.display='block'; if($("divban")) $("divban").style.display='none'; if($("orders")) $("orders").style.display='none' if($("presents")) $("presents").style.display='block' $("speech").colSpan=1; if((window.location.href.search(/http:\/\/ofis\.ru\/privat\.php/)!=0)&&(window.location.href.search(/http:\/\/www\.ofis\.ru\/privat\.php/)!=0)){ if(window.location.href.search(/news/)==-1&&window.location.href.search(/search/)==-1&&window.location.href.search(/articles/)==-1&&window.location.href.search(/forum/)==-1){ if($("all")) $("all").style.display=(isIE)?'block':'table-cell'; if($("top")) $("top").style.display=(isIE)?'block':'table-cell'; if($("formainban")) $("formainban").style.display=(isIE)?'block':'table-cell'; if($("bottom")) $("bottom").style.display=(isIE)?'block':'table-cell'; if($("eleminfo")) $("eleminfo").style.display=(isIE)?'block':'table-cell'; } if($("middle")) $("middle").style.display=(isIE)?'block':'table-cell'; if($("hidinf")) $("hidinf").style.display=(isIE)?'none':'none'; } else{ if($("orders")) $("orders").style.display='none' if($("presents")) $("presents").style.display='block' //if($("formainban")) $("formainban").style.display=(isIE)?'block':'table-cell'; } }; obj.disabled=false; }); } function GetRegister(obj){ obj.disabled=true; $("fieldons").innerHTML=''; if(obj.id=='regmaz') var request="isregistr=yes"+"&"+ "REGISTER[LOGIN]="+encodeURI($("reg_log").value)+"&"+ "REGISTER[PASSWORD]="+encodeURI($("reg_pass").value)+"&"+ "REGISTER[CONFIRM_PASSWORD]="+encodeURI($("reg_conf").value)+"&"+ "REGISTER[EMAIL]="+encodeURI($("reg_email").value)+"&"+ "first_name="+encodeURI($("fname").value)+"&"+ "last_name="+encodeURI($("lname").value)+"&"+ "captcha_word="+encodeURI($("buz_code").value)+"&"+ "code_sids="+encodeURI($("code_sida").value)+"&"+ "third_name="+encodeURI($("fhood").value)+"&"+ "addr="+encodeURI($("adress").value)+"&"+ "phone="+encodeURI($("phone").value)+"&"+ "dopinf="+encodeURI($("dopinfo").value); else var request="ischange=yes"+"&"+ "REGISTER[PASSWORD]="+encodeURI($("reg_passs").value)+"&"+ "REGISTER[CONFIRM_PASSWORD]="+encodeURI($("reg_confs").value)+"&"+ "REGISTER[EMAIL]="+encodeURI($("reg_emails").value)+"&"+ "first_name="+encodeURI($("fnames").value)+"&"+ "last_name="+encodeURI($("lnames").value)+"&"+ "third_name="+encodeURI($("fhoods").value)+"&"+ "addr="+encodeURI($("adresss").value)+"&"+ "phone="+encodeURI($("phones").value)+"&"+ "dopinf="+encodeURI($("dopinfos").value); getObj.post('/reg/index.php',request,function (inhtml) { html=inhtml.split("\n"); inhtml=inhtml.replace(html[0]+"\n"+html[1]+"\n","") if(html[0].substr(0,2)=='ok') { if($("code_imga")){ $("code_imga").src="/bitrix/tools/captcha.php?captcha_sid="+html[1]; $("code_sida").value=html[1]; $("buz_code").value=""; } $("hideplace").id="trust"; closeForm(); if(obj.id=='regmaz'){ $("fwel").innerHTML='Добро пожаловать,'+ $("reg_log").value +'!' $("fwelcab").innerHTML='Личный кабинет' $("autos").innerHTML='ВЫЙТИ'; if($("bottom")) $("bottom").style.display='none'; if($("divban")) $("divban").style.display='block'; if($("eleminfo")) $("eleminfo").style.display=(isIE)?'none':'none'; if($("hidinf")) $("hidinf").style.display=(isIE)?'block':'table-cell'; } if($("hideinfo")) window.location.reload(true); else window.document.location.replace('/privat.php') } else { if(isIE) $("hide").style.height=620+'px'; else $("hide").style.height=500+'px'; if($("code_imga")){ $("code_imga").src="/bitrix/tools/captcha.php?captcha_sid="+html[1]; $("code_sida").value=html[1]; $("buz_code").value=""; } if(obj.id=='regmaz'){ if(html[1].indexOf('Логин слишком короткий'+1)){if($("falselog")){$("falselog").style.display="block";$("falselog").innerHTML="Логин слишком короткий";$("hide").style.height=$("hide").offsetHeight-15;$("log").style.background="#a40a0e";$("log").style.color="#ffffff"}} if(html[1].indexOf('Логин слишком короткий')*1==-1) {if($("falselog")){$("falselog").style.display="none";$("falselog").innerHTML="";$("hide").style.height=$("hide").offsetHeight-3;$("log").style.background="none";$("log").style.color="#ffffff"}} if(html[1].indexOf('Пароль слишком короткий'+1)){$("falsepass").style.display="block";$("falsepass").innerHTML="Пароль слишком короткий";$("hide").style.height=$("hide").offsetHeight-15;$("pass").style.background="#a40a0e";$("pass").style.color="#ffffff"} if(html[1].indexOf('Пароль слишком короткий')*1==-1){$("falsepass").style.display="none";$("falsepass").innerHTML="";$("hide").style.height=$("hide").offsetHeight-3;$("pass").style.background="none";$("pass").style.color="#ffffff"} if(html[1].indexOf('Неправильное подтверждение пароля'+1)){$("falseconf").style.display="block";$("falseconf").innerHTML="Неправильное подтверждение пароля";$("hide").style.height=$("hide").offsetHeight-15;$("confpass").style.background="#a40a0e";$("confpass").style.color="#ffffff"} if(html[1].indexOf('Неправильное подтверждение пароля')*1==-1){$("falseconf").style.display="none";$("falseconf").innerHTML="";$("hide").style.height=$("hide").offsetHeight-3;$("confpass").style.background="none";$("confpass").style.color="#ffffff"} if(html[2].indexOf('Слово для защиты от автоматической регистрации введено неверно'+1)){if($("error_reg")){$("error_reg").style.display="block";$("error_reg").innerHTML="Значение поля Введите код введено неверно";$("hide").style.height=$("hide").offsetHeight-15}} if(html[2].indexOf('Слово для защиты от автоматической регистрации введено неверно')*1==-1){if($("error_reg")){$("error_reg").style.display="none";$("error_reg").innerHTML="";$("hide").style.height=$("hide").offsetHeight-3}} if(html[1].indexOf('Введите e-mail'+1)){$("falsemail").style.display="block";$("falsemail").innerHTML="Введите e-mail";$("hide").style.height=$("hide").offsetHeight-15;$("mail").style.background="#a40a0e";$("mail").style.color="#ffffff"} if(html[1].indexOf('Введите e-mail')*1==-1){$("falsemail").style.display="none";$("falsemail").innerHTML="";$("hide").style.height=$("hide").offsetHeight-3;$("mail").style.background="none";$("mail").style.color="#ffffff"} if(html[2].indexOf('Пользователь'+1)){if($("beuser")){$("beuser").style.display="block";$("beuser").innerHTML=html[2];$("hide").style.height=$("hide").offsetHeight-15}} if(html[2].indexOf('Пользователь')*1==-1){if($("beuser")){$("beuser").style.display="none";$("beuser").innerHTML="";$("hide").style.height=$("hide").offsetHeight-3}} } else{ if(html[1].indexOf('Пароль слишком короткий'+1)){$("falsepasss").style.display="block";$("falsepasss").innerHTML="Пароль слишком короткий";$("hide").style.height=$("hide").offsetHeight-65;$("passs").style.background="#a40a0e";$("pass").style.color="#ffffff"} if(html[1].indexOf('Пароль слишком короткий')*1==-1){$("falsepasss").style.display="none";$("falsepasss").innerHTML="";$("hide").style.height=$("hide").offsetHeight-3;$("passs").style.background="none";$("passs").style.color="#ffffff"} if(html[1].indexOf('Неправильное подтверждение пароля'+1)){$("falseconfs").style.display="block";$("falseconfs").innerHTML="Неправильное подтверждение пароля";$("hide").style.height=$("hide").offsetHeight-65;$("confpasss").style.background="#a40a0e";$("confpasss").style.color="#ffffff"} if(html[1].indexOf('Неправильное подтверждение пароля')*1==-1){$("falseconfs").style.display="none";$("falseconfs").innerHTML="";$("hide").style.height=$("hide").offsetHeight-3;$("confpasss").style.background="none";$("confpasss").style.color="#ffffff"} } if(obj.id=='regmaz') $("fieldons").innerHTML=''; else $("fieldons").innerHTML=''; } obj.disabled=false; }); } function GetAuth(obj){ obj.disabled=true; $('entr').innerHTML=''; if($("error_auth").style.display=='block'){ var dis=(isIE)?0:30 $("hide").style.height=($("hide").offsetHeight-$("error_auth").offsetHeight-dis)+'px' $("error_auth").style.display='none' } var check=(document.enterform.USER_REMEMBER.checked)?"Y":"N" var request="islogin=yes"+"&"+ "USER_LOGIN="+encodeURI($("USER_LOGIN").value)+"&"+ "USER_PASSWORD="+encodeURI($("USER_PASSWORD").value)+"&"+ "USER_REMEMBER="+check; getObj.post('/reg/index.php',request,function (inhtml) { html=inhtml.split("\n"); inhtml=inhtml.replace(html[0]+"\n"+html[1]+"\n","") //alert(inhtml) if(html[0].substr(0,2)=='ok') { closeForm(); $("fwel").innerHTML='Добро пожаловать,'+ $("USER_LOGIN").value +'!' $("fwelcab").innerHTML='Личный кабинет' $("autos").innerHTML='ВЫЙТИ'; $("entr").innerHTML=''; /*if(window.location.href.search(/news/)!=-1&&window.location.href.search(/articles/)!=-1&&window.location.href.search(/forum/)!=-1){ if($("formainban")) $("formainban").style.display='none'; if($("speech")) $("speech").style.display='none'; if($("all")) $("all").style.display='none'; if($("top")) $("top").style.display='none'; }*/ if(window.location.href.search(/news/)==-1&&window.location.href.search(/articles/)==-1&&window.location.href.search(/forum/)==-1){ if($("bottom")) $("bottom").style.display='none'; if($("divban")) $("divban").style.display='block'; if($("eleminfo")) $("eleminfo").style.display=(isIE)?'none':'none'; if($("hidinf")) $("hidinf").style.display=(isIE)?'block':'table-cell'; } if($("hideinfo")) {window.location.reload(true);} else{ window.document.location.replace('/privat.php') } } else { $("entr").innerHTML=''; $("error_auth").style.display='block' $("avtor").style.height=82+"%"; $("error_auth").innerHTML='Неверный логин или пароль' $("hide").style.height=$("hide").offsetHeight+$("error_auth").offsetHeight; if($("code_imga")){ $("code_imga").src="/bitrix/tools/captcha.php?captcha_sid="+html[1]; $("code_sida").value=html[1]; $("buz_code").value=""; } } obj.disabled=false; }); } function iForgot(){ $("avtor").style.display='none' document.forms.enterform.reset(); $("forgot_login").value=''; $("forgot_email").value=''; $("forgot_pass").style.display='block' $("forgot_pass").style.visibility='visible' } function sendPass(obj){ $("linkforgot").innerHTML='
'; obj.disabled=true; var request="forgot_pass=yes"+"&"+ "LOGIN="+encodeURI($("forgot_login").value)+"&"+ "EMAIL="+encodeURI($("forgot_email").value); getObj.post('/reg/index.php',request,function(inhtml){ html=inhtml.split("\n"); inhtml=inhtml.replace(html[0]+"\n"+html[1]+"\n","") //alert(inhtml) if(html[0].substr(0,2)=='ok'){ $("messagesend").innerHTML="Контрольная строка для смены пароля отправлена на указанный email" $("linkforgot").style.display='none'; } else{ $("messagesend").innerHTML="Введённые логин(email) не найдены"; $("forlinkforgot").innerHTML=""; } obj.disabled=false; }); } function changepass(obj){ obj.disabled=true; $("changepa").innerHTML='
'; var request="change_password=yes"+"&"+ "changelog="+encodeURI($("changelog").value)+"&"+ "changepass="+encodeURI($("changepassword").value)+"&"+ "changeconf="+encodeURI($("confchangepass").value)+"&"+ "check_word="+encodeURI($("check_word").value); getObj.post('/reg/index.php',request,function(inhtml){ html=inhtml.split("\n"); inhtml=inhtml.replace(html[0]+"\n"+html[1]+"\n","") if(html[0].substr(0,2)=='ok'){ $("sendmess").innerHTML="Пароль успешно сменён, Вы можете авторизоваться используя новый пароль" $("changepa").style.display='none'; } else{ $("sendmess").innerHTML=inhtml $("forchangepa").innerHTML='' } obj.disabled=false; }); } function countByClassName(obj){ var count=0; for(var i=0;i