var xmlHttp;

function createimagexmlRequest()
{
  if(window.ActiveXObject)
  {
    imagexml = new ActiveXObject("Microsoft.XMLHTTP");
  }
  else if(window.XMLHttpRequest)
  {
    imagexml = new XMLHttpRequest();
  }
}

function handleStateChange()
{
  if(imagexml.readyState == 4)
  {
    if(imagexml.status == 200)
    {
      document.getElementById("main").innerHTML = imagexml.responseText;
    }
  }
}

var tab_id;
var menu_id;
var pageid;
function startupload(tab_id, menu_id, pageid)
{
  createimagexmlRequest();
  imagexml.onreadystatechange = handleStateChange;
  imagexml.open("POST", "upload.class.php?tab_id=" + tab_id + "&menu_id=" + menu_id + "&pageid=" + pageid, true);
  imagexml.send(null);
}

var verwijderen;

function verwijderen(verwijderen, menu_id, tab_id)
{
  createimagexmlRequest();
  imagexml.onreadystatechange =  handleStateChange;
  imagexml.open("POST", "upload.class.php?unlink=" + verwijderen + "&menu_id=" + menu_id + "&tab_id=" + tab_id, true);
  imagexml.send(null);
}

