function trim(str, chars) { return ltrim(rtrim(str, chars), chars); } function ltrim(str, chars) { chars = chars || "\\s"; return str.replace(new RegExp("^[" + chars + "]+", "g"), ""); } function rtrim(str, chars) { chars = chars || "\\s"; return str.replace(new RegExp("[" + chars + "]+$", "g"), ""); } function CheckForm(){ var error = ''; if (trim(document.all["fio"].value)=="") { error = error + 'Пожалуйста, заполните поле "ФИО"\n'; } if (trim(document.all["phone"].value)=="") { error = error + 'Пожалуйста, заполните поле "Телефон"\n'; } if (trim(document.all["question"].value)=="") { error = error + 'Пожалуйста, заполните поле "Вопрос/Заявка"\n'; } if (error!="") { alert(error); } else { get(document.getElementById('leaderx')); } } var http_request = false; function makePOSTRequest(url, parameters) { http_request = false; if (window.XMLHttpRequest) { // Mozilla, Safari,... http_request = new XMLHttpRequest(); if (http_request.overrideMimeType) { // set type accordingly to anticipated content type //http_request.overrideMimeType('text/xml'); http_request.overrideMimeType('text/html'); } } else if (window.ActiveXObject) { // IE try { http_request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { http_request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } if (!http_request) { alert('Cannot create XMLHTTP instance'); return false; } http_request.onreadystatechange = alertContents; http_request.open('POST', url, true); http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); http_request.setRequestHeader("Content-length", parameters.length); http_request.setRequestHeader("Connection", "close"); http_request.send(parameters); } function alertContents() { if (http_request.readyState == 4) { if (http_request.status == 200) { result = http_request.responseText; document.getElementById('leed').innerHTML = result; } else { alert('There was a problem with the request.'); } } } function get(obj) { var poststr = "myname=" + encodeURI( document.getElementById("fio").value ) + "&myphone=" + encodeURI( document.getElementById("phone").value ) + "&mycity=" + encodeURI( document.getElementById("city").value ) + "&myquestion=" + encodeURI( document.getElementById("question").value ); makePOSTRequest('/xleader.php', poststr); } document.write('
'); document.write('

Ремонтные работы.


'); document.write('Наша компания работает на рынке ремонтных работ уже более пяти лет. Наши специалисты окажут вам любую консультацию, бесплатно выедут для замеров и оценки работ. Без сомнения, у нас лучшие цены на рынке Москвы и области! Мы обладаем собственным производством плёнки ПВХ, поэтому любые работы связанные с ней (натяжные потолки, пластиковые окна), Вы получите по ценам производителя, без рыночных наценок и несправедливых накруток!
'); document.write('Заполните онлайн-форму, и наш специалист свяжется с вами в кротчайшие сроки.
'); document.write('Обратившись в нашу компанию, Вы надолго останетесь с нами и будете рекомендовать нас Вашим друзьям и коллегам!



'); document.write(''); document.write(''); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(''); document.write('
Консультации по ремонту OnLine!
* ФИО:
* Телефон:
* Город:
* Вопрос/Заявка:
'); document.write('');