// JavaScript Document

if (typeof $ =='undefined')
{
	$ = function(id)
	{
		return document.getElementById(id);
	}
}

function ajaxObj()
{
	var ajax = false;
	try {
		ajax = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
			ajax = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
			ajax = false;
		}
	}
	if (!ajax && typeof XMLHttpRequest!='undefined')
	{
		ajax = new XMLHttpRequest();
	}
	return ajax;
}

function sajax_do_call(sURL)
{
    oXHtml = ajaxObj();
	oXHtml.open("GET", sURL, false);
	oXHtml.send(''); 
	rtnContent = oXHtml.responseText;
	delete oXHtml;
	return rtnContent;
}

function sajax_post_call(sURL,postStr)
{
    oXHtml = ajaxObj();
	oXHtml.open("POST", sURL, false);
	oXHtml.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	oXHtml.send(postStr);
	rtnContent = oXHtml.responseText;
	delete oXHtml;
	return rtnContent;
}