<script type="text/javascript"> // <![CDATA[ var us_msg = {missing: "Вы не заполнили поле "%s"", invalid: "Недопустимое значение поля: "%s"", email_or_phone: "Вы не написали свой адресс электронной почты и телефон", no_list_ids: "Не выбрано ни одного списка рассылки"}; var us_emailRegexp = /^[a-zA-Z0-9_+=-]+[a-zA-Z0-9._+=-]*@[a-zA-Z0-9][a-zA-Z0-9-]*(.[a-zA-Z0-9]([a-zA-Z0-9-]+))*.([a-zA-Z]{2,6})$/; var us_phoneRegexp = /^s*[d +()-.]{7,32}s*$/; if (typeof us_ == 'undefined') { var us_ = new function() { var onLoadCalled = false; var onLoadOld = window.onload; window.onload = function() { us_.onLoad(); }; var onResizeOld = null; var popups = []; function autodetectCharset(form) { var ee = form.getElementsByTagName('input'); for (var i = 0; i < ee.length; i++) { var e = ee[i]; if (e.getAttribute('name') == 'charset') { if (e.value == '') { // http://stackoverflow.com/questions/318831 e.value = document.characterSet ? document.characterSet : document.charset; } return; } } } function createAndShowPopup(form) { var d = document; // outerHTML(): http://stackoverflow.com/questions/1700870 var e = d.createElement('div'); e.style.position = 'absolute'; e.style.width = 'auto'; e = d.body.appendChild(e); e.appendChild(form); form.style.display = ''; popups.push(e); } function centerAllPopups() { // Multiple popups will overlap, but nobody cares until somebody cares. var w = window; var d = document; var ww = w.innerWidth ? w.innerWidth : d.body.clientWidth; var wh = w.innerHeight ? w.innerHeight : d.body.clientHeight; for (var i = 0; i < popups.length; i++) { var e = popups[i]; var ew = parseInt(e.offsetWidth + ''); var eh = parseInt(e.offsetHeight + ''); e.style.left = (ww - ew) / 2 + d.body.scrollLeft + (i * 10); e.style.top = (wh - eh) / 2 + d.body.scrollTop + (i * 10); } } this.onLoad = function() { var i; var ffl = document.getElementsByTagName('form'); var ff = []; // NodeList changes while we move form to different parent; preload into array. for (i = 0; i < ffl.length; i++) { ff.push(ffl[i]); } for (i = 0; i < ff.length; i++) { var f = ff[i]; var a = f.getAttribute('us_mode'); if (!a) { continue; } if (a == 'popup') { createAndShowPopup(f); } autodetectCharset(f); } // console.log(popups); centerAllPopups(); onResizeOld = window.onresize; window.onresize = function() { us_.onResize(); }; onLoadCalled = true; if (onLoadOld) { onLoadOld(); } }; this.onResize = function() { centerAllPopups(); if (onResizeOld) { onResizeOld(); } }; this.onSubmit = function(form) { if (!onLoadCalled) { alert('us_.onLoad() has not been called'); return false; } function trim(s) { return s == null ? '' : s.replace(/^ss*/, '').replace(/ss*$/, ''); } var d = document; var ee, i, e, n, v, r, k, b1, b2; var hasEmail = false; var hasPhone = false; ee = form.getElementsByTagName('input'); for (i = 0; i < ee.length; i++) { e = ee[i]; n = e.getAttribute('name'); if (!n || e.getAttribute('type') != 'text') { continue; } v = trim(e.value); if (v == '') { k = e.getAttribute('_required'); if (k == '1') { alert(us_msg['missing'].replace('%s', e.getAttribute('_label'))); e.focus(); return false; } continue; } if (n == 'email') { hasEmail = true; } else if (n == 'phone') { hasPhone = true; } k = e.getAttribute('_validator'); r = null; switch (k) { case null: case '': break; case 'email': r = us_emailRegexp; break; case 'phone': r = us_phoneRegexp; break; case 'float': r = /^[+-]?d+(.d+)?$/; break; default: alert('Internal error: unknown validator "' + k + '"'); e.focus(); return false; } if (r && !r.test(v)) { alert(us_msg['invalid'].replace('%s', e.getAttribute('_label'))); e.focus(); return false; } } if (!hasEmail && !hasPhone) { alert(us_msg['email_or_phone']); return false; } ee = form.getElementsByTagName('input'); b1 = false; b2 = false; for (i = 0; i < ee.length; i++) { e = ee[i]; if (e.getAttribute('name') != 'list_ids[]') { continue; } b1 = true; if (e.checked) { b2 = true; break; } } if (b1 && !b2) { alert(us_msg['no_list_ids']); return false; } return true; }; }; } // ]]> </script> <table> <tr> <td> <form style="width:300px; min-height:200px; border:0px solid #000000; background-color:#FFFFFF; padding:7px; text-align:center" method="post" action="http://cp.unisender.com/ru/subscribe?hash=59etw1zwkzur4bzxy6itm4nrwbepeqzsgfrt91jy" onsubmit="return us_.onSubmit(this);" us_mode="embed"> <table style="display:inline-table;*display:inline" align="center" height="200" width="200" cellpadding="2" cellspacing="1"> <tr> <td border="0" align="left" valign="middle"> <h2>Email:</h2> </td> <td > <input type="text" name="email" value="" _required="1" _validator="email" _label="Email" class="us_input" size="20"/> </td> </tr> <tr> <td border="0" align="left" valign="middle"> <h2>Имя:</h2> </td> <td > <input type="text" name="f_1709742" value="" _required="1" _validator="" _label="Имя" class="us_input" size="20"/> </td> </tr> <tr> <td align="center" colspan="2"> <input type="submit" value="" class="us_submit" style="width: 180px; height: 60px; border: 0pt none; background: url(images/get.png) no-repeat scroll 0% 0% transparent; cursor:pointer;"/> </td> </tr> <input type="hidden" name="charset" value="utf-8"> <input type="hidden" name="default_list_id" value="936203"/> </table> </form> </td> <td> <ol> <li><p>Попробуйте <strong>полный функционал бесплатно</strong> в течение 7 дней! <li><p>Получите <strong>обучающие материалы</strong> для начала работы в LeaderTask! <li><p>Применяйте <strong>полезные статьи и видео</strong> о повышении <br /> личной эффективности!</p> </ol> </td> </tr> </table> <p> После регистрации на ваш емайл придет письмо с информацией о начале работы с органайзером LeaderTask. </p>