function download(id,type)
{
  url='';
  if(type==1) {
    url='http://pixelplayer.se/podcastdownload.php?id='+id;
    createPopup(200,200,url);
  }
}

function createPopup(windowwidth, windowheight, url)
{
  var popupwindow = window.open(url, "pixelplayer", "dependent=yes,toolbar=no,directories=no,menubar=no,width=" + windowwidth + ",height=" + windowheight + ",scrollbars=yes,resizable=yes");
  popupwindow.focus();
}

function quoteforumpost(member)
{
  var txt = '';
  
  if (window.getSelection)
  {
    txt = window.getSelection();
  }
  else if (document.getSelection)
  {
    txt = document.getSelection();
  }
  else if (document.selection)
  {
    txt = document.selection.createRange().text;
  }
  else return;
          
  if(txt == '')
  {
    alert('Du måste markera en text att citera.');
  }
  else
  {
    document.svara.text.value += "[quote=" + member + "]" + txt + "[/quote]\n";
  }
}