function AJAXInteraction(url,container,pname) 
{
    var req = init();
    req.onreadystatechange = processRequest;
    function init() 
		{
      if (window.XMLHttpRequest) 
			{
        return new XMLHttpRequest();
      } 
			else if (window.ActiveXObject)
			{
        return new ActiveXObject("Microsoft.XMLHTTP");
      }
    }
    
    function processRequest () 
		{
      if (req.readyState == 4) 
			{
        if (req.status == 200) 
					 document.getElementById(container).innerHTML = req.responseText;
      }
    }

    this.doGet = function() 
		{
      req.open("GET", url, true);
      req.send(null);
    }
    
    this.doPost = function(body) 
		{
      req.open("POST", url, true);
      req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
      req.send(body);
    }
}

function Get_Item(pid,pname) 
{
  var ai = new AJAXInteraction('get_info.php?prodID='+pid,'maininfo', pname);
  ai.doGet();
}

function reload_download(id)
{
	var ai = new AJAXInteraction('reload_big_image.php?id=' + id,'big-image'); 
	ai.doPost();
	ai = new AJAXInteraction('reload_description.php?id=' + id,'description'); 
	ai.doPost();
	return false;
}


