﻿// JScript File
function FormatTextBox(ctrlName)
{
    var tb = document.getElementById(ctrlName)
    
    if (tb)
    {  
        if (tb.value.length == 0)
        {  
            tb.style.backgroundColor = '#eeeede';
        }
    }
}

function FormatTextBoxFocus(ctrlName,state)
{

    var tb = document.getElementById(ctrlName)
    if (tb)
    { 
   //alert(state);
        if (state == 'focus' && tb.value.length<1)
        {
      
            tb.style.backgroundColor = '#dddddd';
        }
        
        if (state == 'blur'  && tb.value.length<1)
        {
        
            tb.style.backgroundColor = '#eeeede';
        }
        else
        {
   
        tb.style.backgroundColor = '#ffffff';
        }
    }
}

