// JavaScript Document
function openCenterWin( URL, sTitle, height, width, scrollbars, resizable, toolbar, status )
{
	left= (window.screen.availWidth - width) / 2;
	top	= (window.screen.availHeight - height) / 2;
	
	sProperties = 'height=' + height + ',width=' + width + ',scrollbars=' + scrollbars +
				',status=' + status + ',resizable=' + resizable + ',toolbar=' + toolbar + ',top=' + top + ',left=' + left;
	
	window.open(URL, sTitle, sProperties);
}

function browseFile(sourceElementId)
{
	document.sourceElementId = sourceElementId;
	openCenterWin("_filebrowser.php", null, 300, 450, true, true, false, false);
}

function getQueryString(variable)
{
  var query = window.top.location.search.substring(1);
  var vars = query.split("&");
  
  for (var i=0; i < vars.length; i++) {
    var pair = vars[i].split("=");
    
    if (pair[0] == variable)
      return pair[1];
  }
  
  return false;
}

function isBlank(s)
{
	return (s == '') || (s == null);
}
