/**
 * Calls downloads_getInfo.php doing an AJAX call
 * Resizes and sets detailed image
 * Applies explode effect
 *
 * @param int imgNo  decor.no in postgres
 * @return           the result evaldObj is processed directly in "load"
 */
/*
function dlInfo(textfile)
{
  dojo.io.bind({
    url: "downloads_getInfo.php",
        
    content: {
      t: textfile
    },
    
    load: function(type, evaldObj) {
      // newlines had to be encoded as %%n%%
      dojo.byId('popupInner').innerHTML = evaldObj.text.replace(/%%n%%/g, "<br/>");  
      var spanid = evaldObj.filename.replace(/.txt/, '');
      
      dojo.byId("popupContainer").style.width = dojo.byId("content").offsetWidth - 12;
      dojo.byId("popupInner").style.width = dojo.byId("content").offsetWidth - 12;
      dojo.graphics.htmlEffects.explode(dojo.byId(spanid), dojo.byId("popupContainer"), 400);
    },
    
    mimetype: "text/javascript"
  });
}


function dlInfoClose()
{
  dojo.graphics.htmlEffects.implode(dojo.byId("popupContainer"), dojo.byId("logo"), 400);
}
*/


function dlInfo(textfile)
{
/*
  dojo.io.bind({
    url: "downloads_getInfo.php",
        
    content: {
      t: textfile
    },
    
    load: function(type, evaldObj) {
      // newlines had to be encoded as %%n%%
      dojo.byId('popupInner').innerHTML = evaldObj.text.replace(/%%n%%/g, "<br/>");  
      var spanid = evaldObj.filename.replace(/.txt/, '');
      
      dojo.byId("popupContainer").style.width = dojo.byId("content").offsetWidth - 12;
      dojo.byId("popupInner").style.width = dojo.byId("content").offsetWidth - 12;
      dojo.graphics.htmlEffects.explode(dojo.byId(spanid), dojo.byId("popupContainer"), 400);
    },
    
    mimetype: "text/javascript"
  });
*/
  var handlerFunc = function(t) {
    alert(t.responseText);
  }
  var errFunc = function(t) {
    alert('Error ' + t.status + ' -- ' + t.statusText);
  }
  new Ajax.Request('downloads_getInfo.php', {parameters:'t=textfile', onSuccess:handlerFunc, onFailure:errFunc});
}


function dlInfoClose()
{
//   dojo.graphics.htmlEffects.implode(dojo.byId("popupContainer"), dojo.byId("logo"), 400);
}
