function replaceDivPHP(id, phpurl, type)
{
        var container = document.getElementById(id);
	container.innerHTML = "Generating....";
        var httpxml;
try
  {
  // Firefox, Opera 8.0+, Safari
  httpxml=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
                  try
                                        {
                                 httpxml=new ActiveXObject("Msxml2.XMLHTTP");
                                }
                        catch (e)
                                {
                        try
                {
                httpxml=new ActiveXObject("Microsoft.XMLHTTP");
                 }
                        catch (e)
                {
                alert("Your browser does not support AJAX!");
                return false;
                }
                }
  }
function stateck()
    {
    if(httpxml.readyState==4)
      {
var phpout=httpxml.responseText;
//new_element.appendChild(document.createTextNode(phpout));
container.innerHTML = phpout;
//container.appendChild(new_element);
      }
    }

phpurl=phpurl+"?num="+id+"&type="+type;
httpxml.onreadystatechange=stateck;
httpxml.open("GET",phpurl,true);
httpxml.send(null);
}

