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=150,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;
}

LightboxOptions = {
    fileLoadingImage:        'libraries/lightbox/images/loading.gif',     
    fileBottomNavCloseImage: 'libraries/lightbox/images/closelabel.gif',

    overlayOpacity: 0.6,   // controls transparency of shadow overlay

    animate: true,         // toggles resizing animations
    resizeSpeed: 9,        // controls the speed of the image resizing animations (1=slowest and 10=fastest)

    borderSize: 20,         //if you adjust the padding in the CSS, you will need to update this variable

	// When grouping images this is used to write: Image # of #.
	// Change it for non-english localization
	labelImage: "Image",
	labelOf: "of"
};