    function hideBusyImage()
    {
        try{ 
           var waitLayer = top.document.getElementById("layer-busy");
           waitLayer.style.display = 'none';
       }
       catch(err){}
        
    }

    function showBusyImage()
    {
        try{ 
           var waitLayer = top.document.getElementById("layer-busy");
           waitLayer.style.display = '';
        }
        catch(err){}
        
    }
function addLoadEvent(func) {
    var oldonload = window.onload;
    if (typeof window.onload != 'function') {
        window.onload = func;
    } else {
        window.onload = function() {
            if (oldonload) {
                oldonload();
            }
            func();
        }
    }
}
    function setErrorClassOnFieldset(id)
    {
        var oFieldSet = document.getElementById(id);
        if ( oFieldSet != null )
        {
            oFieldSet.setAttribute("class","error");
            oFieldSet.className = "error";
            //oFieldSet.setAttribute("className","error");
        }
    }

    function hideOtherTextField(fieldname)
    {
        var fieldx=document.getElementById(fieldname);
        // hide field
        fieldx.style.display='none';  // doesn't reserve space
        // check if other is the selected one, in that case don't hide
          // find out the name of the main control
        var sMainFieldName = fieldname.substring(0,fieldname.length-9);
        var fieldy=document.getElementById(sMainFieldName);
        if (fieldy.type == "select-one")
        {
            if (fieldy.options[fieldy.selectedIndex].value == "other"){
                fieldx.style.display='';
            }
        }
    }
    
    function setTabIndexOther(fieldname,tabind)
    {
        var fieldx=document.getElementById(fieldname);
        fieldx.tabindex = tabind;
    }
    
    function showOther(object)
    {
        //alert("type="+object.type);
        if (object.type == "select-one")
        {
            //alert("name="+object.name);
            var fieldname = object.name; // selectBox333
            fieldname = fieldname+"otherText";
            var field=document.getElementById(fieldname);
            if (object.value != "other")
            {
                field.style.display='none';
            }
            else
            {
                field.style.display='';
                //field.tabIndex = object.tabIndex;
                field.focus();
            }
        }
    }


