function hideControls () {
      getControls().callMethodOnEach (Element.prototype.hide);
}

function showControls () {
      getControls().callMethodOnEach (Element.prototype.show);
}

function printResume () {
      hideControls();
      print();
      showControls();
}

// todo: move into jm.Element.js
Element.prototype.setVisible = function (visible) {
      this.style.visibility = visible ? "visible" : "hidden";
}

// todo: move into jm.Element.js
Element.prototype.hide = function () {
      this.setVisible (false);
}

// todo: move into jm.Element.js
Element.prototype.show = function () {
      this.setVisible (true);
}

Array.prototype.callMethodOnEach = function (f) {
     for (i = 0; i < this.length; i++) {
         var item = this[i];
	 f.call (item);
      }
}			  

function getControls () {
      var controls = [document.getElementById("download-link"), 
  	              document.getElementById("print-link")];
      return controls;			  
}