function checkMail(m){
  adresse = m.value;
  place = adresse.indexOf("@",1);
  point = adresse.indexOf(".",place+1);
  if ((place > -1)&&(adresse.length >2)&&(point > 1))
    return true
  else 
    return false
}

function valSubscription() { 
  //return false;
    
  with (document.subform) {     
    if (sname.value == "") {
      alert('Введите имя!');
      sname.select();
      return false;
    }
    if (smail.value == "") {
      alert('Введите e-mail!');
      smail.select();
      return false;
    }
    if (!checkMail(smail)) {
      alert('Введите правильный e-mail!');
      smail.select();
      return false;
    }    
    return true;
  }             
}

function valVoting() { 
  with (document.voteform) {  
    for (i=0; i<answ.length; i++) {
      if (answ[i].checked)  
        return true;        
    }    
    alert('Выберите один из вариантов ответа!');    
    return false;
  }             
}

function showPic(sendLink,xx,yy) {
	mm="width="+xx+",height="+yy+",scrollbars=no,dependent=yes";
    var Wnd=window.open(sendLink,"map",mm);
}

function showCam(acam) {
  HB = window.open(acam,'HB','toolbar=no,scrollbars=auto,directories=no,status=no,menubar=no,resizable=no,height=400,width=450');
  HB.focus();
  tId=window.setTimeout ("HB.close();window.clearTimeout(tId);", 60000);  
}  

function showPan(apan, aname) {
  HB = window.open('./pan/pan.php?pid='+apan+'&pname='+aname,'HB','toolbar=no,scrollbars=auto,directories=no,status=no,menubar=no,resizable=no,height=400,width=450');
  HB.focus();
}  

