
function getProducts(theBrand){
	var url="../include/asp/getProduct.asp";
	var pars="pbid="+theBrand;
	var myAjax=new Ajax.Request(
			url, 
			{
				method: "post", 
				parameters: pars,
				onComplete: setProducts,
				evalScripts: true
			});
}

function setProducts(theReq){
	var nv=eval(theReq.responseText);
	var theList=$("products");
	theList.length=nv.length;
	for(i=0;i<nv.length;i++){
		theList.options[i]=new Option(nv[i].text,nv[i].value);
		theList.options[i].selected=nv[i].value==$F("CURR_PRODUCT");
	}
	//$("CURR_PRODUCT").value="";
}

function getCase(theBrandid,thePrd){
	var pars="";
	pars+=isNaN(theBrandid)?"":"&brandid="+theBrandid;
	pars+=thePrd==""?"":"&product="+escape(thePrd);
	pars=pars==""?"":"?"+pars.substr(1);
	location.href="01.asp"+pars;
}


