
function DoCallback(url, params, page){
// params: string object to pass to the remote URL
	
// Add some parameters to the query string
var pageUrl = "";

if (url.indexOf('?')>0)
    pageUrl = url + "&callback=true&param=" + params + "&page=" + page;
else
    pageUrl = url + "?callback=true&param=" + params + "&page=" + page;

// Initialize the XmlHttp object
	try {
		//Mozilla Browsers
		xmlRequest = new XMLHttpRequest();
	} 
	catch (e) {
		try {
			//IE
			xmlRequest = new ActiveXObject("Microsoft.XMLHTTP");
		} 
		catch (e) {
			//Something else that won't work with this code...
			xmlRequest=false;
		}
	} 
	// Post our XmlRequest and get our desired string
	xmlRequest.open("GET", pageUrl, false);
	
	xmlRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	xmlRequest.send(null);

	// Return the XmlHttp object
	return xmlRequest;
}		
		
function ShowModels(i,j){
	//Get the value of the selected item

	//Get data from the server
	var currenturl = location.href;
	var xml = DoCallback(currenturl, i,j);
	
	//Place data in a string    
	var Models = xml.responseText;
	
	if (Models == "") 
		return "";	
	else
	{
		return eval("[[" + Models + "]]");	
	}
}
