// JavaScript Document
function getPBCLocationDropDown(ajaxPath) {
	// Set the locations based on county
	countyDropDown = document.getElementById('cboCounty');
	countyID = countyDropDown.options[countyDropDown.selectedIndex].value;

	if ( countyID > 0 ) {
		path = ajaxPath + 'pbcLocations.php?county=' + countyID;
		runAjaxCall(path,'postPBCLocationDropDown',null,null);
	}
}

function postPBCLocationDropDown(str) {
	locationsDrop = document.getElementById('cboPBCLocation');

	locationsDrop.options.length = 0;
	
	if (str.length > 0) {
		var oAry = str.split('|');
		if (oAry.length > 0) {
			for(o = 0;o < oAry.length; o++)
			{
				iAry = oAry[o].split('~');
				opt = document.createElement('option');
				opt.value = iAry[0]; opt.text = iAry[1];
				locationsDrop.options[locationsDrop.options.length] = opt;
				
			}
		}
	}
}