function gotoform(k){ var formname= 'form_'+k; document.getElementById('loadImg').style.display = 'block'; document.getElementById(formname).submit(); document.getElementById('loadImg').style.display = 'none'; } function fokus_street(){ document.getElementById('street').focus(); document.getElementById('street').style.backgroundColor = '#FFCC00'; } function clearvalue(id,p1){ if(document.getElementById(id).value==p1) document.getElementById(id).value=''; } function setvalue(id,p1){ if(document.getElementById(id).value=='')document.getElementById(id).value=p1; } function checksubscrinput(){ var def_color_cname = document.getElementById('emailscribe').style.backgroundColor; var blue_color = "#ffcc00"; var emal = document.getElementById('emailscribe').value; var template = /^[A-Za-z0-9](([_\.\-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z])+$/; if(emal==''){ document.getElementById('emailscribe').focus(); document.getElementById('emailscribe').style.backgroundColor = blue_color; return 0; }else{ if(template.test(emal)) { HideSubscribe2(); return 1; }else{ document.getElementById('emailscribe').focus(); document.getElementById('emailscribe').style.backgroundColor = blue_color; return 0; } } } function addprovv(){ var def_color_cname = document.getElementById('namerus').style.backgroundColor; var blue_color = "#ffcc00"; if(document.getElementById('namerus').value==''){ document.getElementById('namerus').focus(); document.getElementById('namerus').style.backgroundColor = blue_color; } else if(document.getElementById('nameeng').value==''){ document.getElementById('nameeng').focus(); document.getElementById('nameeng').style.backgroundColor = blue_color; } else if(document.getElementById('website').value==''){ document.getElementById('website').focus(); document.getElementById('website').style.backgroundColor = blue_color; }else if(document.getElementById('telprov').value==''){ document.getElementById('telprov').focus(); document.getElementById('telprov').style.backgroundColor = blue_color; }else{ document.getElementById('namerus').style.backgroundColor = def_color_cname; document.getElementById('nameeng').style.backgroundColor = def_color_cname; document.getElementById('website').style.backgroundColor = def_color_cname; document.getElementById('telprov').style.backgroundColor = def_color_cname; document.getElementById('redform').submit(); } } function selectcity(){ if (document.getElementById('dropdown1').style.display == "none") document.getElementById('dropdown1').style.display = "block"; else document.getElementById('dropdown1').style.display = "none"; } function setcomment(){ document.getElementById('commentadd').disabled=false; if (document.getElementById('formcomment').style.display == "block")document.getElementById('formcomment').style.display = "none"; else {document.getElementById('formcomment').style.display = "block" document.getElementById('nametocom').focus();} } function reddescr(){ document.getElementById('descrform').style.display = "none"; document.getElementById('descrres').style.display = "block"; } function HideSubscribe1(){ document.getElementById('subscribebuton').style.display = "none"; document.getElementById('subscribeform').style.display = "block"; } function HideSubscribe2(){ document.getElementById('subscribebuton').style.display = "block"; document.getElementById('subscribeform').style.display = "none"; } function HideChangePassword(){ document.getElementById('ChangePassword').style.display = "none"; document.getElementById('MainAutor').style.display = "block"; } function HideMainAut(){ document.getElementById('MainAutor').style.display = "none"; document.getElementById('ChangePassword').style.display = "block"; document.getElementById('ChangePassword').style = "current"; } function forcheckadr(){ document.getElementById('street').value = "Улица"; document.getElementById('house').value = "Дом"; document.getElementById('flat').value = "Квартира"; document.getElementById('zform').style.display = "none"; document.getElementById('formadr').style.display = "block"; document.getElementById('content_result').innerHTML = ""; document.getElementById('content_otherprov').innerHTML = ""; document.getElementById('content_otherprov').style.display = "none"; } function ChangeVal(this_id){ document.getElementById(this_id).style.backgroundColor = "#ffffff"; } function mklikchpass(){ var def_color_cname = document.getElementById('passnew1').style.backgroundColor; var blue_color = "#ffcc00"; if(document.getElementById('passnew1').value==''){ document.getElementById('passnew1').focus(); document.getElementById('passnew1').style.backgroundColor = blue_color; }else if(document.getElementById('passnew2').value==''){ document.getElementById('passnew2').focus(); document.getElementById('passnew2').style.backgroundColor = blue_color; } else{ if(document.getElementById('passnew1').value!=document.getElementById('passnew2').value){ document.getElementById('passnew1').style.backgroundColor = blue_color; document.getElementById('passnew2').style.backgroundColor = blue_color; alert("Пароли не совпадают! Повторите попытку!"); }else{ document.getElementById('passnew1').style.backgroundColor = def_color_cname; document.getElementById('passnew2').style.backgroundColor = def_color_cname; document.getElementById('changepass').submit(); } } } function mklikprov(){ var def_color_cname = document.getElementById('namerus').style.backgroundColor; var blue_color = "#ffcc00"; if(document.getElementById('namerus').value==''){ document.getElementById('namerus').focus(); document.getElementById('namerus').style.backgroundColor = blue_color; }else if(document.getElementById('nameeng').value==''){ document.getElementById('nameeng').focus(); document.getElementById('nameeng').style.backgroundColor = blue_color; }else if(document.getElementById('website').value==''){ document.getElementById('website').focus(); document.getElementById('website').style.backgroundColor = blue_color; } else if(document.getElementById('telprov').value==''){ document.getElementById('telprov').focus(); document.getElementById('telprov').style.backgroundColor = blue_color; }else{ document.getElementById('namerus').style.backgroundColor = def_color_cname; document.getElementById('nameeng').style.backgroundColor = def_color_cname; document.getElementById('website').style.backgroundColor = def_color_cname; document.getElementById('telprov').style.backgroundColor = def_color_cname; if(document.getElementById('rayon_admiraltejskij').checked==true) document.getElementById('rayon_admiraltejskij').value='1'; else document.getElementById('rayon_admiraltejskij').value='0'; if(document.getElementById('rayon_kirovskij').checked==true) document.getElementById('rayon_kirovskij').value='1'; else document.getElementById('rayon_kirovskij').value='0'; if(document.getElementById('rayon_kronshtadskij').checked==true) document.getElementById('rayon_kronshtadskij').value='1'; else document.getElementById('rayon_kronshtadskij').value='0'; if(document.getElementById('rayon_petrogradskij').checked==true) document.getElementById('rayon_petrogradskij').value='1'; else document.getElementById('rayon_petrogradskij').value='0'; if(document.getElementById('rayon_frunzenskij').checked==true) document.getElementById('rayon_frunzenskij').value='1'; else document.getElementById('rayon_frunzenskij').value='0'; if(document.getElementById('rayon_vasileostrovskij').checked==true) document.getElementById('rayon_vasileostrovskij').value='1'; else document.getElementById('rayon_vasileostrovskij').value='0'; if(document.getElementById('rayon_kolpinskij').checked==true) document.getElementById('rayon_kolpinskij').value='1'; else document.getElementById('rayon_kolpinskij').value='0'; if(document.getElementById('rayon_kurortnyj').checked==true) document.getElementById('rayon_kurortnyj').value='1'; else document.getElementById('rayon_kurortnyj').value='0'; if(document.getElementById('rayon_petrodvorcovyj').checked==true) document.getElementById('rayon_petrodvorcovyj').value='1'; else document.getElementById('rayon_petrodvorcovyj').value='0'; if(document.getElementById('rayon_centralnyj').checked==true) document.getElementById('rayon_centralnyj').value='1'; else document.getElementById('rayon_centralnyj').value='0'; if(document.getElementById('rayon_vyborgskij').checked==true) document.getElementById('rayon_vyborgskij').value='1'; else document.getElementById('rayon_vyborgskij').value='0'; if(document.getElementById('rayon_krasnogvardejskij').checked==true) document.getElementById('rayon_krasnogvardejskij').value='1'; else document.getElementById('rayon_krasnogvardejskij').value='0'; if(document.getElementById('rayon_moskovskij').checked==true) document.getElementById('rayon_moskovskij').value='1'; else document.getElementById('rayon_moskovskij').value='0'; if(document.getElementById('rayon_primorskij').checked==true) document.getElementById('rayon_primorskij').value='1'; else document.getElementById('rayon_primorskij').value='0'; if(document.getElementById('rayon_kalininskij').checked==true) document.getElementById('rayon_kalininskij').value='1'; else document.getElementById('rayon_kalininskij').value='0'; if(document.getElementById('rayon_krasnoselskij').checked==true) document.getElementById('rayon_krasnoselskij').value='1'; else document.getElementById('rayon_krasnoselskij').value='0'; if(document.getElementById('rayon_nevskij').checked==true) document.getElementById('rayon_nevskij').value='1'; else document.getElementById('rayon_nevskij').value='0'; if(document.getElementById('rayon_pushkinskij').checked==true) document.getElementById('rayon_pushkinskij').value='1'; else document.getElementById('rayon_pushkinskij').value='0'; if(document.getElementById('rayon_pavlovskij').checked==true) document.getElementById('rayon_pavlovskij').value='1'; else document.getElementById('rayon_pavlovskij').value='0'; if(document.getElementById('rayon_vsevolozhsk').checked==true) document.getElementById('rayon_vsevolozhsk').value='1'; else document.getElementById('rayon_vsevolozhsk').value='0'; if(document.getElementById('rayon_sosnovyy_bor').checked==true) document.getElementById('rayon_sosnovyy_bor').value='1'; else document.getElementById('rayon_sosnovyy_bor').value='0'; if(document.getElementById('rayon_gatchina').checked==true) document.getElementById('rayon_gatchina').value='1'; else document.getElementById('rayon_gatchina').value='0'; if(document.getElementById('rayon_sertolovo').checked==true) document.getElementById('rayon_sertolovo').value='1'; else document.getElementById('rayon_sertolovo').value='0'; if(document.getElementById('rayon_kolpino').checked==true) document.getElementById('rayon_kolpino').value='1'; else document.getElementById('rayon_kolpino').value='0'; if(document.getElementById('usluga_1').checked==true) document.getElementById('usluga_1').value='1'; else document.getElementById('usluga_1').value='0'; if(document.getElementById('usluga_2').checked==true) document.getElementById('usluga_2').value='1'; else document.getElementById('usluga_2').value='0'; if(document.getElementById('usluga_3').checked==true) document.getElementById('usluga_3').value='1'; else document.getElementById('usluga_3').value='0'; if(document.getElementById('usluga_4').checked==true) document.getElementById('usluga_4').value='1'; else document.getElementById('usluga_4').value='0'; if(document.getElementById('usluga_5').checked==true) document.getElementById('usluga_5').value='1'; else document.getElementById('usluga_5').value='0'; if(document.getElementById('usluga_6').checked==true) document.getElementById('usluga_6').value='1'; else document.getElementById('usluga_6').value='0'; if(document.getElementById('usluga_7').checked==true) document.getElementById('usluga_7').value='1'; else document.getElementById('usluga_7').value='0'; if(document.getElementById('usluga_8').checked==true) document.getElementById('usluga_8').value='1'; else document.getElementById('usluga_8').value='0'; if(document.getElementById('buttonforzayavka')){ if(document.getElementById('buttonforzayavka').checked==true) document.getElementById('buttonforzayavka').value='1'; else document.getElementById('buttonforzayavka').value='0'; } if(document.getElementById('checkadress')){ if(document.getElementById('checkadress').checked==true) document.getElementById('checkadress').value='1'; else document.getElementById('checkadress').value='0'; } document.getElementById('redform').submit(); } } function mklik(){ var def_color_cname = document.getElementById('fio').style.backgroundColor; var blue_color = "#ffcc00"; if(document.getElementById('fio').value==''){ document.getElementById('fio').focus(); document.getElementById('fio').style.backgroundColor = blue_color; }else if(document.getElementById('adres').value==''){ document.getElementById('adres').focus(); document.getElementById('adres').style.backgroundColor = blue_color; }else if(document.getElementById('tel').value.length<7){ document.getElementById('tel').focus(); document.getElementById('tel').style.backgroundColor = blue_color; }else{ alert("Ваша заявка успешно отправлена! В ближайшее время Вам перезвонит менеджер по подключению данного провайдера.!"); document.getElementById('zform').submit(); document.getElementById('fio').style.backgroundColor = def_color_cname; document.getElementById('tel').style.backgroundColor = def_color_cname; document.getElementById('adres').style.backgroundColor = def_color_cname; } } function mklikzu(){ var def_color_cname = document.getElementById('fio').style.backgroundColor; var blue_color = "#ffcc00"; if(document.getElementById('fio').value==''){ document.getElementById('fio').focus(); document.getElementById('fio').style.backgroundColor = blue_color; return 0; }else if(document.getElementById('tel').value.length<5){ document.getElementById('tel').focus(); document.getElementById('tel').style.backgroundColor = blue_color; return 0; }else if(document.getElementById('adres').value==''){ document.getElementById('adres').focus(); document.getElementById('adres').style.backgroundColor = blue_color; return 0; }else{ document.getElementById('fio').style.backgroundColor = def_color_cname; document.getElementById('tel').style.backgroundColor = def_color_cname; document.getElementById('adres').style.backgroundColor = def_color_cname; } return 1; } function mklikz(){ var def_color_cname = document.getElementById('numflat').style.backgroundColor; var blue_color = "#ffcc00"; if(document.getElementById('numflat').value==''){ document.getElementById('numflat').focus(); document.getElementById('numflat').style.backgroundColor = blue_color; return 0; }else if(!document.getElementById('numflat').value.match(/^[0-9]+$/)){ document.getElementById('numflat').focus(); document.getElementById('numflat').style.backgroundColor = blue_color; alert('Квартира может содержать только цифры! Если у вас нежилое помещение, воспользуйтесь формой для нежилого помещения.'); return 0; }else if(document.getElementById('fio').value==''){ document.getElementById('fio').focus(); document.getElementById('fio').style.backgroundColor = blue_color; return 0; }else if(document.getElementById('adres').value==''){ document.getElementById('adres').focus(); document.getElementById('adres').style.backgroundColor = blue_color; return 0; }else if(document.getElementById('tel').value.replace(/[^0-9]/g,'').length!=11){ alert('Проверьте ваш номер телефона, он содержит '+document.getElementById('tel').value.replace(/[^0-9]/g,'').length+' цифр. Телефон должен быть указан в 11-значном формате 8-ххх-ххххххх'); document.getElementById('tel').focus(); document.getElementById('tel').style.backgroundColor = blue_color; return 0; }else{ document.getElementById('numflat').style.backgroundColor = def_color_cname; document.getElementById('fio').style.backgroundColor = def_color_cname; document.getElementById('tel').style.backgroundColor = def_color_cname; document.getElementById('adres').style.backgroundColor = def_color_cname; } return 1; } function mails(){ var def_color_cname = document.getElementById('fio').style.backgroundColor; var blue_color = "#ffcc00"; if(document.getElementById('fio').value==''){ document.getElementById('fio').focus(); document.getElementById('fio').style.backgroundColor = blue_color; return 0; }else if(document.getElementById('emal').value==''){ document.getElementById('emal').focus(); document.getElementById('emal').style.backgroundColor = blue_color; return 0; }else{ document.getElementById('fio').style.backgroundColor = def_color_cname; document.getElementById('emal').style.backgroundColor = def_color_cname; } return 1; } function mklikanswnew(k){ var fordivforform='foranswer_'+k; var fordivfortext='texttoanswer_'+k; var fordivforname='nameanswer_'+k; var def_color_cname = document.getElementById(fordivfortext).style.backgroundColor; var blue_color = "#ffcc00"; if(document.getElementById(fordivforname).value==''){ document.getElementById(fordivforname).focus(); document.getElementById(fordivforname).style.backgroundColor = blue_color; return 0; }else if(document.getElementById(fordivfortext).value==''){ document.getElementById(fordivfortext).focus(); document.getElementById(fordivfortext).style.backgroundColor = blue_color; return 0; }else{ return 1; } } function mklikcom(){ var def_color_cname = document.getElementById('nametocom').style.backgroundColor; var blue_color = "#ffcc00"; if(document.getElementById('nametocom').value==''){ document.getElementById('nametocom').focus(); document.getElementById('nametocom').style.backgroundColor = blue_color; return 0; return 0; }else if(document.getElementById('texttocomment').value==''){ document.getElementById('texttocomment') .focus(); document.getElementById('texttocomment').style.backgroundColor = blue_color; return 0; }else if(document.getElementById('scribecom').checked==true){ if(document.getElementById('emailscribeq').value==''){ document.getElementById('emailscribeq').focus(); document.getElementById('emailscribeq').style.backgroundColor = blue_color; return 0; }else{ var eemail=document.getElementById('emailscribeq').value; var max_user_len = 64; var max_host_len = 255; var sob = "@"; if (eemail.indexOf(sob) == -1 ){ document.getElementById('emailscribeq').focus(); document.getElementById('emailscribeq').style.backgroundColor = blue_color; return 0; }else { var email_arr = eemail.split('@'); var user = email_arr[0]; var host = email_arr[1]; if (user.length == 0) { document.getElementById('emailscribeq').focus(); document.getElementById('emailscribeq').style.backgroundColor = blue_color; return 0; }else if (user.length > max_user_len) { document.getElementById('emailscribeq').focus(); document.getElementById('emailscribeq').style.backgroundColor = blue_color; return 0; }else if (host.length == 0) { document.getElementById('emailscribeq').focus(); document.getElementById('emailscribeq').style.backgroundColor = blue_color; return 0; }else if (host.length > max_host_len) { document.getElementById('emailscribeq').focus(); document.getElementById('emailscribeq').style.backgroundColor = blue_color; return 0; }else{ var user_regexp = /^([a-zA-Z0-9_\.\-\+])+$/; var inet_host_regexp = /^(([a-zA-Z0-9\-])+\.)+([a-zA-Z]{2,4})+$/; if (!user_regexp.test(user)) { document.getElementById('emailscribeq').focus(); document.getElementById('emailscribeq').style.backgroundColor = blue_color; return 0; }else if (!inet_host_regexp.test(host)) { document.getElementById('emailscribeq').focus(); document.getElementById('emailscribeq').style.backgroundColor = blue_color; return 0; } else{ return 1; } } } } }else { return 1; } } function mklikadd(){ var def_color_cname = document.getElementById('texttonewprovider').style.backgroundColor; var blue_color = "#ffcc00"; if(document.getElementById('texttonewprovider').value==''){ document.getElementById('texttonewprovider').focus(); document.getElementById('texttonewprovider').style.backgroundColor = blue_color; }else{ alert("Ваша заявка успешно отправлена! После проверки администратором провайдер будет доступен на сайте!"); document.getElementById('provform').submit(); document.getElementById('texttonewprovider').style.backgroundColor = def_color_cname; } } function mkliknews(){ var def_color_cname = document.getElementById('namea').style.backgroundColor; var blue_color = "#ffcc00"; if(document.getElementById('namea').value==''){ document.getElementById('namea').focus(); document.getElementById('namea').style.backgroundColor = blue_color; }else if(document.getElementById('texta').value=='') { document.getElementById('texta').focus(); document.getElementById('texta').style.backgroundColor = blue_color; }else if(document.getElementById('sroka').value=='') { document.getElementById('sroka').focus(); document.getElementById('sroka').style.backgroundColor = blue_color; }else{ document.getElementById('cform').submit(); document.getElementById('sroka').style.backgroundColor = "#fff"; document.getElementById('texta').style.backgroundColor = "#fff"; document.getElementById('namea').style.backgroundColor = "#fff"; } } function kliktarif(){ var def_color_cname = document.getElementById('cost').style.backgroundColor; var blue_color = "#ffcc00"; if(document.getElementById('namet').value==''){ document.getElementById('namet').focus(); document.getElementById('namet').style.backgroundColor = blue_color; }else if(document.getElementById('sostavt').value==''){ document.getElementById('sostavt').focus(); document.getElementById('sostavt').style.backgroundColor = blue_color; }else if(document.getElementById('cost').value==''){ document.getElementById('cost').focus(); document.getElementById('cost').style.backgroundColor = blue_color; }else{ document.getElementById('tform').submit(); } } function kliktarifred(k){ var forcost='costred_'+k; var forname='nametred_'+k; var forform='tarred_'+k; var def_color_cname = document.getElementById(forform).style.backgroundColor; var blue_color = "#ffcc00"; if(document.getElementById(forname).value==''){ document.getElementById(forname).focus(); document.getElementById(forname).style.backgroundColor = blue_color; }else if(document.getElementById(forcost).value==''){ document.getElementById(forcost).focus(); document.getElementById(forcost).style.backgroundColor = blue_color; }else{ document.getElementById(forform).submit(); document.getElementById(forname).style.backgroundColor = "#fff"; document.getElementById(forcost).style.backgroundColor = "#fff"; } } function madd_user(){ var def_color_cname = document.getElementById('us_login').style.backgroundColor; var blue_color = "#ffcc00"; if(document.getElementById('us_login').value==''){ document.getElementById('us_login').focus(); document.getElementById('us_login').style.backgroundColor = blue_color; }else if(document.getElementById('us_password').value==''){ document.getElementById('us_password').focus(); document.getElementById('us_password').style.backgroundColor = blue_color; }else if(document.getElementById('us_descr').value==''){ document.getElementById('us_descr').focus(); document.getElementById('us_descr').style.backgroundColor = blue_color; }else if(document.getElementById('us_mail').value==''){ document.getElementById('us_mail').focus(); document.getElementById('us_mail').style.backgroundColor = blue_color; }else if(document.getElementById('us_idprov').value==''){ document.getElementById('us_idprov').focus(); document.getElementById('us_idprov').style.backgroundColor = blue_color; }else{ document.getElementById('adduserform').submit(); document.getElementById('us_login').style.backgroundColor = def_color_cname; document.getElementById('us_password').style.backgroundColor = def_color_cname; } } function madd_adres(){ var def_color_cname = document.getElementById('idprov').style.backgroundColor; var blue_color = "#ffcc00"; if(document.getElementById('prefix').value==''){ document.getElementById('prefix').focus(); document.getElementById('prefix').style.backgroundColor = blue_color; }else if(document.getElementById('gorod').value==''){ document.getElementById('gorod').focus(); document.getElementById('gorod').style.backgroundColor = blue_color; }else if(document.getElementById('idprov').value==''){ document.getElementById('idprov').focus(); document.getElementById('idprov').style.backgroundColor = blue_color; }else if(document.getElementById('street').value==''){ document.getElementById('street').focus(); document.getElementById('street').style.backgroundColor = blue_color; }else if(document.getElementById('houses').value==''){ document.getElementById('houses').focus(); document.getElementById('houses').style.backgroundColor = blue_color; }else{ document.getElementById('addadresform').submit(); document.getElementById('idprov').style.backgroundColor = def_color_cname; document.getElementById('street').style.backgroundColor = def_color_cname; document.getElementById('houses').style.backgroundColor = def_color_cname; } } function cff(k) { var fordivforform='divforform_'+k; var fordivforbut='divforbut_'+k; document.getElementById(fordivforform).style.display = "block"; document.getElementById(fordivforbut).style.display = "none"; } function cfftarify(k) { var fordivforform='akciib_'+k; var fordivforbut='tarif_redactmain_'+k; document.getElementById(fordivforform).style.display = "none"; document.getElementById(fordivforbut).style.display = "block"; } function cfftarifycansel(k) { var fordivforform='akciib_'+k; var fordivforbut='tarif_redactmain_'+k; document.getElementById(fordivforform).style.display = "block"; document.getElementById(fordivforbut).style.display = "none"; } function cffforanswer(k) { var divforanswer='divforanswer_'+k; var divforbutanswer='divforbutanswer_'+k; document.getElementById(divforanswer).style.display = "block"; document.getElementById(divforbutanswer).style.display = "none"; } function chanels_on(k) { document.getElementById('div_chanels_'+k).style.display = "block"; document.getElementById('fon_black_'+k).style.display = "block"; } function description_on(k) { document.getElementById('fon_black_description_'+k).style.display = "block"; document.getElementById('fon_black_description_'+k).style.zIndex = "2"; document.getElementById('div_description_'+k).style.display = "block"; document.getElementById('div_description_'+k).style.zIndex = "3"; } function description_off(k) { document.getElementById('div_description_'+k).style.display = "none"; document.getElementById('fon_black_description_'+k).style.display = "none"; } function chanels_off(k) { document.getElementById('div_chanels_'+k).style.display = "none"; document.getElementById('fon_black_'+k).style.display = "none"; } function redakt(){ document.getElementById('comments').style.display = "none"; document.getElementById('commentsform').style.display = "none"; document.getElementById('divdetail').style.display = "none"; document.getElementById('provaiders_sub0w_for_red').style.display = "block"; } function redakt_cancel() { document.getElementById('comments').style.display = "block"; document.getElementById('commentsform').style.display = "block"; document.getElementById('divdetail').style.display = "block"; document.getElementById('provaiders_sub0w_for_red').style.display = "none"; } function redaktnew(){ document.getElementById('red').style.display = "none"; document.getElementById('provaiders_sub0w_for_red').style.display = "block"; document.getElementById('redno').style.display = "none"; } function redakt_cancelnew(){ document.getElementById('red').style.display = "block"; document.getElementById('provaiders_sub0w_for_red').style.display = "none"; document.getElementById('redno').style.display = "block"; } function checkklik(){ if(document.getElementById('scribecom').checked==true) { document.getElementById("mailes").style.display = "block"; } else { document.getElementById("mailes").style.display = "none"; } } function checkklikspeed(){ if(document.getElementById('speed').checked==true) { document.getElementById("speeds").style.display = "block"; } else { document.getElementById("speeds").style.display = "none"; } } // Чтение куки. //setCookie('name', 'value'); //getCookie('name'); function setCookie(name, value, expires, path, domain, secure) { document.cookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); } function getCookie(name) { var cookie = " " + document.cookie; var search = " " + name + "="; var setStr = null; var offset = 0; var end = 0; if (cookie.length > 0) { offset = cookie.indexOf(search); if (offset != -1) { offset += search.length; end = cookie.indexOf(";", offset) if (end == -1) { end = cookie.length; } setStr = unescape(cookie.substring(offset, end)); } } return(setStr); }