﻿// JScript File

function validateForm(parentDiv) {
    var bValid = true;
    $.each(parentDiv.find(".requiredField"), function() {
        if ($(this).val().length == 0) {
            $(this).css("border", "1px dotted red");
            bValid = false;
        } else {
            $(this).css("border", "");
        }
    });
    if (!bValid)
        $('.requiredSummary').show();
    return bValid;
}

$(document).ready(function() {
    $.each($("input.calendar"), function() {
        $(this).after("<a href=\"#\" onclick=\"$('#" + this.id + "').focus(); return false;\" id=\"lnk" + this.id + "\"><img style=\"padding-left: 4px;\" src=\"/ResourceCenter/inc/_i/Calendar_scheduleHS.png\" alt=\"C\"/></a>");
        $(this).datepicker();
    });
});
