﻿/// <reference path="jquery-1.4.1-vsdoc.js" />

// By adding the tripple commented reference tag at the top of this page it will pull in the vsdoc
// file and give us intellisense for this script.


$(document).ready(function() {
    // To select a class preceed its name with .
    // To select an ID preceed its name with #
    // To select an element just use its name
    $('#QuickChange').change(function() {
        var formulaSet = $(this).val();
        //debugger;
        switch (formulaSet) {
            case "0":
                $('#R4').val(0);
                $('#R3').val(0);
                $('#R2').val(0);
                $('#R1').val(0);
                $('#PP').val(0);
                $('#S1').val(0);
                $('#S2').val(0);
                $('#S3').val(0);
                $('#S4').val(0);
                break;
            case "1":
                $('#R4').val(0);
                $('#R3').val(1);
                $('#R2').val(0);
                $('#R1').val(0);
                $('#PP').val(4);
                $('#S1').val(0);
                $('#S2').val(0);
                $('#S3').val(1);
                $('#S4').val(0);
                break;
            case "2":
                $('#R4').val(1);
                $('#R3').val(2);
                $('#R2').val(1);
                $('#R1').val(1);
                $('#PP').val(0);
                $('#S1').val(1);
                $('#S2').val(1);
                $('#S3').val(2);
                $('#S4').val(1);
                break;
        }
        this.form.submit();
    });

});

