﻿Type.registerNamespace("manathanWeb");

manathanWeb.MoritzEiche.Reel = function() {
    manathanWeb.MoritzEiche.Reel.initializeBase(this, ['video', 'FadeReelIn();', 'FadeReelOut();']);
    this.relative = false;
    this.blockDisplay = false;
}

manathanWeb.MoritzEiche.Reel.prototype = {

    /** Public methods */
    Open: function() { 
        /*document.getElementById('video').style.visibility = 'visible'; */
        utility.SetOpacity(this.element, 10);
        this.element.style.visibility = 'visible';
        return manathanWeb.MoritzEiche.Reel.callBaseMethod(this, 'Open');
    },
    
    FadeInComplete: function() {
	    document.getElementById('close_vid').style.display = 'block';
	    document.getElementById('close_vid').style.visibility = 'visible';
        var vid_obj = document.getElementById('vid_obj');
	    vid_obj.style.display = 'block';
        motz.AlignControl(vid_obj);
        var mt = ((motz.IsIE()) ? 
            ((motz.WindowHeight() / 2) - (432 / 2)) : 
            ((motz.WindowHeight() / 2) - (450 / 2) - 47));
	    vid_obj.style.marginTop = mt + 'px';
    },

    Close: function() { 
        motz.SetFocus();
        /*document.getElementById('video').style.visibility = 'hidden'; */
        document.getElementById('vid_obj').style.display = 'none';
	    document.getElementById('close_vid').style.display = 'none';
        return manathanWeb.MoritzEiche.Reel.callBaseMethod(this, 'Close');
    }
}
manathanWeb.MoritzEiche.Reel.registerClass('manathanWeb.MoritzEiche.Reel', manathanWeb.MoritzEiche.FadeElement);

var reel = new manathanWeb.MoritzEiche.Reel();

function FadeReelIn() {
    reel.FadeIn();
}

function FadeReelOut() {
    reel.FadeOut();
}

// Notify ScriptManager that this is the end of the script.
if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();

