﻿function swapSelectedOther(list, textBox) {
    var selectedVal;
    
    selectedVal = list.options[list.selectedIndex].value;
    textBox.value = selectedVal;
    if (selectedVal == '') {
        textBox.style.display = '';
        textBox.focus();
    } else {
        textBox.style.display = 'none';
    }
}

function hideObject(id) {
	document.getElementById(id).style.display='none';
}

function setUniqueRadioButton(nameregex, current) {
   re = new RegExp(nameregex);
   for(i = 0; i < document.forms[0].elements.length; i++) {
      elm = document.forms[0].elements[i]
      if (elm.type == 'radio') {
         if (re.test(elm.name)) {
            elm.checked = false;
         }
      }
   }
   current.checked = true;
}

if (document.getElementById("navigation") != null) {
    navHover = function() {
        var lis = document.getElementById("navigation").getElementsByTagName("LI");
        for (var i = 0; i < lis.length; i++) {
            lis[i].onmouseover = function() {
                this.className += " iehover";
            }
            lis[i].onmouseout = function() {
                this.className = this.className.replace(new RegExp(" iehover\\b"), "");
            }
        }
    }
    if (window.attachEvent) window.attachEvent("onload", navHover);
}


function openSmallWindow (page) {
	window.open(page, 'newwindow', 'height=950, width=700, menubar=0, location=0, directories=0, status=0, scrollbars=1, resizable=0');
}
