var debug = false;

function bindPrice()
{
	var stockCode = getRadioControlValue('stockcode');

	// Initialise the users, companies, employees fields.
	getSelectControlValue('users', -1);
	getSelectControlValue('companies', -1);
	getSelectControlValue('employees', -1);
		
	if (stockCode.length > 0)
	{		
		var evalString = 'stock' + stockCode;
		var price = 0;
		
		if (debug)
			alert(evalString);
			
		price = eval(evalString);
		
		if (debug)
			alert('Price = ' + price);		
	}
	
	var total = price

	if (debug)
		alert('Total = ' + total);

	var selectedUnitNetControl = getControlByID('selectedunitnet');
	selectedUnitNetControl.value = price;	
	
	bindTotalPrice(total);
}
