// JavaScript Document
function getQuantity(selectArray) 
{
	
	clearPrice();
	
	// check to see that all the select lists have values before we continue
	for (i=0;i<selectArray.length;i++) {
		
		var selectList = selectArray[i];
		
		if(document.getElementById(selectList).value == 0)
			{
			document.getElementById('buttonGetPrice').disabled = true;
			clearPrice();
			removeAllOptions(document.getElementById('qty'));
			addOption(document.getElementById('qty'), "Select Quantity", 0);
			return false;
			}
		
	}
	
		removeAllOptions(document.getElementById('qty'));
	addOption(document.getElementById('qty'),"Loading Prices...Please Wait",0);
	document.getElementById('qty').disabled = true;
	
	
	stockid = document.getElementById('stockid').value;
	colourid = document.getElementById('colourid').value;
	pages = document.getElementById('pages').value;
	producttypeid = document.getElementById('producttypeid').value;
	subcatid = document.getElementById('subcatid').value;
	
	var querystring = "stockid="+stockid + " AND colourid=" + colourid + " AND pages=" + pages + " AND producttypeid=" + producttypeid + " AND subcatid=" + subcatid;
	
	
	display_data(querystring);
}
