﻿var flashvars = 
{
	contentURL: 	"flash/LeviathanChronicles.swf",
	dataURL: 		"assets/xml/config.xml"
};
var params = 
{
	menu: 	"true",
	scale: 	"noscale", 
	wmode: 	"transparent"
};
var attributes = 
{
	id: 	"flashMovie",
	name: 	"flashMovie"
};

function loadFlash(url, div)
{
	swfobject.embedSWF(url, div, "100%", "100%", "9.0.0", "js/swfobject/expressInstall.swf", flashvars, params, attributes);	
}
function hideBox()
{
    $('floatFrame').addClass('hidden');
}
function displayBox(url)
{
    $('floatFrame').removeClass('hidden');
    if(Browser.Platform.mac)
    {
        $('instructions').set('html', 'Please click on the link below.  Also make sure your browser allows popups.');
        $('dLink').setProperty('href', url);
        $('dLink').addEvent('click', function(e)
        {
            e.stop();
            window.open(path + '/download/' + url.replace('http://hwcdn.net/e8z2b8j9/cds/podcasts/',''));
            $('dLink').removeEvents('click');
        });
    }
    else
    {
        $('instructions').set('html', 'Please right click on the link and select "Save Target As" or "Save Link As" to download the episode.');
        $('dLink').setProperty('href', url);
    }
    
}
