﻿//ajax
function CreateAjObj()
{
    var xmlObj = false;
	try
	 {
	    xmlObj=new XMLHttpRequest;
	 }
	 catch(e)
	 {
	      try
		  {
	          xmlObj=new ActiveXObject("MSXML2.XMLHTTP");
	      }
	      catch(e2)
		  {
	          try
			  {
	              xmlObj=new ActiveXObject("Microsoft.XMLHTTP");
	          }
	          catch(e3)
			  {
	              xmlObj=false;
	          }
	      }
	 }	
	 return xmlObj;
 }		
 function GetData(url,action)
 {
    var xmlObj = CreateAjObj();
    if(xmlObj)
    {
        xmlObj.open("GET",url,true);
        xmlObj.onreadystatechange = function()
        {
            if(xmlObj.readyState==4)
            {
                action(xmlObj.responseXML);
            }
        }
        xmlObj.send(null);
    }
 }
