﻿function highlight(txt) { txt.className='highlightField' }
function darken(txt) { txt.className='inputField' }
function scrollToError() { window.location = window.location+"#errorMsg"; }
function loadwindow(url,width,height)
{
	var w=width;
	var h=height;
	var l = (screen.availWidth - width) - 30;
	var t = (screen.availHeight - height)/2 ;
	var windowprops = "location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=no,status=no,directories=no" + ",left=" + l + ",top=" + t + ",width=" + w + ",height=" + h;
	var popup;
	
	popup=window.open(url,"popup",windowprops)
	popup.focus()
}
function toggleSpecify(item)
{
    var specify = document.getElementById('specify');
    var auditor = document.getElementById('auditor');
    switch (item)
    {
        case "audit":
            specify.style.display = 'none';
            auditor.style.display = 'block';
        break;
        case "other":
            specify.style.display = 'block';
            auditor.style.display = 'none';
        break;
        case "none":
            specify.style.display = 'none';
            auditor.style.display = 'none';
        break;
    } 
}
function checkSelection()
{
    var specify = document.getElementById('specify');
    if (specify == null)
        return;
    var other = document.getElementById('ctl00_MainContent_hesProgram_3');
    specify.style.display = (other.checked) ? 'block' : 'none';
    var audit = document.getElementById('ctl00_MainContent_hesProgram_2');
    var auditor = document.getElementById('auditor');
    auditor.style.display = (audit.checked) ? 'block' : 'none';
}
