function doNewWindow(strUrl, strName, intWidth, intHeight) {
  var intLeft = (screen.width - 260) / 2;
  var intTop = (screen.height - 150) / 2;
  if (intWidth) 
    var intNewWidth = intWidth;
  else
    var intNewWidth = '350';

  if (intHeight) 
    var intNewHeight = intHeight;
  else
    var intNewHeight = '200';

  if (strName == '')
    var strName = 'title';

	window.open(strUrl, strName,'width='+intNewWidth+',height='+ intNewHeight+',scrollbars=yes,resizable=no,dependent=yes,hotkeys=no,location=no,menubar=no,status=no,toolbar=no,left='+intLeft+',top='+intTop);  
}

function doVertifyEmail (strEmail) {
  if(strEmail.length <= 0)
	  return true;

  var splitted = strEmail.match("^(.+)@(.+)$");
  if(splitted == null) 
    return false;

  if(splitted[1] != null) {
    var regexp_user=/^\"?[\w-_\.]*\"?$/;
    if(splitted[1].match(regexp_user) == null) 
      return false;
  }

  if(splitted[2] != null) {
    var regexp_domain=/^[\w-\.]*\.[A-Za-z]{2,4}$/;
    if(splitted[2].match(regexp_domain) == null) {
      var regexp_ip =/^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/;
      if(splitted[2].match(regexp_ip) == null) 
        return false;
    }
    return true;
  }
  return false;
}  
