/* PortableSermons.com embeded episode archive for Agape International Missions
 * Copyright 2007-2008 PortableSermons.com
 */


var PS = {};

PS.Listen = {
    playerWindow : null,
    open : function (link)
    {
        if (PS.Listen.playerWindow && (! PS.Listen.playerWindow.closed)) {
            PS.Listen.playerWindow.location = PS.Listen.getHref(link);
            PS.Listen.playerWindow.focus();
            return;
        }
        PS.Listen.playerWindow = window.open(PS.Listen.getHref(link), 'PortableSermonsPlayer',
            'height=110,width=550,location=false,menubar=false,status=false,resizable=false');
    },
    openFull : function (link)
    {
        window.open(PS.Listen.getHref(link));
    },
    getHref : function (link)
    {
        var theLink = link.href;
        /* Even if a question mark is properly URL-encoded (%3F), IE 6 still
         * thinks it is the start of the query fragment, which totally wrecks
         * subsequent requests. The following code works around this bug:
         */
        /*@cc_on@*/
        /*@if(@_jscript_version < 5.7)
            if (theLink.slice(-1) == '?') {
                theLink = theLink.slice(0, -1) + '%3F';
            }
            if (link.search.substring(0, 2) == '??') {
                theLink = theLink.replace(/\?\?(.*)$/, '%3F?$1');
            }
        /*@end@*/
        return theLink;
    }
};


var PSEmbedded;

PSEmbedded = '<div class="PS-Account-Block">' +
'  <p class="PS-Account-Title">Agape International Missions<\/p>' +
'  <p class="PS-Account-Description">Fighting Child Sex Trafficking inCambodia<\/p>' +
'  ' +
'  <ul class="PS-Account-PodcastLinks">' +
'    <li class="PS-Account-PodcastLink-iTunes"><a href="itpc:\/\/portablesermons.com\/AgapeInternationalMissions\/listen.xml">Subscribe to Podcast (iTunes)<\/a><\/li>' +
'    <li class="PS-Account-PodcastLink-Other"><a href="http:\/\/portablesermons.com\/AgapeInternationalMissions\/listen.xml">Subscribe to Podcast (other)<\/a><\/li>' +
'  <\/ul>' +
'<\/div>';
document.write(PSEmbedded);

PSEmbedded = '<div class="PS-Episode-Block-Odd">' +
'  <p class="PS-Episode-Title">Aim4asia 013: Sparky<\/p>' +
'  <div class="PS-Episode-Detail">' +
'    <p class="PS-Episode-Date">November 25, 2009<\/p>' +
'    <p class="PS-Episode-Speaker">Don Brewster<\/p>' +
'    ' +
'  <\/div>' +
'  <p class="PS-Episode-Description">The &quot;Sparky&quot; of Agape Restoration Center<\/p>' +
'  ' +
'  <ul class="PS-Episode-Actions">' +
'    <li><a href="http:\/\/portablesermons.com\/AgapeInternationalMissions\/listen\/2009\/11\/25\/Aim4asia%20013%3A%20Sparky" class="PS-Episode-Link-Listen" onclick="PS.Listen.open(this);return false;">Listen<\/a><\/li>' +
'    <li><a href="http:\/\/portablesermons.com\/AgapeInternationalMissions\/send\/2009\/11\/25\/Aim4asia%20013%3A%20Sparky" class="PS-Episode-Link-Send" onclick="PS.Listen.openFull(this);return false;">Send to Friend<\/a><\/li>' +
'    <li><a href="http:\/\/portablesermons.com\/AgapeInternationalMissions\/2009\/11\/25\/Aim4asia%20013%3A%20Sparky.mp3" class="PS-Episode-Link-Download">Download<\/a><\/li>' +
'  <\/ul>' +
'<\/div>';
document.write(PSEmbedded);

PSEmbedded = '<p style="margin:20px 0 20px 0;padding:4px 0 0 0;border:none;background:none;font-family:Verdana,Helvetica,sans-serif;font-size:10px;line-height:12px;">' +
'  <a href="http:\/\/portablesermons.com\/" style="margin:-4px 10px 0 0;padding:0;border:0;background:url(\'http:\/\/portablesermons.com\/images\/badge_logo.gif\') no-repeat;font-size:10px;text-indent:-1000em;text-decoration:none;display:block;height:30px;width:170px;float:left;" title="PortableSermons.com — your sermons. anywhere." onclick="PS.Listen.openFull(this);return false;">PortableSermons.com — your sermons. anywhere.<\/a>' +
'  Powered by <a href="http:\/\/portablesermons.com\/" style="margin:0;padding:0;border:0;background:none;font-size:10px;text-indent:0;text-decoration:none;" onclick="PS.Listen.openFull(this);return false;">PortableSermons.com<\/a><br \/><span style="font-size:9px;">&copy; 2007-2008 PortableSermons.com<\/span>' +
'<\/p>';
document.write(PSEmbedded);

PSEmbedded = '';
