// -*-C-*-
/*
This file is part of phpWebApp,  which is a framework for building web
application based on relational databases.

Copyright 2001,2002,2003,2004,2005
Dashamir Hoxha, dashohoxha@users.sourceforge.net

phpWebApp is free  software; you can redistribute it  and/or modify it
under the terms of the GNU  General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.

phpWebApp  is distributed  in the  hope that  it will  be  useful, but
WITHOUT   ANY  WARRANTY;   without  even   the  implied   warranty  of
MERCHANTABILITY  or FITNESS  FOR A  PARTICULAR PURPOSE.   See  the GNU
General Public License for more details.

You  should have received  a copy  of the  GNU General  Public License
along with phpWebApp;  if not, write to the  Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/


function on_refresh()
{
  var form = document.changeViewForm;
  var hide = form.hide;
  var preview = form.viewMode[1];
  var visible = !hide.checked;
  var codeView = !preview.checked;

  session.setVar("panel->folderVisible", ""+visible);
  session.setVar("panel->codeView", ""+codeView);
  GoTo("thisPage?");
}

function on_changeSess()
{
  var form = document.changeViewForm;
  var var_name = form.var_name.value;
  var var_value = form.var_value.value;

  session.setVar(var_name, var_value);
  GoTo("thisPage?");
}

function on_changePath()
{
  var form = document.changeViewForm;
  var root_folder = form.root_folder.value;
  GoTo("?event=folderListing.changeRoot(root_folder="+root_folder+")");
}
