
 /*
  function showPotd(show) {
    if (show) {   
      document.getElementById('potd').style.visibility = 'visible';
    } else {
      document.getElementById('potd').style.visibility = 'hidden';
    }
  }
  */
    
  function popframes() {
    var frames = new Array(arguments.length);
    
    // remember all popupframes
    for (i = 0; i < arguments.length; i++) {
      frames[i] = arguments[i];
    }
    
    this.frames = frames;
    this.hideAll = popframes_hideAll;
    this.showPop = popframes_showPop;
    this.togglePop = popframes_togglePop;
  }

  function popframes_hideAll() {
    //alert("hideAll: " + this.frames);
    
    for (var i=0; i < this.frames.length; i++) {
      //alert("hideAll " + this.frames[i]);
      document.getElementById(this.frames[i]).style.visibility = 'hidden'; 
    }
  }
  
  function popframes_showPop(id, show) {
    //alert("showpop");
    if (show) {
      this.hideAll();
      document.getElementById(id).style.visibility = 'visible';
    } else {
      document.getElementById(id).style.visibility = 'hidden';
    } 
  }

  
  function popframes_togglePop(id) {
    if (document.getElementById(id).style.visibility == 'hidden') {   
      document.getElementById(id).style.visibility = 'visible';
    } else {
      document.getElementById(id).style.visibility = 'hidden';
    }
  }
  
    

