var flashvars = 
{
	ecard: ecard,
	deeplink: deeplink,
    switchdate: '2010-05-03 09:22:00'
};
var params = 
{
    quality: "BEST",
    allowFullScreen: "true",
    allowscriptaccess: "always"
};
var attributes = 
{
    id: 'flashObject'
};

swfobject.embedSWF("Main.swf", "flashReplace", "100%", "100%", "9", false, flashvars, params, attributes, flashCallback);
if(swfmacmousewheel)
{
    swfmacmousewheel.registerObject(attributes.id);
}


/**
 * e.success, Boolean to indicate whether the embedding of a SWF was success or not
 * e.id, String indicating the ID used in swfobject.registerObject
 * e.ref, HTML object element reference (returns undefined when success=false)
 * @param {Object} e
 */

function flashCallback(e)
{
   // setFlashDimension();
}

/*
function getViewportSize()
{
    var size = [0, 0];
    if (typeof window.innerWidth != "undefined") 
    {
        size = [window.innerWidth, window.innerHeight];
    }
    else 
        if (typeof document.documentElement != "undefined" && typeof document.documentElement.clientWidth != "undefined" && document.documentElement.clientWidth != 0) 
        {
            size = [document.documentElement.clientWidth, document.documentElement.clientHeight];
        }
        else 
        {
            size = [document.getElementsByTagName("body")[0].clientWidth, document.getElementsByTagName("body")[0].clientHeight];
        }
    return size;
}


function setFlashDimension()
{
    window.onresize = function()
    {
        var el = document.getElementById("wrapper");
        var size = getViewportSize();
        var width;
        var height = Math.round(size[1]);
        
        if (size[1] < 590)
        {
            height = 590;
        }
        else if (size[1] > 720)
        {
            height = 720;
        }
        
        width = Math.round(height * 1000 / 590);
        
        height = 590;
        width = 1000;
        
        el.style.height = height;
        el.style.width = width;
        
        var marginTop = Math.round((size[1] - height) / 2);
        el.style.marginTop = (marginTop > 0) ? marginTop : 0;
        
        var marginLeft = Math.round((size[0] - width) / 2);
        el.style.marginLeft = (marginLeft > 0) ? marginLeft : 0;
    };
    window.onresize();
}
*/

function callSpotlightTag()
{
    var axel = Math.random() * 10000000000000;
    var floodlightTagUrl = "http://fls.doubleclick.net/activityi;src=2589985;type=confi679;cat=absch212;ord=" + axel + "?";
    var floodlightTag = document.getElementById("floodlightTag");
    if (floodlightTag)
    {
        floodlightTag.innerHTML = '<iframe src="' + floodlightTagUrl + '" width="1" height="1" frameborder="0"></iframe>';
    }
}