/**
 * @author Raphael Lus
 */

/*
 * Uses:
 *     /contents/scripts/swfobject/swfobject.js
 *     /contents/scripts/swfobject/mootools.js
 *     /contents/scripts/swfobject/settings.js
 */ 

var Index = {
    
    flashContent:null,
    
    initialize: function()
    {
        //swfobject.addDomLoadEvent(this.render.bind(this));
        swfobject.addDomLoadEvent(this.render);
    },
    
    render: function()
    {
		if(swfobject.getFlashPlayerVersion().major == 0)
        {
            window.location = "noflash.html";
        }
		else
		{
			swfobject.embedSWF("Index.swf", 
							"flashcontent", "100%", "100%", 
							Settings.PLAYER_VERSION, 
							"contents/scripts/swfobject/expressinstall.swf",
							false, 
            	{menu:"false", scale:"noscale", bgcolor:"#FFFFFF", allowscriptaccess:"always", allowfullscreen:"true" },
            	{id:"flashcontent", name:"flashcontent"}
        	);
	
			swfobject.getAttribute = function(value)
			{
				return "flashcontent";
			}
			
			if(swfobject.getFlashPlayerVersion().major == 0)
			{
				window.location = "/";
			}
			
			var force = new SWFForceSize(swfobject, 900, 600);
			force.onResizeDiv();		
		}
    }
}

Index.initialize();
