function open_nw(link)
{
  var win = window.open(link, 'new_win');
  win.focus();
}

function open_tool_nw(link)
{
  var win = window.open(link, 'new_tool_win', 'height=330,width=330,left=200,top=300,scrollbars=yes,resizable,status=yes');
  win.focus();
}


function open_ud_nw(link, def)
{
  var win = window.open(link, 'new_ud_win', def);
  win.focus();
}

function checkString( obj) 
{
  var re = obj.value.match( /^\s*$/gi);
  if ( re != null) return false; else  return true;
}

function checkEmail( obj) {
  var re = obj.match( /^\s*[\w]+((\.|-)?[\w]+)*@[\w]+((\.|-)?[\w]+)*(\.[\w]+)\s*$/gi);
  if ( re != null) return true; else return false;
}

function checkEmails( obj) {
  var objs = obj.value.split( ",");
  for ( i=0; i<objs.length; i++) if ( !checkEmail( objs[i])) return false;
  return true;
}
