function callback_update_innerhtml(result)
{
   var posPipe = result.search(/\|/);
   var id = result.substring(0, posPipe);
   var innerHtml = result.substring(posPipe + 1, result.length);
   document.getElementById(id).innerHTML = innerHtml;
}

function show_version_details(div_id, filename, typ, kind)
{
   var anchor = document.getElementById(div_id + 'btn');
   var output = document.getElementById(div_id);
   if (kind == 'show')
   {
      anchor.href = 'javascript:show_version_details(\'' + 
         div_id + '\',\'' + filename + '\', \'' + typ + '\', \'hide\');';
      anchor.innerHTML = 'Details ausblenden...';
      output.className = 'version_details';
      Lokris.AjaxCall('get_details_for_filename.php?filename=' 
         + filename
         + '&typ=' + typ
         + '&div_id=' + div_id, 
         callback_update_innerhtml);
      
   }
   else
   {
      anchor.href = 'javascript:show_version_details(\'' + 
         div_id + '\',\'' + filename + '\', \'' + typ + '\', \'show\');';
      anchor.innerHTML = 'Details einblenden...';
      output.innerHTML = '';
      output.className = '';
   }
}
