function do_request(){name=$("#fio").val();phone=$("#phone").val();time=$("#time").val();name==""||name==null?(alert("\u0412\u0432\u0435\u0434\u0456\u0442\u044c \u0412\u0430\u0448\u0435 \u0456\u043c'\u044f \u0431\u0443\u0434\u044c \u043b\u0430\u0441\u043a\u0430!"),$("#fio").focus()):phone==""||phone==null?(alert("\u0412\u0432\u0435\u0434\u0456\u0442\u044c \u043d\u043e\u043c\u0435\u0440 \u0432\u0430\u0448\u043e\u0433\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0443 \u0431\u0443\u0434\u044c \u043b\u0430\u0441\u043a\u0430!"), $("#phone").focus()):post_get_back_call("mode=backcall&name="+name+"&time="+time+"&phone="+phone,"mods/call_back/get_back_call.php")} function post_get_back_call(b,c){$.ajax({url:c,data:b,type:"POST",dataType:"html",success:function(a){a.split("<!>")[0]=="Ok"?(alert(" \u0414\u0437\u0432\u0456\u043d\u043e\u043a \u0443\u0441\u043f\u0456\u0448\u043d\u043e \u0437\u0430\u043c\u043e\u0432\u043b\u0435\u043d\u043e! \n \u0417 \u0432\u0430\u043c\u0438 \u0437\u0432'\u044f\u0436\u0443\u0442\u044c\u0441\u044f \u043d\u0430\u0439\u0431\u043b\u0438\u0436\u0447\u0438\u043c \u0447\u0430\u0441\u043e\u043c."),$("#smoke").remove(),$("#back_call_conteiner_").remove()): alert("\u0412\u0438\u043d\u0438\u043a\u043b\u0430 \u043f\u043e\u043c\u0438\u043b\u043a\u0430 ! "+a.split("<!>")[1])}})}function remove_call_dialog(){$("#smoke").remove();$("#back_call_conteiner_").remove()} function show_back_call_dialog(){dialog_box='<div id="back_call_conteiner_" align="center">';dialog_box+='<div id="back_call_conteiner" align="center">';dialog_box+=' <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" align="left">';dialog_box+=" <tr>";dialog_box+=" <td>";dialog_box+=' <span class="in_back_call">\u0412\u0430\u0448\u0435 \u0456\u043c\'\u044f:</span><br />';dialog_box+=' <input class="in_back_call_input" name="fio" id="fio" type="text" />'; dialog_box+=" <br />";dialog_box+=' <span class="in_back_call">\u0417\u0440\u0443\u0447\u043d\u0438\u0439 \u0447\u0430\u0441 \u0434\u043b\u044f \u0434\u0437\u0432\u0456\u043d\u043a\u0430:</span><br />';dialog_box+=' <input class="in_back_call_input" name="time" id="time" type="text" align="middle"/>';dialog_box+=" <br />";dialog_box+=' <span class="in_back_call">\u0412\u0430\u0448 \u043d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0443:</span><br />'; dialog_box+=' <input class="in_back_call_input" name="phone" id="phone" type="text" align="middle"/>';dialog_box+=" </td>";dialog_box+=' <td align="center" valign="middle">';dialog_box+=' \t <img src="/mods/call_back/img/close_small_btn1.png" style="position: absolute; margin-top: -15px; margin-left: +25px; cursor: pointer;" alt="\u0417\u0430\u043a\u0440\u0438\u0442\u0438" title="\u0417\u0430\u043a\u0440\u0438\u0442\u0438" onclick="remove_call_dialog();" />';dialog_box+= ' <div id="btn_request" onclick="do_request()";><img src="/mods/call_back/img/btn_call.png" width="100" height="100" alt="\u0417\u0430\u043c\u043e\u0432\u0438\u0442\u0438 \u0434\u0437\u0432\u0456\u043d\u043e\u043a" title="\u0417\u0430\u043c\u043e\u0432\u0438\u0442\u0438 \u0434\u0437\u0432\u0456\u043d\u043e\u043a" /></div>';dialog_box+=" </td>";dialog_box+=" </tr>";dialog_box+=" </table>";dialog_box+='<style type="text/css">';dialog_box+="\t.in_back_call {";dialog_box+="\t\tfont-family: Verdana;"; dialog_box+="\t\tfont-size: 12px;";dialog_box+="\t\tfont-weight: bold;";dialog_box+="\t}";dialog_box+="\t.in_back_call_input {";dialog_box+="\t\t-webkit-border-radius: 7px; -moz-border-radius: 7px; -khtml-border-radius: 7px; border-radius: 7px;";dialog_box+="\t\tborder: 1px solid #999;";dialog_box+="\t\tfont-size: 16px;";dialog_box+="\t\tfont-family: Verdana;";dialog_box+="\t\theight: 20px;";dialog_box+="\t\tpadding: 2px;";dialog_box+="\t}";dialog_box+="\t#fio {";dialog_box+="\t\tcolor: blue;";dialog_box+= "\t}";dialog_box+="\t#phone {";dialog_box+="\t\tcolor: green;";dialog_box+="\t\tfont-weight: bold;";dialog_box+="\t}";dialog_box+="\t#btn_request {";dialog_box+="\t\theight: 100px;";dialog_box+="\t\twidth: 100px;";dialog_box+="\t\tmargin-top: 7px;";dialog_box+="\t\tdisplay: block;";dialog_box+="\t\tcursor: pointer;";dialog_box+="\t}";dialog_box+="\t#back_call_conteiner {";dialog_box+="\t\twidth: 371px;";dialog_box+="\t\theight: 130px;";dialog_box+="\t\tpadding: 7px;";dialog_box+="\t\tbackground: #EEE;"; dialog_box+="\t\tborder: 1px solid #999;";dialog_box+="\t\tposition:absolute; top:50%; left:35%;";dialog_box+="\t\tz-index: 100;";dialog_box+="\t\t-webkit-border-radius: 7px; -moz-border-radius: 7px; -khtml-border-radius: 7px; border-radius: 7px;";dialog_box+="\t}";dialog_box+="</style>";dialog_box+="</div>";document.body.innerHTML+='<div id="smoke" style="width:400%; height:400%; display:block; background:#000; top:1px; left:1px; opacity: 0.5; z-index:99; position:absolute; opacity: 0.8;"></div>'+ dialog_box};
