// JavaScript Document

function LoadPrices(pr_cat_id)
{ 
	var xmlHttp;
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null) {
	  alert ("Your browser does not support AJAX!");
	  return;
	 }
	 
	var pagesObj = document.getElementById("producttype"); 
	var producttype = pagesObj.options[pagesObj.selectedIndex].value; 

	var url="../ajax/loadprices.php";
	url=url+"?producttype="+producttype;
	url=url+"&pr_cat_id="+pr_cat_id;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange = function() {
		
		if ((xmlHttp.readyState==1) || (xmlHttp.readyState==2) || (xmlHttp.readyState==3)) {
			document.getElementById("pricetablesbox").innerHTML="Loading...";
		} else if (xmlHttp.readyState==4) {
			document.getElementById("pricetablesbox").innerHTML=xmlHttp.responseText;
		}
	
	}
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);

}