var currentFontSize = 100;

function changeFontSize(sizeDifference){
    currentFontSize = parseInt(currentFontSize) + parseInt(sizeDifference * 10);

    if(currentFontSize > 150)
        currentFontSize = 150;
    else if(currentFontSize < 100)
        currentFontSize = 100;

    setFontSize(currentFontSize);
};

function setFontSize(fontSize){
    var content = document.getElementById('content');
    content.style.fontSize = fontSize + '%';
};




/**
 * add flash object to the page
 */
function Ant_Flash(config)
{
    this.config = config || {};
    this.config.options =  this.config.options || {};

    // default options
    this.config.options.movie = config.file;
    this.config.options.quality = "high";

}
Ant_Flash.prototype = {
    setOption : function (name, value)
    {
        this.config.options[name] = value;
    },


    setOptions : function (options)
    {
        for (key in options) this.config.options[key] = options[key];
    },


    show : function (id)
    {
        var div = document.getElementById(id);
        var flash = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+this.config.width+'" height="'+this.config.height+'">';
        var e_str = '';
        for (key in this.config.options)
        {
            value = this.config.options[key];
            flash += '<param name="'+key+'" value="'+value+'" />';
            e_str += key + ' = "' + value + '" ';
        }
        flash += '<embed src="'+this.config.file+'" ' + e_str + 'width="'+this.config.width+'" height="'+this.config.height+'" name="flash" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
        flash += '</object>';
        div.innerHTML = flash;
    }
}

