function getModels() {
	var make = $F("make");
	if(make != "") {
		
		var url = 'include/js/DynamicSelect.php';
		var pars = 'make=' + make
		
		var myAjax = new Ajax.Request(
			url, 
			{
				method: 'post', 
				parameters: pars, 
				onComplete: populateModels
			});		
	} else {
		$('model').options.length = 1;
	}
}

function populateModels(originalRequest) {
	var modSel = $('model');
	var models = originalRequest.responseText.split("|");
	var count = 1;
    /* First clear out the original values of the select box */
    modSel.options.length = 1;

    /* Loop through all elements of array */
    for(var i=0; i<models.length; i++){
        opt = new Option(models[i], models[i]);
        modSel.options[count] = opt;

        count++;
    }
}

