﻿var UniqueID = 314 // Make each link open in a new window 
var newWinOffset = 0 // Position of first pop-up

function VideoPlayerOpen(soundfiledesc,soundfilepath,soundfiledate,soundfileauthor,soundfiledownload,soundfileread) { 
PlayWin = window.open('',UniqueID,'width=950,height=900,top=' + newWinOffset +',left=0,resizable=1,scrollbars=0,titlebar=0,toolbar=0,menubar=0,status=0,directories=0,personalbar=0');
PlayWin.focus(); 

var winContent = "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1252\" />"
winContent += "<TITLE>LaGrange Baptist Church Media Player</TITLE>"
winContent += "<link rel=\"shortcut icon\" href=\"http://www.lagrangebaptist.com/favicon.ico\" type=\"image/x-icon\" />"
winContent += "<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.lagrangebaptist.com/css/media.css\" />"
winContent += "<script src=\"http://www.lagrangebaptist.com/scripts/audioplayer_edb.js\" type=text/javascript></script></HEAD>"
winContent += "<script src=\"http://www.lagrangebaptist.com/scripts/videoplayer_edb.js\" type=text/javascript></script></HEAD>"
winContent += "<style fprolloverstyle>A:hover {text-transform: uppercase;overline; underline; color: #102055; font-weight: bold}</style>"
winContent += "<BODY bgcolor='#CECE9D'>"
//Header graphic or content
//<img border=\"0\" src=\"http://www.lagrangebaptist.com/images/top_div_blue3.gif\">"
winContent += "<table style=\"width: 100%\"><tr><td style=\"width: 389px\">"
winContent += "<img alt=\"LBC Logo\" border=\"0\" src=\"http://www.lagrangebaptist.com/images/officiallagrangelogo_medium.png\" width=\"350\" height=\"152\" style=\"float: left\" /></td>"
winContent += "<td class=\"style27\"><strong><em>1139 Commerce Parkway<br />La Grange, KY 40031<br />502.222.9306<br /></em>"
winContent += "<a href=\"mailto:church@lagrangebaptist.com;?subject=Email from Web Site\">"
winContent += "<em>&#99;&#104;&#117;&#114;&#99;&#104;&#64;&#108;&#97;&#103;&#114;&#97;&#110;&#103;&#101;&#98;&#97;&#112;&#116;&#105;&#115;&#116;&#46;&#99;&#111;&#109;</em>"
winContent += "</a></strong></td></tr></table>"
//End of Header graphic or content
winContent += "<span class=\"style1\">&nbsp;</span><hr class=\"style7\" style=\"height: 20px; width: 815px; background: '#102055';\" align='left' />"
winContent += "<B style='font-size:18px;font-family:Verdana,sans-serif;line-height:1.5'>&nbsp;</B>"
//winContent += "<div style=\"height: 5px; background: '#102055'; padding: 0; margin: 0;\"></div>"
winContent += "<table style='width: 815px'><tr><td style='width: 435px' valign='top'><br />"
winContent += "<OBJECT width='400' height='350'>"; 
winContent += "<param name='SRC' value='" + soundfilepath + "'>";
winContent += "<param name='AUTOPLAY' VALUE='true'>"; 
winContent += "<param name='CONTROLLER' VALUE='true'>";
winContent += "<param name='BGCOLOR' VALUE='#CCCC99'>"; 
winContent += "<EMBED SRC='" + soundfilepath + "' AUTOSTART='TRUE' LOOP='FALSE' WIDTH='400' HEIGHT='350' CONTROLLER='TRUE' BGCOLOR='#CCCC99'></EMBED>";
winContent += "</OBJECT>"; 
winContent += "<p>&nbsp;</p>";
winContent += "<p style='font-size:12px;font-family:Verdana,sans-serif;text-align:left;text-decoration=overline'><a href='" + soundfiledownload +"'>Download </a></p>";
winContent += "<span class=\"style3\">To download this audio file, right click &quot;Download&quot; and select &quot;Save Target As...&quot;" 
winContent += "	or &quot;Save Link As...&quot;</span></span>"
winContent += "</td><td valign=\"top\" class=\"style1\"><span class=\"style5\">" + soundfiledesc + "<br />"
winContent += "</span><span class=\"style4\"><br />" + soundfiledate + "</span><span class=\"style5\"><br />"
winContent += "</span><span class=\"style3\"><span class=\"style5\"><br />Author: " + soundfileauthor + "<br />"
winContent += "</span><hr class=\"style5\" /><br /></span>"
winContent += "<ul class=\"style4\"><li><a target=\"_blank\" href=" + soundfileread + ">Read</a></li>"
//winContent += "<li><a href="+ soundfilewatch +" onclick=\"javascript:VideoPlayerOpen('Can I Love Others?',this.href,'February 04, 2007','Tony Rose, Pastor','http://www.lagrangebaptist.com/media/audio/sermons/2007/Can_I_Love_Others_02-04-2007.mp3','http://www.lagrangebaptist.com/ministries/preaching/Can_I_Love_Others_02-04-2007.htm','http://www.lagrangebaptist.com/ministries/preaching/02_04_2007v.asx'); return false">Watch</a></li>"
winContent += "<li class=\"style9\"><a target=\"_blank\" href=\"http://www.lagrangebaptist.com/ministries/subscriptions.htm\">Subscribe</a></li></ul></span>"
winContent += "<p class=\"style4\">(All links open in a new window.)</p>"
winContent += "<p align=\"left\"></span><span class=\"style5\"><span class=\"style6\">"
winContent += "<font face=\"Times New Roman\">© 2007 LaGrange Baptist Church</font></span><span class=\"style3\"><br />"
winContent += "</span></span><span class=\"style3\"><i>To make disciples of Jesus Christ for the glory of God and the good of all peoples.</i></p>"
winContent += "</span></td></tr></table><p>&nbsp;</p>"

winContent += "<FORM><DIV align='left'><INPUT type='button' value='Close this window' onclick='javascript:window.close();'></DIV></FORM>"; 
winContent += "</BODY></HTML>"; 

PlayWin.document.write(winContent); 
PlayWin.document.close(); // "Finalizes" new window 
UniqueID = UniqueID + 1 // newWinOffset = newWinOffset + 20 // subsequent pop-ups will be this many pixels lower 
}

