// 
// File: tlc.js
// Author: Scott Buckner 
// Last revised: 03-Feb-08
//

//var strBaseURL = document.location.protocol + document.location.hostName;
//var strBaseName = document.URL.substring(document.URL.lastIndexOf('/') + 1, document.URL.length);
//document.location.pathname.substring(document.location.pathname.lastIndexOf('/') + 1)

function DatePosted( ) {
		var date = new Date(document.lastModified);
		document.write("Last Updated: " + (date.getMonth( ) + 1 ) + "/" + date.getDate( ) + "/" + date.getFullYear( ) ); 
}

var aWin
//var width
//var height
//var RefreshRate

function StartSlideShow(width, height, RefreshRate) {
attributes = 'toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,copyhistory=no,width=' + width + ',height=' + height
aPopUp = window.open("","SlideShow", attributes)
ndoc = aPopUp.document
astr = '<html><head><title>Trinity Lutheran Church - ELCA, Rocky Mount, North Carolina</title>'
astr += '<style>p, label, input { font: 8pt verdana; } body {background-color: #fff;} </style>'
astr += '<script type="text/javascript" language="JavaScript" src="tlcnsl.js"></script>'
astr += '</head>'
astr += '<body onload="setTimeout(RunSlideShow,' + RefreshRate + '); return true;">'
astr += '<p style="border-bottom: 1px solid gray;"><b>New Sanctuary Construction Slide Show</b></p>'
astr += '<form name="form1" align="center">'
astr += '<img src="/images/loadImages.gif" name="imageFile" /><br />'
astr += '<label for="text1">Photo taken: </label>'
astr += '<input readonly type="text" name="text1" value="..." />'
astr += '</form>'
astr += '<div align="center"><p><a href="#" onClick="window.close()"><img src="/images/closewindow.gif" name="closewindow" border="0" /></a></p></div>'
astr += '</body><script language="JavaScript"><!-- self.focus(); //--></script>'
astr += '</html>'
ndoc.write(astr)
ndoc.close()
self.aWin = aPopUp
}


var LargePhoto, FormattedDate

function ShowLargePhoto(LargePhoto, FormattedDate) {
    attributes = 'toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,copyhistory=no,width=435,height=420'
    aPopUp = window.open("","LargeImage", attributes)
    ndoc = aPopUp.document
    astr = '<html><head><title>Trinity Lutheran Church - ELCA, Rocky Mount, North Carolina</title>'
    astr += '<style>p, a { font: 8pt verdana; }</style>'
    astr += '</head>'
    astr += '<body bgcolor="#ffffff">'
    astr += '<p style="border-bottom: 1px solid gray;"><b>Trinity Lutheran Church - New Sanctuary</b></p>'
    astr += '<img SRC=/images/' + LargePhoto +'>'
    astr += '<p>Photo taken: ' + FormattedDate + '</p>'
    astr += '<div align="center"><p><a href="#" onClick="window.close()"><img SRC="/images/closewindow.gif" NAME="closewindow" BORDER="0"></a></p></div>'
    astr += '</body></html>'
    ndoc.write(astr)
    ndoc.close()
    self.aWin = aPopUp
}

var Photo

function ShowPhoto(Photo) {
    attributes = 'toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,copyhistory=no,width=300,height=350'
    aPopUp = window.open("","LargeImage", attributes)
    ndoc = aPopUp.document
    astr = '<html><head><title>Trinity Lutheran Church - ELCA, Rocky Mount, North Carolina</title>'
    astr += '<style>p, a { font: 8pt verdana; }</style>'
    astr += '</head>'
    astr += '<body bgcolor="#ffffff">'
    astr += '<p style="border-bottom: 1px solid gray;"><b>Judith Helm - Interim Pastor</b></p>'
    astr += '<img SRC=/images/' + Photo +'>'
    astr += '<div align="center"><p><a href="#" onClick="window.close()"><img SRC="/images/closewindow.gif" NAME="closewindow" BORDER="0"></a></p></div>'
    astr += '</body></html>'
    ndoc.write(astr)
    ndoc.close()
    self.aWin = aPopUp
}

function ShowCurrentConditions() {
    attributes = 'toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,copyhistory=no,width=175,height=175'
    aPopUp = window.open("","CurrentConditions", attributes)
    ndoc = aPopUp.document
    astr = '<html><head><title>Trinity Lutheran Church - ELCA, Rocky Mount, North Carolina</title>'
    astr += '<style>p, a { font: 8pt verdana; }</style>'
    astr += '</head>'
    astr += '<body>'
    astr += '<div align="center">'
    astr += '<a href="http://www.wral.com/weather/" target="new"><img src="http://images.ibsys.com/ral/images/weather/auto/bug1-160x120.gif" "width="160" height="120" alt="WRAL.com Weather" border="0"></a>'
    astr += '<div align="center"><p><a href="#" onClick="window.close()"><img src="/images/closewindow.gif" name="closewindow" border="0"></a></p></div>'
    astr += '</body></html>'
    ndoc.write(astr)
    ndoc.close()
    self.aWin = aPopUp
} 