<!-- новое окно -->
function open_window(path,w,h,wname,scroll) 
{ p=',width='+w+',height='+h+',resizable=no,toolbar=no,location=no,directories=no,status=no,scrollbars='+scroll+',menubar=no'; xxx=open(path,wname,p);xxx.focus(); }

function imgConfirm() 
{ 
  filename = Math.round(19 * Math.random())+1;
  document.getElementById('imgconfirm1').src = '/img/digit/' + filename + '.gif';
  document.getElementById('imgconfirm2').value = filename;
}
function checkVAL(obj)
{
		  var str = obj.value;
		  if(str == '') 
		  { 
		    alert('Не все обязательные поля заполнены');
		    obj.focus();
		    return false;
		  }
		  return true;
}
function checkEmail(obj)
{
		  var str = obj.value;
		  if (/^([\w-~_]+\.)*[\w-~_]+@([\w-_]+\.){1,3}\w{2,4}$/.test(str))
		  {
		    return true;
		  }
		  else 
		  {
		    alert("Неправильный e-mail адрес");
		    obj.focus();
		    return false;
		  }
}

 function zoom (path, w, h)
    { 
				screenW = screen.width;
				screenH = screen.height;
				leftPos = (screenW - w)/2;
				topPos = (screenH - h)/2;
				var params = "width=" + (w == 0 ? 640 : w) + ", height=" + (h == 0 ? 480 : h) + ", top="+topPos+", left="+leftPos+",menubar=no,location=no,resizable=0,scrollbars=0";
        xxx=open("", "New", params);
        		w=w-5;h=h-5;
				xxx.document.open();
				xxx.document.write ('<html><head><title></title></head><body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0"><center><img src="'+path+'" width="'+w+'" height="'+h+'"></body></html>');
				xxx.document.close();
        xxx.focus();
    }
