// F?gt ein Dokument in die 'MyDocuments' Liste ein
function DownloadCenter_AddToMyDocuments(id) 
{
  downloadCenter.d_id.value=''+id;
  downloadCenter.cmd.value='dc_add';
  downloadCenter.submit();
}
// Entfernt ein Dokument aus der 'MyDocuments' Liste
function DownloadCenter_DelFromMyDocuments(id) 
{
  downloadCenter.d_id.value=''+id;
  downloadCenter.cmd.value='dc_del';
  downloadCenter.submit();
}
// Startet den Download von 'MyDocuments'
function DownloadCenter_GetMyDocuments(id) {
  downloadCenter.cmd.value='dc_get';
  downloadCenter.submit();
}
// -- muss raus
function DownloadCenter_ViewDocument(id) {
  var v = window.open("/DownloadCenter.aspx?cmd=dc_view&id=" + id, "Dokumentansicht","");
}
// Schreibt die Anzahl der im 'MyDocuments' gesammelten Dokumente in ein div
function DownloadCenter_GetCount(prefix,link,text) 
{
  if(document.cookie) {
    var c = GetCookie(prefix+"DownloadCenter_Count");
    var o = document.getElementById("DownloadCount");
    if(c == '') c = "0";
    if(c == 1) 
      o.innerHTML = '<span><a href="' + link + '">' + text + 
        '<strong>' + c + ' Download</strong></a></span>';
    else
      o.innerHTML = '<span><a href="' + link + '">' + text + 
        '<strong>' + c + ' Downloads</strong></a></span>'; 
  }
}
// Ruft den DownloadCenter aus der Marginalia auf
function DownloadCenter_View(action) 
{
  try {
    var o = document.getElementById("downloadCenterM");
    if(!o) return;
    o.action = action;
    o.cmd.value = "dc_view";
    o.submit();
  } catch(e) { }
}
// Dokument aus der Marginalia zu 'MyDocuments' hinzuf?gen
function DownloadCenter_AddToMyDocumentsM(id) {
  try { 
    var o = document.getElementById('downloadCenterM');
    if(!o) return;
    o.d_id.value=''+id;
    o.cmd.value='dc_add';
    o.submit();
  } catch(e) { }
}

