// JavaScript Document

/* Start Standard Implementation*/
var xmlHttp

function GetXmlHttpObject()
{
	var xmlHttp=null;
	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e)
	{
	  // Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			if (xmlHttp.overrideMimeType) 
			{
				xmlHttp.overrideMimeType('text/xml');
			}
    	}
		catch (e)
		{
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
  	}
	return xmlHttp;
}

function AjaxCall(action, id)
{
  xmlHttp = GetXmlHttpObject();
  xmlHttp.open('get', action, true);
  xmlHttp.onreadystatechange = function(){if(xmlHttp.readyState==4){AjaxWriteResponse(xmlHttp,id)}};
  xmlHttp.send(null);
}

function AjaxWriteResponse(response, id)
{
  var e = document.getElementById(id);
  if (e) {
    e.innerHTML = response.responseText;
  }
}
/* End Standard Implementation*/

/* Start Custom Implementation*/
function AjaxFunctionCall(action, myFunction)
{                       
  xmlHttp = GetXmlHttpObject();
  xmlHttp.open('get', action, true);
  xmlHttp.onreadystatechange = function(){if(xmlHttp.readyState==4 && xmlHttp.status == 200){eval(myFunction)(xmlHttp.responseText)}};
  xmlHttp.send(null);
}
/* End Custom Implementation*/


