function emptyContainer(id)
{
	var str;
	str = "";
	document.getElementById(id).innerHTML = str;
}

function getXmlHttpObject()
{
	var xmlHttp=null;
	try {
  		// Firefox, Opera 8.0+, Safari
  		xmlHttp=new XMLHttpRequest();
  	} catch (e)
  	{
  		// Internet Explorer
  		try {
    		xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    	} catch (e)
    	{
    		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    	}
  	}
	return xmlHttp;
}

function getList(id,qry)
{
	var xmlHttp;
	
	xmlHttp = getXmlHttpObject();
	if (xmlHttp != null) {
		xmlHttp.onreadystatechange = function() {
			if (xmlHttp.readyState == 4) {
				document.getElementById(id).innerHTML = xmlHttp.responseText;
			}
		}
		xmlHttp.open("GET",qry,true);
		xmlHttp.send(null);
	}
}

function urlEncode(str)
{
	str = escape(str);
	str = str.replace('+', '%2B');
	str = str.replace('%20', '+');
	str = str.replace('*', '%2A');
	str = str.replace('/', '%2F');
	str = str.replace('@', '%40');
	return str;
}

function urlDecode(str)
{
	str = str.replace('+', ' ');
	str = unescape(str);
	return str;
}