     init: (container) ->
         super container
         # Create RTE object
-        textarea = if ORBEON.util.Utils.isNewXHTMLLayout() then container.getElementsByTagName("textarea")[0] else container
+        textarea = if Utils.isNewXHTMLLayout() then container.getElementsByTagName("textarea")[0] else container
         # Make sure that textarea is not disabled unless readonly, otherwise RTE renders it in read-only mode
-        textarea.disabled = YAHOO.util.Dom.hasClass container, "xforms-readonly"
+        textarea.disabled = YD.hasClass container, "xforms-readonly"
         rteConfig = if typeof YUI_RTE_CUSTOM_CONFIG != "undefined" then YUI_RTE_CUSTOM_CONFIG else RTEConfig
         @yuiRTE = new YAHOO.widget.Editor textarea, rteConfig
 

            # If we don't and user's JS code calls ORBEON.xforms.Document.setValue(), the value of the RTE is changed, our RFE changeEvent() is called,
            # it sets the focus on the RTE, which calls focus(), which stores the current value (newly set) as the server value if no server value is defined.
            # Then in executeNextRequest() we ignore the value change because it is the same the server value.
            containerCurrentValue = ORBEON.xforms.Controls.getCurrentValue container
            ORBEON.xforms.ServerValueStore.set container.id, containerCurrentValue

            if (! ORBEON.util.Utils.isNewXHTMLLayout())
                # Move classes on the container created by YUI
                rteContainer = container.parentNode
                rteContainer.className += " " + container.className

Control = ORBEON.xforms.control.Control
RTEConfig = ORBEON.xforms.control.RTEConfig
ServerValueStore = ORBEON.xforms.ServerValueStore
Events = ORBEON.xforms.Events
Page = ORBEON.xforms.Page
OD = ORBEON.util.Dom
YD = YAHOO.util.Dom
CustomEvent = YAHOO.util.CustomEvent
Utils = ORBEON.util.Utils

class RTE extends Control

