﻿function vis(obj) {
    if (obj.style.display == '') {
        obj.style.display = 'none';
    } else {
        obj.style.display = '';
    }
}

function getElement(controlname) {
    var theform = document.forms[0];
    for (i = 0; i < theform.elements.length; i++) {
        
        if (theform.elements[i].id.indexOf(controlname) != -1) {
        
            return theform.elements[i];
        }
    }
    return null;
}

function getTable(controlname) {
    var tableList = document.getElementsByTagName("table");
    for (i = 0; i < tableList.length; i++) {

        if (tableList[i].id.indexOf(controlname) != -1) {

            return tableList[i];
        }
    }
    return null;
}