function showHideAnswer(){
 var numericID = this.id.replace(/[^\d]/g,'');
 var obj = document.getElementById('a' + numericID);
 if(obj.style.display=='block'){
 obj.style.display='none';
 }else{
 obj.style.display='block';
 }
}
function initShowHideContent(){
 var divs = document.getElementsByTagName('DIV');
 for(var no=0;no<divs.length;no++){
 if(divs[no].className=='question'){
 divs[no].onclick = showHideAnswer;
 }
}
}
window.onload = initShowHideContent;

function wopen(url,w,h){
eval('opened=window.open("","none","top=100, left=100, width="+w+", height="+h+", resizable=0","replace=yes")');
opened.document.open();
opened.document.write('<body leftmargin=0 topmargin=0><a href=javascript:window.close();><img src="'+url+'"></a></body>');
opened.document.close();
}

function checK(post){
if (post.username.value==''){alert("Заполните поле - Логин!");post.username.focus();return false}
if (post.password.value==''){alert("Заполните поле - Пароль!");post.password.focus();return false}{
return true}
return false}

function checKsn(postsn){
if (postsn.email.value==''){alert("Заполните поле - E-mail");postsn.email.focus();return false}
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(postsn.email.value)){
return true
}
alert('Вы указали не корректный - E-mail');postsn.email.select()
return false
}

function checKst(postst){
if (postst.lost_user.value==''){alert("Введите свой e-mail!");postst.lost_user.focus();return false}
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(postst.lost_user.value))
{
return true
}
alert('Вы указали не корректный - E-mail');postst.lost_user.select()
return false
}

function checKsm(postsm){
if (postsm.search.value==''){alert("Заполните текст поиска");postsm.search.focus();return false}{
return true}
return false}
