function init() {

	var handleCancel = function(o){
		this.cancel();
	}
	YAHOO.podcast1 =
	new YAHOO.widget.Dialog("modal1", // enter div id here
	{ width : "500px", // width of container
	fixedcenter : true,
	visible : false,
	close: false,
	draggable: false,
	modal: true,
	constraintoviewport : false});
	YAHOO.util.Event.addListener('closeImg', 'click', function(o){YAHOO.podcast1.hide()});
	YAHOO.podcast1.render();

	var onpodcast1Show = function(e, args, o){
		o.body.id = 'swfID';
		//path to swf
		var so = new SWFObject("http://www.discovernetwork.com/paymentsolutions/debit/mp3_Discover.swf", "sotester", "500", "150", "7");
		so.addParam("wmode","transparent");
		so.write("swfID");
	};
	YAHOO.podcast1.showEvent.subscribe(onpodcast1Show, YAHOO.podcast1);

	var onpodcast1Hide = function(e, args, o){
		o.setBody('This site is best viewed with Flash 7. You may download it by <a style="color:#fff;" target="_blank" href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">clicking here</a><br /><br /><a target="_blank" href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"><img src="/common/images/flash/get_flash_player.gif" alt="get Flash" title="Get Flash" border="0" /></a><br /><br />or<br /><br /><a style="color:#fff;" href="http://www.discovernetwork.com/paymentsolutions/debit/mp3/Discover_Network_Debit_Podcast.zip">click here</a> to download this audio file.');
	};
	YAHOO.podcast1.hideEvent.subscribe(onpodcast1Hide, YAHOO.podcast1);

	/**********************************************************************************/
	YAHOO.util.Dom.setStyle(['modal1'], 'display', 'block'); // list all div ids in brackets, separate by commas
};


//open modal panel onload if sent by email link
function openModal() {

    //parse querystring
    function gup(name) {
        name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
        var regexS = "[\\?&]" + name + "=([^&#]*)";
        var regex = new RegExp(regexS);
        var results = regex.exec(window.location.href);
        if (results == null)
            return "";
        else
            return results[1];
    }

    var yes = gup('modalPanel');
    if (navigator.appName == "Microsoft Internet Explorer" && yes == "modalPanel") {
         //   YAHOO.util.Event.addListener(window, 'load', function(o) { YAHOO.podcast1.show() } );
	$(document).ready(function(){ YAHOO.podcast1.show() });
    }
    else if (yes == "modalPanel") {
            YAHOO.podcast1.show();
    }
}


