
/* - ++resource++omd.content.js/omdcourse_subscription.js - */
jq(document).ready(function(){

    hideParams = function(){
        jq("#form-widgets-clinicNo").parent().parent().hide();
        jq("#form-widgets-customerName").parent().parent().hide();
        jq("#form-widgets-customerVATNo").parent().parent().hide();
        jq("#form-widgets-customerAddress").parent().parent().hide();
        jq("#form-widgets-customerPostalCode").parent().parent().hide();
        jq("#form-widgets-customerLocation").parent().parent().hide();
    }

    jq("#form-widgets-invoiceTo").change(function(obj){
        var value = jq("#form-widgets-invoiceTo option:selected").val();
        switch(value){
            case "other":
                jq("#form-widgets-customerName").parent().parent().show();
                jq("#form-widgets-customerVATNo").parent().parent().show();
                jq("#form-widgets-customerAddress").parent().parent().show();
                jq("#form-widgets-customerPostalCode").parent().parent().show();
                jq("#form-widgets-customerLocation").parent().parent().show();
                break;
            default:
                hideParams();
                break; 
        }
    });

    if (jq("#form-widgets-invoiceTo option:selected").val() != "other"){
        hideParams();
    }
})


