function testCommentForm(former){ if(former.new_comment.value==''){ alert('Необходимо ввести текст комментария.'); former.new_comment.focus(); return false; } } function testMessageForm(former){ if(former.new_message.value==''){ alert('Необходимо ввести текст сообщения.'); former.new_message.focus(); return false; } } function showcomment(comment,x,y,namer,texter){ document.getElementById(namer).style.left=x+30; document.getElementById(namer).style.top=y+document.body.scrollTop; document.getElementById(texter).innerHTML =comment; document.getElementById(namer).style.display='block'; } function outcomment(namers){ document.getElementById(namers).style.display='none'; } function open_win(adres,width,height,targetwin){ to_height=0; if(navigator.appName=="Netscape" && navigator.appVersion.search("Chrome")<0){ to_height=30; } height+=(80+to_height); width+=50; if(adres.indexOf('scroll_true')>0){ eval("popupWin=open('"+adres+"', '"+targetwin+"','name=\""+adres+"\",scrollbars=yes,help=no,location=no,status=yes,toolbar=no,unadorned=yes,directories=no,menubar=no,resizable=no,width="+width+",height="+height+"')"); } else { eval("popupWin=open('"+adres+"', '"+targetwin+"','name=\""+adres+"\",scrollbars=no,help=no,location=no,status=yes,toolbar=no,unadorned=yes,directories=no,menubar=no,resizable=no,width="+width+",height="+height+"')"); } popupWin.focus(); } function set_display(ob_name, valuer){ mas=new Array("none","block"); document.getElementById(ob_name).style.display=mas[valuer]; } function change_display(ob_name){ if(document.getElementById(ob_name).style.display=="none"){ document.getElementById(ob_name).style.display = "block"; } else{ document.getElementById(ob_name).style.display = "none"; } } function CheckEmailFormat( sEmail ) { sEmail = sEmail.replace( new RegExp('/\(.*?\)/'), '' ) var oRegExp = /^[A-Za-z0-9][-\w]*(\.[A-Za-z0-9][-\w]*)*@[A-Za-z0-9][-\w]*(\.[A-Za-z0-9][-\w]*)*\.[a-zA-Z]{2,4}$/ return oRegExp.test(sEmail) } function checkregistrationForm (form) { if (form.email.value.length == 0) { alert('Введите e-mail!'); form.email.focus(); return false; } if (!CheckEmailFormat(form.email.value)) { alert('E-mail адрес введен неправильно.'); form.email.focus(); return false; } return true; } function focsubs(){ if (document.registration_form.email.value=='Введите e-mail') document.registration_form.email.value=''; } function blursubs(){ if (document.registration_form.email.value=='') document.registration_form.email.value='Введите e-mail'; } function focsearch(ider){ if (eval('document.search_form_'+ider+'.search_text.value==\"Поиск на сайте\"')) eval('document.search_form_'+ider+'.search_text.value=\"\"'); } function blursearch(ider){ if (eval('document.search_form_'+ider+'.search_text.value==\"\"')) eval('document.search_form_'+ider+'.search_text.value=\"Поиск на сайте\"'); } function checkFeedbackForm (form) { if (form.email.value.length == 0) { alert('Введите e-mail!'); form.email.focus(); return false; } if (!CheckEmailFormat(form.email.value)) { alert('E-mail адрес введен неправильно.'); form.email.focus(); return false; } if (form.name.value.length == 0) { alert('Введите ваше имя!'); form.name.focus(); return false; } if (form.text.value.length == 0) { alert('Введите ваше сообщение!'); form.text.focus(); return false; } return true; } function checkHowForm (form) { if (! form.howyes.checked) { alert('Необходимо согласиться с уставом!'); return false; } if (form.email.value.length == 0) { alert('Введите e-mail!'); form.email.focus(); return false; } if (!CheckEmailFormat(form.email.value)) { alert('E-mail адрес введен неправильно.'); form.email.focus(); return false; } if (form.name.value.length == 0) { alert('Введите ваше имя!'); form.name.focus(); return false; } if (form.prof.value.length == 0) { alert('Укажите свою профессию!'); form.prof.focus(); return false; } if (form.date.value.length == 0) { alert('Укажите дату рождения!'); form.date.focus(); return false; } if (form.phone.value.length == 0) { alert('Укажите телефон!'); form.phone.focus(); return false; } if (form.text_bio.value.length == 0) { alert('Укажите биографию!'); form.text_bio.focus(); return false; } if (form.text_films.value.length == 0) { alert('Укажите Фильмографию / издания!'); form.text_films.focus(); return false; } return true; } function open_graphic(adres,width,height){ width+=20; height+=20; eval("open('"+adres+"', 'displayWindow','scroll=no,help=no,status=no,unadorned=yes,directories=no,menubar=no,resizable=no,width="+width+",height="+height+"')"); } function print_flash(flasherbody){ document.write(flasherbody);} var ourInterval = 0; var scrollSpeed = 50; var scrollWidth = 10; function scrollStart(direction, divID){ ourInterval = setInterval("scroll"+direction+"('"+divID+"')", scrollSpeed); } function scrollEnd(){ clearInterval(ourInterval); } function scrollTop(which){ document.getElementById(which).scrollTop = document.getElementById(which).scrollTop + scrollWidth; } function scrollDown(which){ document.getElementById(which).scrollTop = document.getElementById(which).scrollTop - scrollWidth; }