//this function includes all necessary js files for the application
function myjsinclude(file) {
  var script  = document.createElement('script');
  script.src  = file;
  script.type = 'text/javascript';
  script.defer = true;

  document.getElementsByTagName('head').item(0).appendChild(script);
}

/* include any js files here */
myjsinclude("/j/lib/prototype.js");
myjsinclude("/j/src/effects.js");
myjsinclude("/j/src/dragdrop.js");
myjsinclude("/j/src/controls.js");

function changeFeature(file) {
  var fileurl = "/featured/" + file;
  updateElement("feature_container", fileurl, "");
}

function updateElement(id, url, highlightid) {
  new Ajax.Updater(id, url, {onComplete:function(request){new Effect.Highlight(highlightid);}, evalScripts:true, asynchronous:true});
}