// JavaScript Document
function AJAXXMLHttp()
{
}
AJAXXMLHttp.createRequest=function()
                 {
				   try { return new ActiveXObject("Msxml9.XMLHTTP"); } catch (e) {}
				   try { return new ActiveXObject("Msxml8.XMLHTTP"); } catch (e) {}
				   try { return new ActiveXObject("Msxml7.XMLHTTP"); } catch (e) {}
				   try { return new ActiveXObject("Msxml6.XMLHTTP"); } catch (e) {}
				   try { return new ActiveXObject("Msxml5.XMLHTTP"); } catch (e) {}
				   try { return new ActiveXObject("Msxml4.XMLHTTP"); } catch (e) {}
				   try { return new ActiveXObject("Msxml3.XMLHTTP"); } catch (e) {}
				   try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {}
				   try { return new ActiveXObject("Msxml1.XMLHTTP"); } catch (e) {}
                   try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {}
                   try { return new XMLHttpRequest(); } catch(e) {}
                   alert("XMLHttpRequest not supported");
                   return null;
				 };
function encodeNameAndValue(sName, sValue)
{
  var sParam = encodeURIComponent(sName);
  sParam += "=";
  sParam += encodeURIComponent(sValue);
  return sParam;				
}

function el_id(element)
{
	return document.getElementById(element);
}

function el_name(element)
{
	return document.getElementsByName(element);
}

function getAJAX(what, destination)
{
	var req=AJAXXMLHttp.createRequest();
	var xyz=new Array();
	req.open("post",destination,true);
	xyz.push(encodeNameAndValue('null_data','data'));
	req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	req.onreadystatechange=function()
	{
		if(req.readyState==4)
		{
			if(req.status==200||req.status==304)
			{
				el_id(what).innerHTML=req.responseText;
			}
		}
	}
	req.send(xyz.join("&"));
}
