<!-- 
function Browser () {
  if(navigator.userAgent.indexOf('Opera')>=0)
	  this.Opera=true;
	else if(navigator.userAgent.indexOf('Chrome')>=0)
	  this.Chrome=true;
	else if(navigator.userAgent.indexOf('Firefox')>=0)
	  this.Firefox=true;
	else if(navigator.userAgent.indexOf('MSIE')>=0)
	  this.MSIE=true; 
}
var Brows = new Browser;

function viewFixed(url, wname, width, height) {
  window.open(url,wname,'width='+width+',height='+height+',scrollbars=0,status=0,menubar=1,resizable=1,left=176,top=170'); 
  return false;
}

function viewFocused(url, wname, props) {
  var wnd;
  wnd=window.open(url, wname, props); 
  wnd.focus();
  return false;
}

function viewPopup(url, wname, width, height) {
  var props = 'width='+width+',height='+height+',scrollbars=1,status=0,menubar=0,resizable=1,left=176,top=0';
  viewFocused(url, wname, props); 
  return false;
}

function strx(str) {
  var ret, i, c;
  ret = '';
  for (i=0;i<str.length;i++) {
    c = str.charCodeAt(i)^25;
    ret+= String.fromCharCode(c);    
  }
  return ret;
}

//=========================================================
// Add a function called trim as a method of the prototype 
// object of the String constructor.
//=========================================================
String.prototype.trim = function()
{
  return this.replace(/(^\s*)|(\s*$)/g, "");
}
//*************************
// Local Menu Frame Control
//*************************
//var fsLocalMenuCols;  // defined in _mainframe.inc

function rememberLocalMenuFrames()
{
  if (top.frames['fs_local_menu_workplace'])
    top.fsLocalMenuCols=top.fs_local_menu_workplace.cols;
}

function hideLocalMenuFrames()
{
  
  if (top.frames['fs_local_menu_workplace'])
  {
    var loc=top.fs_local_menu_workplace;
    if (loc.cols!='0,*') top.fsLocalMenuCols=loc.cols;
    loc.cols='0,*';
  }
}

function showLocalMenuFrames()
{
  if (top.frames['fs_local_menu_workplace'])
    top.fs_local_menu_workplace.cols=top.fsLocalMenuCols;
}

//************************
// Editorial Frame Control
//************************
//var fsCoverageRows  // defined in _mainframe.inc
//var fsCategoryCols  // defined in _mainframe.inc

function rememberEditorFrames()
{
  if (top.frames['fs_local_menu_workplace'] && top.frames['workplace'].frames['fs_category_property'])
  {
    var wnd=top.workplace;
    top.fsCoverageRows=wnd.fs_coverage_edit.rows
    top.fsCategoryCols=wnd.fs_category_property.cols
  }
}

function hideEditorFrames()
{
  if (top.frames['fs_local_menu_workplace'] && top.frames['workplace'].frames['fs_category_property'])
  {
    var wnd=top.workplace;
    var Cov=wnd.fs_coverage_edit;
    var Cat=wnd.fs_category_property;
    if (Cov.rows!='*,0') top.fsCoverageRows=Cov.rows;
    if (Cat.cols!='0,*') top.fsCategoryCols=Cat.cols;
    Cov.rows='*,0';
    Cat.cols='0,*';
  }
}

function showEditorFrames()
{
  if (top.frames['fs_local_menu_workplace'] && top.frames['workplace'].frames['fs_category_property'])
  {
    var wnd=top.workplace;
    wnd.fs_coverage_edit.rows=top.fsCoverageRows;
    wnd.fs_category_property.cols=top.fsCategoryCols;
  }
}
//*********************
// Load page into frame
//*********************

function loadIntoFrame(href_wp, href_ed)
{
  if (top.frames['workplace'] && top.frames['workplace'].frames['edit'])
  {
    if (href_ed)
      top.frames['workplace'].frames['edit'].location.href=href_ed;
    else
      top.frames['workplace'].frames['edit'].location.href=href_wp;
  }
  else if (top.frames['workplace'])
    top.frames['workplace'].location.href=href_wp;
  else top.location.href=href_wp;
}
//-->

