﻿// JScript File

function IsComboValid(source, arguments) {
    var dropdown = document.getElementById(source.controltovalidate);
    var selIndex = dropdown.selectedIndex;
    if (selIndex == 0 || dropdown.options[selIndex].text == "") {
        arguments.IsValid = false;
    }
    else {
        arguments.IsValid = true;
    }
}

function toggleDiv(tagName, val) {
    if (document.getElementById) {
        // this is the way the standards work
        var tagStyle = document.getElementById(tagName).style;
        tagStyle.display = val;
    }
    else if (document.all) {
        // this is the way old msie versions work
        var tagStyle = document.all[tagName].style;
        tagStyle.display = val;
    }
    else if (document.layers) {
        // this is the way nn4 works
        var tagStyle = document.layers[tagName].style;
        tagStyle.display = val;
    }
}
