function js_nlead(id)
{
    if (document.getElementById('l_' + id).style.display == 'none')
    {
        document.getElementById('l_' + id).style.display = '';
        document.getElementById('i_' + id).src = 'less.png';
        document.getElementById('i_' + id).title = 'Lead inklappen';
    }
    else
    {
        document.getElementById('l_' + id).style.display = 'none';
        document.getElementById('i_' + id).src = 'more.png';
        document.getElementById('i_' + id).title = 'Lead tonen';
    }
}

function js_rank(id, ud)
{
    document.getElementById('r_' + id).innerHTML= "<span style='font-size:12px;'>......</span>";
    
    var xmlhttp;
    var xres;
    if (window.XMLHttpRequest)
      {
      // code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp=new XMLHttpRequest();
      }
    else if (window.ActiveXObject)
      {
      // code for IE6, IE5
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      }

    xmlhttp.onreadystatechange=function()
    {
    if(xmlhttp.readyState==4)
      {
        xres = xmlhttp.responseText;
        //alert(xres);
        document.getElementById('r_' + id).innerHTML= "<span style='font-size:12px;'>" + xres + "</span>";
      }
    }
    xmlhttp.open("GET","rank.php?id=" + id + "&ud=" + ud + "&nocache=" + Math.floor(Math.random() * 99999)  , true);
    xmlhttp.send(null);
}

function js_crank(id, ud)
{
    document.getElementById('cr_' + id).innerHTML= "<span style='font-size:12px;'>......</span>";
    
    var xmlhttp;
    var xres;
    if (window.XMLHttpRequest)
      {
      // code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp=new XMLHttpRequest();
      }
    else if (window.ActiveXObject)
      {
      // code for IE6, IE5
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      }

    xmlhttp.onreadystatechange=function()
    {
    if(xmlhttp.readyState==4)
      {
        xres = xmlhttp.responseText;
        //alert(xres);
        document.getElementById('cr_' + id).innerHTML= "<span style='font-size:12px;'>" + xres + "</span>";
      }
    }
    xmlhttp.open("GET","crank.php?id=" + id + "&ud=" + ud + "&nocache=" + Math.floor(Math.random() * 99999), true);
    xmlhttp.send(null);
}

function js_curconv()
{
    document.getElementById('cresult').innerHTML= "<span style='font-size:12px;'>......</span>";
    var xmlhttp;
    var xres;
    if (window.XMLHttpRequest)
      {
      // code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp=new XMLHttpRequest();
      }
    else if (window.ActiveXObject)
      {
      // code for IE6, IE5
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      }

    xmlhttp.onreadystatechange=function()
    {
    if(xmlhttp.readyState==4)
      {
        xres = xmlhttp.responseText;
        //alert(xres);
        document.getElementById('cresult').innerHTML=  xres;
      }
    }
    xmlhttp.open("GET","curconv.php?amt=" + document.forms['cconv'].camount.value + "&from=" + document.forms['cconv'].cfrom.value + "&to=" + document.forms['cconv'].cto.value + "&nocache=" + Math.floor(Math.random() * 99999) , true);
    xmlhttp.send(null);
}

function js_react(id, news_id, parent_id)
{
    // load a form in place of the button
    
    
    document.getElementById('com_' + id).innerHTML= "<iframe width=450 height=400 frameborder='0' src='reactform.php?id=" + news_id + "&parent_id=" + parent_id + "'></iframe>";
}