	if (window != top) top.location.href = location.href;

new Image().src = "http://counter.yadro.ru/hit?r"+
escape(document.referrer)+((typeof(screen)=="undefined")?"":
";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth?
screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+
";"+Math.random();

function is_it_email(str) {
  var supported = 0;
  if (window.RegExp) {
    var tempStr = "a";
    var tempReg = new RegExp(tempStr);
    if (tempReg.test(tempStr)) supported = 1;
  }
  if (!supported)
   {
  if (!((str.indexOf(".") > 2) && (str.indexOf("@") > 0) && (str.length > 0)))
     {
       return false;
     }
    }
  var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
  var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
  if (!(!r1.test(str) && r2.test(str)))
    {
    return false;
    }
  if (str=="e-mail@dot.com")
     {
        return false;
     }
}

function CheForm(name,from,verif_box,message) { 
       var errors="";
       if (name!="") {
       if (name.length>60) errors+= '- Name is longer than 60 chars, please user shorter name\n';
       }
       else {errors+= '- Please enter your name\n';} 
       if (from!="") {
       if (is_it_email(from)==false) errors+= '- E-mail entered is incorrect, please check and correct\n';
       if (from.length>60) errors+= '- E-mail is longer than 60 chars, sorry, can not accept it\n';
       }
       else {errors+= '- E-mail isn\'t entered\n';}
       if (verif_box=="") {errors+= '- Anti-spam code isn\'t entered\n';}
//       if (verif_box!="") {
//           if(isNaN(verif_box)) {errors+='- Anti-spam code shold be a value from 1000 to 9999\n';}
//           else if (parseInt(verif_box)<1000 || parseInt(verif_box)>9999) {errors+='- Anti-spam code shold be a value from 1000 to 9999.\n';       
//                         }
//          }
//       else {errors+= '- Anti-spam code isn\'t entered\n';} 
       if (message!="") {
       if (name.message>300) errors+= '- Your message is longer than 300 chars, please make it shorter\n';
       }
       else {errors+= '- Message is not entered\n';} 
    if (errors!="") {
      alert('The following erros occured with your message:\n'+errors);
      return false;
      }
  else { return true;}
}
