/*+********************************************************************* 
This program 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.

This program 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.

(C) 2008 Harald Kirsch (pifpafpuf at gmx dot de)
************************************************************************/

function toggleLayer(id, dstyle) {
  e = document.getElementById(id);
  if( e.style.display=='none' ) showLayer(id, dstyle);
  else hideLayer(id);
}

function showLayer(id, dstyle) {
  e = document.getElementById(id);
  e.style.display = dstyle;
}
function hideLayer(id) {
  e = document.getElementById(id);
  e.style.display = "none";
}
function showUploadLayer() {
  // first we need to fix the form's action to contain the query
  // parameters of the permalink
  e = document.getElementById("uplform");
  path = e.action.replace(/[?].*/, "");
  perm = document.getElementById("permalink").href.replace(/.*[?]/, "");
  e.action = path+'?'+perm;
  showLayer('uploadLayer', 'block');
}
function setCursor(id, cursor) {
  var e = document.getElementById(id);
  e.style.cursor = cursor;
}

