﻿/// <reference path="~/Shared/Scripts/jquery-1.3.2.js" />
/// <reference path="~/Shared/Scripts/jquery.charcounter.js" />
/// <reference path="~/Shared/Scripts/jquery.extensions.js" />

function pageLoad() {
    $(document).ready(function() {

        var checkBoxIsPress = $('[id$="_checkBoxIsPress"]');
        var textBoxPressOutlet = $('[id$="_textBoxPressOutlet"]');

        $(textBoxPressOutlet).attr('disabled', !$(checkBoxIsPress).click(function() {
            $(textBoxPressOutlet).attr('disabled', !$(this).attr('checked'));
        }).attr('checked'));

        $('[id$="_textBoxMailingAddressOtherCountry"]').charCounter(500,
        {
            container: "<div></div>",
            classname: "counter"
        });

        $('[id$="_textBoxSpecialAssistance"]').charCounter(500,
        {
            container: "<div></div>",
            classname: "counter"
        });

        var validationSummary = $('[id$="_panelValidationSummary"]')

        if (validationSummary[0] != null) {
            $(validationSummary).scrollTo(1000);
        }
    });
    
    $(function() {
        $('input[id$=textBoxEmailConfirm]').bind('paste', function(e) {
                e.preventDefault();
                alert('You cannot ' + e.type + ' text!  Please re-enter your email.');
            });
        });
}

if (Sys && Sys.Application) {
    Sys.Application.notifyScriptLoaded();
} 

        
     