﻿$(document).ready(function() {

$('#ctl00_ContentPlaceHolder1_RadioButtonList1_0').attr("checked", "checked");
$('#ctl00_ContentPlaceHolder1_txtName').attr("disabled", false).css('background-color', 'white').focus();
$('#ctl00_ContentPlaceHolder1_txtOut').attr({ value: '', disabled: 'true' }).css('background-color', 'lightblue');
$('#ctl00_ContentPlaceHolder1_txtIn').attr({ value: '', disabled: 'true' }).css('background-color', 'lightblue');
$('#ctl00_ContentPlaceHolder1_txtWidth').attr({ value: '', disabled: 'true' }).css('background-color', 'lightblue');

    $('#page_content').find(':radio').bind("change click", function() {

    var $selectedValue = $('[name=ctl00$ContentPlaceHolder1$RadioButtonList1]:checked').val();

        if ($selectedValue == 0) {
            $('#ctl00_ContentPlaceHolder1_txtName').attr("disabled", false).css('background-color', 'white').focus();
            $('#ctl00_ContentPlaceHolder1_txtOut').attr({ value: '', disabled: 'true' }).css('background-color', 'lightblue');

            $('#ctl00_ContentPlaceHolder1_txtIn').attr({ value: '', disabled: 'true' }).css('background-color', 'lightblue');
            $('#ctl00_ContentPlaceHolder1_txtWidth').attr({ value: '', disabled: 'true' }).css('background-color', 'lightblue');
        }
        else if ($selectedValue == 1) {
        $('#ctl00_ContentPlaceHolder1_txtOut').attr("disabled", false).css('background-color', 'white').focus();
            $('#ctl00_ContentPlaceHolder1_txtName').attr({ value: '', disabled: 'true' }).css('background-color', 'lightblue');

            $('#ctl00_ContentPlaceHolder1_txtIn').attr({ value: '', disabled: 'true' }).css('background-color', 'lightblue');
            $('#ctl00_ContentPlaceHolder1_txtWidth').attr({ value: '', disabled: 'true' }).css('background-color', 'lightblue');
        }
        else if ($selectedValue == 2) {
        $('#ctl00_ContentPlaceHolder1_txtIn').attr("disabled", false).css('background-color', 'white').focus();
            $('#ctl00_ContentPlaceHolder1_txtName').attr({ value: '', disabled: 'true' }).css('background-color', 'lightblue');
            $('#ctl00_ContentPlaceHolder1_txtOut').attr({ value: '', disabled: 'true' }).css('background-color', 'lightblue');
            $('#ctl00_ContentPlaceHolder1_txtWidth').attr({ value: '', disabled: 'true' }).css('background-color', 'lightblue');
        }
        else if ($selectedValue == 3) {
        $('#ctl00_ContentPlaceHolder1_txtWidth').attr("disabled", false).css('background-color', 'white').focus();
            $('#ctl00_ContentPlaceHolder1_txtName').attr({ value: '', disabled: 'true' }).css('background-color', 'lightblue');
            $('#ctl00_ContentPlaceHolder1_txtIn').attr({ value: '', disabled: 'true' }).css('background-color', 'lightblue');
            $('#ctl00_ContentPlaceHolder1_txtOut').attr({ value: '', disabled: 'true' }).css('background-color', 'lightblue');
        }
    });
});
