function SetFocusNotNull (ControlID) {
// Take advantage of javascript variable argument lists. Loop thru
// arguments, and set focus to the first one that is not null
    for (var i = 0; i < SetFocusNotNull.arguments.length; i++){
        if (parseInt(navigator.appVersion) > 4){
            targetcontrol = document.getElementById(SetFocusNotNull.arguments[i]);
        }
        else {
            if (navigator.appName == "Netscape"){
               targetcontrol = document.item(SetFocusNotNull.arguments[i]);
            }
            else {
                   targetcontrol = document.all.item(SetFocusNotNull.arguments[i]);
            }
        }
					
        if (targetcontrol != null) {
            if (!targetcontrol.disabled) {
               targetcontrol.focus();
	return 0;
            }
        }
    }
    return 1;
}
	
function SetFocusEnabled (ControlID) {
    // Take advantage of javascript variable argument lists. Loop thru
    // arguments, and set focus to the first one that is not disabled
    for (var i = 0; i < SetFocusEnabled.arguments.length; i++){
        if (parseInt(navigator.appVersion) > 4){
            targetcontrol = document.getElementById(SetFocusEnabled.arguments[i]);
        }
        else {
            if (navigator.appName == "Netscape"){
                targetcontrol = document.item(SetFocusEnabled.arguments[i]);
            }
            else {
                targetcontrol = document.all.item(SetFocusEnabled.arguments[i]);
            }
        }
            
        if (!targetcontrol.disabled) {
            targetcontrol.focus();
            return 0;
        }
    }
    return 1;            
}

function SetFocusHere (ControlID) {
    if (parseInt(navigator.appVersion) > 4){document.getElementById(ControlID).focus();}
    else {
        if (navigator.appName == "Netscape"){document.item(ControlID).focus();}
        else {document.all.item(ControlID).focus();}
    }
}

function EnableThis (ControlID) {
    if (parseInt(navigator.appVersion) > 4){
        document.getElementById(ControlID).disabled = false;
    }
    else {
        if (navigator.appName == "Netscape"){
            document.item(ControlID).disabled = false;
        }
        else {
            document.all.item(ControlID).disabled = false;
        }
    }
}

function DisableThis (ControlID) {
    if (parseInt(navigator.appVersion) > 4){
        document.getElementById(ControlID).disabled = true;
    }
    else {
        if (navigator.appName == "Netscape"){
            document.item(ControlID).disabled = true;
        }
        else {
            document.all.item(ControlID).disabled = true;
        }
    }
}
    
function HideThis (ControlID) {
    if (parseInt(navigator.appVersion) > 4){
        document.getElementById(ControlID).style.display = "none";
    }
    else {
        if (navigator.appName == "Netscape"){
            document.item(ControlID).style.display = "none";
        }
        else {
            document.all.item(ControlID).style.display = "none";
        }
    }
}

function MakeThisVisible (ControlID) {
    if (parseInt(navigator.appVersion) > 4){
        document.getElementById(ControlID).style.display = "";
    }
    else {
        if (navigator.appName == "Netscape"){
            document.item(ControlID).style.display = "";
        }
        else {
            document.all.item(ControlID).style.display = "";
        }
    }
}

function NewWindow(Url) {window.open(Url,'NewWindow','scrollbars=yes,menubar=yes,width=650,height=550,status=yes,toolbar=yes,resizable=yes');}

function showHide(entryID, entryLink, htmlObj, type) {
	if (type == "comments") {
		extTextDivID = ('comText' + (entryID));
		extLinkDivID = ('comLink' + (entryID));
	} 
	else {
		extTextDivID = ('extText' + (entryID));
		extLinkDivID = ('extLink' + (entryID));
	}
	if( document.getElementById ) {
		if( document.getElementById(extTextDivID).style.display ) {
			if( entryLink != 0 ) {
				document.getElementById(extTextDivID).style.display = "block";
				document.getElementById(extLinkDivID).style.display = "none";
				htmlObj.blur();
			} 
			else { 
				document.getElementById(extTextDivID).style.display = "none";
				document.getElementById(extLinkDivID).style.display = "block";
			}
		} 
		else {
			location.href = entryLink;
			return true;
		}
	} 
	else {
		location.href = entryLink;
		return true;
	}
}