
	var xmlHttp;
	
	function RefreshList(form, idtype, idOrOptionCollection, divtoupdate, style)
	{
		if (xmlHttp = GetXmlHttpObject())
		if (xmlHttp == null)
		{
			form.submit();
		}
		else
		{
			var ids;
			if (typeof(idOrOptionCollection) === 'object') {
				ids = [];
				for (var i=0; i<idOrOptionCollection.length; i++) {
					if (idOrOptionCollection[i].selected) {
						ids.push(idOrOptionCollection[i].value);
					}
				}
			} else {
				ids = [idOrOptionCollection];
			}
		
			var url = "/include/fnAjaxCommands.asp?style=" + style + "&id=" + ids.join('%2C');
			url = url + "&idtype=" + idtype;
			url = url + "&sid=" + Math.random();
			xmlHttp.onreadystatechange = function () {
				if (xmlHttp.readyState == 4 || xmlHttp.readyState == "complete")
				{ 
					document.getElementById(divtoupdate).innerHTML = xmlHttp.responseText;
					document.getElementById(divtoupdate).style.display = 'block';
				} 
			};
			xmlHttp.open("GET", url, true)
			xmlHttp.send(null) 
			
		}
	}
	
	function RefreshLocationList(form, idtype, idOrOptionCollection, divtoupdate, style, tableproperties, ismultiple, multiplesize)
	{
		if (xmlHttp = GetXmlHttpObject())
		if (xmlHttp == null)
		{
			form.submit();
		}
		else
		{
			var ids;
			if (typeof(idOrOptionCollection) === 'object') {
				ids = [];
				for (var i=0; i<idOrOptionCollection.length; i++) {
					if (idOrOptionCollection[i].selected) {
						ids.push(idOrOptionCollection[i].value);
					}
				}
			} else {
				ids = [idOrOptionCollection];
			}
		
			var url = "/include/fnAjaxCommands.asp?style=" + style + "&tableproperties=" + tableproperties + "&divtoupdate=" + divtoupdate + "&ismultiple=" + ismultiple + "&multiplesize=" + multiplesize + "&id=" + ids.join('%2C');
			url = url + "&idtype=" + idtype;
			url = url + "&sid=" + Math.random();
			xmlHttp.onreadystatechange = function () {
				if (xmlHttp.readyState == 4 || xmlHttp.readyState == "complete")
				{ 
					//alert(xmlHttp.responseText);
					document.getElementById(divtoupdate).innerHTML = xmlHttp.responseText;
					document.getElementById(divtoupdate).style.display = 'block';
				} 
			};
			xmlHttp.open("GET", url, true)
			xmlHttp.send(null) 
			
		}
	}
		
	function GetXmlHttpObject()
	{ 
		var objXMLHttp = null
		if (window.XMLHttpRequest)
		{
			objXMLHttp = new XMLHttpRequest()
		}
		else if (window.ActiveXObject)
		{
			objXMLHttp = new ActiveXObject("Microsoft.XMLHTTP")
		}
		return objXMLHttp
	}	
	
	
	