// JavaScript Document


var xhr = false;

function getProducts(prodURL){

	if (window.XMLHttpRequest) {
		xhr = new XMLHttpRequest();
	}
	else {
		if (window.ActiveXObject) {
			try {
				xhr = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e) { }
		}
	}




	if (xhr) {
		xhr.onreadystatechange = showContents;
		xhr.open("GET", prodURL, true);
		xhr.send(null);
	}
	else {
		alert("Page Error");
	}
	
	return false; 
	
	
	
}


function showContents(){

	if (xhr.readyState == 4) {
		if (xhr.status == 200) {
			var outMsg = xhr.responseText;
		}
		else {
			var outMsg = "There was a problem with the request " + xhr.status;
		}

		var thisResult = document.getElementById("products_frame");
		thisResult.innerHTML = outMsg;
		
		
	}
}
