// LeasingCalc JS Version
function updateModel() {
    $.getJSON('/index.php?eID=leasingcalc&make='+$("#as24xml_make").val(), function(data) {        
        $("#as24xml_model").find('option').remove();
        $("#as24xml_model").append(
                $('<option>'+labels["ModellButton"]+'</option>')
                ); 
        $.each(data, function(k, v) {
            var i = 0;
            $("#as24xml_model").append(
                $('<option></option>').val(v['model_id']).html(v['modelname'])
                ); 
        });
    });
} 

$(document).ready(function() {
    $("#as24xml_model").change(function() {
        $("#as24xml_link").attr("href", 'http://www.multilease-direct.ch.afbag.net/mlskc'+labels["Sprache"]+'/kfzktl/resultTYP.asp?optPARA_KLK=&optPARA_KDN=&mk=&lk=&getReihe=true&id_hnd=1001&id_fab='+$("#as24xml_make").val()+'&cm3_von=[alle]&cm3_bis=[alle]&id_gru='+$('#as24xml_model').val()+'&kW_von=[alle]&kW_bis=[alle]&name_typ=[alle]&PS_von=[alle]&PS_bis=[alle]&tueren=-1&prs_von=[alle]&prs_bis=[alle]&aufbau=-1&motor=-1&KeepThis=true&TB_iframe=true&height=500&width=595');
        $("#as24xml_link").click();
    });
  // Handler for .ready() called.
});
        
/*
<a href="http://www.multilease-direct.ch.afbag.net/mlskcg
/kfzktl/resultTYP.asp?optPARA_KLK=&optPARA_KDN=&mk=&lk=&getReihe=true&id_hnd=1001&id_fab='.$_POST['Marke_QL'].'
&cm3_von=[alle]&cm3_bis=[alle]&id_gru='.$Modell['model_id'].'&kW_von=[alle]&kW_bis=[alle]&name_typ=[alle]&PS_von=[alle]&PS_bis=[alle]&tueren=-1
&prs_von=[alle]&prs_bis=[alle]&aufbau=-1&motor=-1&KeepThis=true&TB_iframe=true&height=500&width=595" class="thickbox">'.$this->pi_getLL('Link1').'</a> 
<div class="LinkBack_LC"><a href="index.php?id=3659'.$this->pi_getLL('Lang_Switch').'">'.$this->pi_getLL('Link2').'</a></div>


*/
