function doStep3() {
    var mfc = escape(document.getElementById('manufacturer').value);
    var mt = escape(document.getElementById('modeltype').value);
    var sUrl = "http://www.databazaar.com/databazaar.storefront/EN/UserTemplate/126?mf="+mfc+"&mt="+mt; 

    var handleSuccess = function(o) {
    var step3 = document.getElementById('model');
    if(step3.length > 1) {
        var childrenEls = step3.childNodes;
        for (var x = (childrenEls.length-1); x>=3; x--) {
            step3.removeChild(childrenEls[x]); 
        } 
    }
	    if (o.responseText !== undefined) {
	    var pmodels = eval("(" + o.responseText + ")");
	    for (var pmod in pmodels) {
		var newSelectOption = document.createElement('option');
		newSelectOption.text = pmod;
		newSelectOption.innerText = pmod;
		newSelectOption.value = pmodels[pmod];
		step3.appendChild(newSelectOption);
	    }
	}
    step3.disabled=false;
    };

    var handleFailure = function(o){
        alert("There was a failure with the request to the remote data source. Please try again.");
    };

    var callback = {
        success: handleSuccess,
        failure: handleFailure
    };
    
    var transaction = YAHOO.util.Connect.asyncRequest('GET', sUrl, callback, null);
    
}  
//YAHOO.util.Event.addListener(document.getElementById('model'), "change", doStep3);
function doSub() {
    var finalButton = document.getElementById('goto');
    finalButton.href="http://www.databazaar.com/databazaar.storefront/EN/Catalog/"+ document.finderform.model.value;
}
