﻿// JScript File
function checkLength(tb, maxChars, counter) {
if ((isNaN(maxChars) == true) || (maxChars <= 0)) return;
var charCount = tb.value.length;
if (charCount > maxChars) tb.value = tb.value.substr(0, maxChars);
var charsLeft = (maxChars - charCount);
if (charsLeft < 0) charsLeft = 0;
if (counter) {
if (document.all) counter.innerText = charsLeft;
else counter.textContent = charsLeft;
}}

function confirmDelete()
{
    if(confirm("Do you really want to Delete!!"))
    {
        return true;
    }
    else
    {
        return false;
    }
}

function displayState(objForm, dState)
{   
   var country = objForm.value;   
    var elmState = document.getElementById(dState); 
     
    if (country == "India" || country == "IN")
    {
        elmState.style.display=""        
    }
    else
    {
        elmState.style.display="none"    
    }
  }
  
  function test(objForm)
  {
  alert(objForm.value)
  }
