﻿// JScript File

//function to restrict the text input in a text area
function setMaxLength(obj, maxLength){

if (obj.value.length>maxLength)
obj.value=obj.value.substring(0,maxLength)
}

function ShowControl(ctrl, bool)
{
    var obj = document.getElementById(ctrl);
    if(bool==true)
        obj.style.display = 'block';
    else
        obj.style.display = 'none';
        
    return false;
}

function setStyle(objId, style, value) {
    document.getElementById(objId).style[style] = value;
}

function tbGotFocus(obj, defaultText) {

    if (obj.value == defaultText) {
        obj.value = '';
    }
}
function tbLostFocus(obj, defaultText) {

    if (obj.value == '') {
        obj.value = defaultText;
    }
}
 

 
