function showRollOver(id) {
    document.getElementById(id).style.visibility = 'visible';
}

function hideRollOver(id) {
    document.getElementById(id).style.visibility = 'hidden';
}

function openWin(wFile, wWidth, wHeight, wScrolling) {
    myWin = window.open(wFile, 'ctxWin', 'width=' + wWidth + ',height=' + wHeight + ',resizable=1,scrollbars=' + wScrolling);
    myWin.moveTo((screen.width / 2) - (wWidth / 2), (screen.height / 2) - (wHeight / 2));
    myWin.focus();
}

function uncheckBox(elem) {
    o = document.getElementById(elem);
    if (o != null) {
        if (o.checked)
            o.checked = false;
    }
}

function clearTexbox(cb, elem) {
    o = document.getElementById(elem);
    if (cb.checked && o != null) {
        o.value = "";
    }
}

function hideButton(obj) {
    obj.style.visibility = 'hidden';
    return;
}


function markAsError(objId) {
    //label TD
    lbl = document.getElementById(objId + "_l");
    //field TD
    fld = document.getElementById(objId + "_f");
    if (lbl)
        lbl.className += " error";
    if (fld)
        fld.className += " error";
}


function textCounter(field, maxlimit) {
    if (field.value.length > maxlimit)
        field.value = field.value.substring(0, maxlimit);
} 
