public static void ClickToContinue(PowerUI.MouseEvent e)
        {
            // The widget:
            Widgets.Widget widget = e.htmlTarget.widget;

            // Is it a dialogue widget?
            DialogueWidget dw = widget as DialogueWidget;

            PowerSlide.Timeline tl;

            if (dw != null)
            {
                // Get the timeline:
                tl = dw.timeline;

                // Is there an option on the UI at the moment?
                if (dw.hasActiveOption)
                {
                    // Yes - ignore:
                    return;
                }
            }
            else
            {
                // Get the timeline:
                tl = PowerSlide.Timeline.get(widget);
            }

            // Cue it:
            if (tl != null)
            {
                tl.cue();
            }
        }
        public static void RunOption(PowerUI.MouseEvent e)
        {
            Dom.Node targetNode = (e.target as Dom.Node);

            // Get the unique ID:
            int uniqueId;

            if (!int.TryParse(targetNode.getAttribute("unique-id"), out uniqueId))
            {
                Dom.Log.Add("A dialogue option did not have an unique-id attribute.");
                return;
            }

            // Get the widget:
            DialogueWidget dw = e.targetWidget as DialogueWidget;

            if (dw == null)
            {
                Dom.Log.Add("A dialogue option tried to run but it's not inside a DialogueWidget.");
                return;
            }

            // Great ok - we can now grab the active options entry.
            // Select the active slide with that unique ID:
            PowerSlide.DialogueSlide slide = dw.getSlide(uniqueId) as PowerSlide.DialogueSlide;

            if (slide == null)
            {
                Dom.Log.Add("Unable to resolve a DialogueSlide from a unique-id.");
                return;
            }

            // Get the GOTO:
            string gotoUrl = slide.slidesToGoTo;

            if (string.IsNullOrEmpty(gotoUrl))
            {
                // Acts just like a continue does.
                // Just cue it:
                dw.timeline.cue();
                return;
            }

            // Load it now (into the existing timeline):
            PowerSlide.Timeline.open(gotoUrl, PowerSlide.Dialogue.basePath, dw.timeline).then(delegate(object o){
                // Successfully opened it! Should already be running, but just incase:
                PowerSlide.Timeline timeline = o as PowerSlide.Timeline;

                // Start:
                timeline.start();
            }, delegate(object failure){
                // Failed!
                Dom.Log.Add("Failed to load a timeline from an option URI: " + failure);
            });

            // dw.timeline.document.startDialogue(gotoUrl,dw.Timeline.template);

            // Kill the event:
            e.stopPropagation();
        }
        public static void Cue(PowerUI.MouseEvent me)
        {
            // The widget:
            Widgets.Widget widget = me.htmlTarget.widget;

            // Get the timeline:
            PowerSlide.Timeline tl = PowerSlide.Timeline.get(widget);

            // Cue it:
            if (tl != null)
            {
                tl.cue();
            }
        }