Function resizeElement(ElementID, HTML_ChildID, OffsetWidth, OffsetHeight)

	On Error Resume Next
	
	Dim functionStatus
	functionStatus = False
	
	If IsObject(document.all( ElementID)) Then
		If IsObject(document.all(HTML_ChildID)) Then		
			If IsObject(document.all(HTML_ChildID).parentElement) Then
				'If UCase(document.all(HTML_ChildID).parentElement.tagname) = "HTML" Then
					If OffsetWidth >= 0 Then
						If (document.all(HTML_ChildID).offsetWidth  - OffsetWidth) > 0 Then
							document.all(ElementID).style.width  = document.all(HTML_ChildID).offsetWidth  - OffsetWidth
						End If
					End If
					If OffsetHeight >= 0 Then
						If (document.all(HTML_ChildID).offsetHeight - OffsetHeight) > 0 Then
							document.all(ElementID).style.height = document.all(HTML_ChildID).offsetHeight - OffsetHeight
						End If
					End If
					functionStatus = True
				'End If
			End If
		End If
	End If
	resizeElement = functionStatus
End Function
