﻿//  IS EMPTY OR NULL CHECK//////////////////////////

function IsEmpty(aTextField) {
    if ((aTextField.value.length == 0) ||
   (aTextField.value == null)) {
        return true;
    }
    else { return false; }
}

////////////////////////////////////////////


function pad(n, len) {
    s = n.toString();
    if (s.length < len) {
        s = ('0000000000' + s).slice(-len);
    }
    return s;
}


$(function () {
    $("#pwdDialog").dialog({
        autoOpen: false,
        show: "blind",
        closeOnEscape: true
        
    });
    $("#forgot").click(function () {
        $("#pwdDialog").dialog("open");
        return false;
    });
});
 
function disableEnterKey(e)
 {
      var key;      
     if(window.event)
           key = window.event.keyCode; //IE
      else
           key = e.which; //firefox      

     return (key != 13);
 }
 jQuery(document).ready(function () {

     if (document.URL.indexOf("%23") > 0) {
         //find what tab it wants to go to and set the tab
         var $tabs = $('#subTabs').tabs();
         var selected = $tabs.tabs("option", "selected");
         var tabname = document.URL.substr(document.URL.indexOf("%23") + 3);
         var quotetype = document.URL.indexOf("WorkersComp");
         if (tabname === 'ViewDocuments' && quotetype > 0) {
             $tabs.tabs('select', 1);
         }
         else {
             $tabs.tabs('select', 5);
         }
     }
 })
