function quote_scroll(req)
{
    var quoteDiv = document.getElementById("quote-div");
    quoteDiv.scrollTop = quoteDiv.scrollHeight;
}

var quotestep_id;
var ajax_quote_var;
function ajax_quote() {
    if(quotestep_id>2) {
        window.location = 'quote.php';
    }else{
    ajax_quote_var =  new Ajax.Updater('quote-div','quote.php',{method:'get', 
onSuccess: setTimeout('quote_scroll()', 1000)});
    }
}

function ajax_quoteid(stepvalue,quote_idvalue) {
    quotestep_id = stepvalue;
    var pars = 'quote_step='+stepvalue+'&quote_id='+quote_idvalue;
    var myAjax = new Ajax.Request('quoteid.php',
    {method: 'get', parameters: pars, onComplete: ajax_quote}
    );
}
