
function ToggleStyleHide(objCheck, strElement, strSuffix)
{
        var arrRow = document.getElementsByTagName('tr');


        var strDisplay = 'none';
        if(objCheck.checked)
        {
                if(navigator.userAgent.indexOf('Opera') != -1)
                {
                        strDisplay = 'table-row';
                }
                else
                {
                        strDisplay = 'block';
                }
        }

        for(var intLoop=0; intLoop < arrRow.length; intLoop++)
        {
                var objRow = arrRow.item(intLoop);
                var strID  = objRow.getAttribute('id');
                if(strID.substring(0, strElement.length) == strElement)
                {
                        document.getElementById(strID).style.display = strDisplay;
                }
        }
}



/*
        This function is very similar to the ToggleStyleHide function except that it is supposed to be attached to a radio group

        On being called it hides all elements who are prefixed with strElement, but enables those whose name are prefixed with strElement.strSuffix
*/
function ToggleStyleHideOption(strElement, strSuffix)
{
	
        var arrRow = document.getElementsByTagName('tr');

        var strEnable  = strElement + strSuffix;

        var strHide = 'none';
		//alert("show:" + strEnable);

        if(navigator.userAgent.indexOf('Opera') != -1)
        {
                strShow = 'table-row';
        }
        else
        {
                strShow = 'block';
        }

        for(var intLoop=0; intLoop < arrRow.length; intLoop++)
        {
                var objRow = arrRow.item(intLoop);
                var strID  = objRow.getAttribute('id');

				var mg = strID.substring(0, strElement.length);
				//alert("check:" + mg + " against: " + strEnable);
                if(strID.substring(0, strElement.length) == strElement)
                {
                        if(strID.substring(0, strEnable.length) == strEnable)
                        {
                                document.getElementById(strID).style.display = strShow;
                        }
                        else
                        {
                                document.getElementById(strID).style.display = strHide;
                        }
                }
        }
}