function VideoPlayerOpen1(soundfiledesc,soundfilepath) { 
PlayWin = window.open('',UniqueID,'width=640,height=580,top=' + newWinOffset +',left=0,resizable=1,scrollbars=0,titlebar=0,toolbar=0,menubar=0,status=0,directories=0,personalbar=0');
PlayWin.focus(); 

var winContent = "<HTML><HEAD><TITLE>LaGrange Baptist Church Video Player</TITLE></HEAD><BODY bgcolor='#CCCC99'>"; 
winContent += "<B style='font-size:18px;font-family:Verdana,sans-serif;line-height:1.5'>" + soundfiledesc + "</B>";
winContent += "<p>&nbsp;</p>";
winContent += "<OBJECT width='400' height='350'>"; 
winContent += "<param name='SRC' value='" + soundfilepath + "'>";
winContent += "<param name='AUTOPLAY' VALUE='true'>"; 
winContent += "<param name='CONTROLLER' VALUE='true'>";
winContent += "<param name='BGCOLOR' VALUE='#CCCC99'>"; 
winContent += "<EMBED SRC='" + soundfilepath + "' AUTOSTART='TRUE' LOOP='FALSE' WIDTH='400' HEIGHT='350' CONTROLLER='TRUE' BGCOLOR='#CCCC99'></EMBED>";
winContent += "</OBJECT>"; 
winContent += "<p>&nbsp;</p>";
//winContent += "<p style='font-size:12px;font-family:Verdana,sans-serif;text-align:left'><a href='" + soundfilepath +"'>Download this file</a> <SPAN style='font-size:10px'>(right-click or Option-click)</SPAN></p>";
winContent += "<FORM><DIV align='left'><INPUT type='button' value='Close this window' onclick='javascript:window.close();'></DIV></FORM>"; 
winContent += "</BODY></HTML>"; 

PlayWin.document.write(winContent); 
PlayWin.document.close(); // "Finalizes" new window 
UniqueID = UniqueID + 1 // newWinOffset = newWinOffset + 20 // subsequent pop-ups will be this many pixels lower 
}

function VideoPlayerWSOpen(soundfiledesc,soundfilepath) { 
PlayWin = window.open('',UniqueID,'width=640,height=580,top=' + newWinOffset +',left=0,resizable=1,scrollbars=0,titlebar=0,toolbar=0,menubar=0,status=0,directories=0,personalbar=0');
PlayWin.focus(); 

var winContent = "<HTML><HEAD><TITLE>" + soundfiledesc + "</TITLE></HEAD><BODY bgcolor='#CCCC99'>"; 
winContent += "<B style='font-size:18px;font-family:Verdana,sans-serif;line-height:1.5'>" + soundfiledesc + "</B>";
winContent += "<p>&nbsp;</p>";
winContent += "<OBJECT width='550' height='350'>"; 
winContent += "<param name='SRC' value='" + soundfilepath + "'>";
winContent += "<param name='AUTOPLAY' VALUE='true'>"; 
winContent += "<param name='CONTROLLER' VALUE='true'>";
winContent += "<param name='BGCOLOR' VALUE='#CCCC99'>"; 
winContent += "<EMBED SRC='" + soundfilepath + "' AUTOSTART='TRUE' LOOP='FALSE' WIDTH='550' HEIGHT='350' CONTROLLER='TRUE' BGCOLOR='#CCCC99'></EMBED>";
winContent += "</OBJECT>"; 
winContent += "<p>&nbsp;</p>";
//winContent += "<p style='font-size:12px;font-family:Verdana,sans-serif;text-align:left'><a href='" + soundfilepath +"'>Download this file</a> <SPAN style='font-size:10px'>(right-click or Option-click)</SPAN></p>";
winContent += "<FORM><DIV align='left'><INPUT type='button' value='Close this window' onclick='javascript:window.close();'></DIV></FORM>"; 
winContent += "</BODY></HTML>"; 

PlayWin.document.write(winContent); 
PlayWin.document.close(); // "Finalizes" new window 
UniqueID = UniqueID + 1 // newWinOffset = newWinOffset + 20 // subsequent pop-ups will be this many pixels lower 
} 

