// JavaScript Document
/*
// newsletter subscribe //
*/
function clear_email() {
   document.gml.e.value = ("");
}

function sendform() {

   popupwin = 
window.open('',"popupwin","width=430,height=300,left=0,top=50,resizable=no");
   document.gml.submit();
}
// gml calendar //
function DoCal(elTarget) {
	if (showModalDialog) {
		var sRtn;
		sRtn = showModalDialog("/gml-admin/calendar.htm","","center=yes;dialogWidth=350pt;dialogHeight=200pt");
		if (sRtn!="")
			elTarget.value = sRtn;
		} else
	alert("Internet Explorer 4.0 or later is required.")
 }
/*
// loads links in new windows when designated by the rel="ext" attribute //
*/
function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "ext")
     anchor.target = "_blank";
 }
}

function popupWin(link,attribs) {
    var popupWin = null;
    popupWin = window.open(link,'winPopup',attribs);  
}

// loads image in new window //
function openPictureWindow_Fever(imageType,imageName,imageWidth,imageHeight,alt,posLeft,posTop) {  // v4.01
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=no,left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
	if (imageType == "swf"){
	newWindow.document.write('<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
	newWindow.document.write('<param name=movie value=\"'+imageName+'\"><param name=quality value=high>');
	newWindow.document.write('<embed src=\"'+imageName+'\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
	newWindow.document.write('</embed></object>');	}else{
	newWindow.document.write('<img src=\"'+imageName+'\" width='+imageWidth+' height='+imageHeight+' alt=\"'+alt+'\">'); 	}
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 3000;
// Duration of crossfade (seconds)
var crossFadeDuration = 3;
// Specify the image files
var Pic = new Array();
// add images
	Pic[0] = '/images/etbanner.jpg'
	Pic[1] = '/images/israelgrpbannercapt.jpg'
	Pic[2] = '/images/riddlestmbannercapt.jpg'
	Pic[3] = '/images/stmcrowdcaptbanner.jpg'
	Pic[4] = '/images/stmhovindbannercapt.jpg'
	Pic[5] = '/images/templemtbannercapt.jpg'
	Pic[6] = '/images/wwallbannercapt.jpg'
// do not edit anything below this line
	var t;
	var j = 0;
	var p = Pic.length;
	var preLoad = new Array();
	for (i = 0; i < p; i++) {
	preLoad[i] = new Image();
	preLoad[i].src = Pic[i];
}

function runSlideShow() {
	if (document.all) {
		document.images.SlideShow.style.filter="blendTrans(duration=2)";
		document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
		document.images.SlideShow.filters.blendTrans.Apply();
	}
	
	document.images.SlideShow.src = preLoad[j].src;
		
	if (document.all) {
		document.images.SlideShow.filters.blendTrans.Play();
	}
	
	j = j + 1;
	if (j > (p - 1)) j = 0;
		t = setTimeout('runSlideShow()', slideShowSpeed);
}


function setRel() {
	runSlideShow();
	externalLinks();
}
// initialize rel replacement - REMEMBER: ALL anchors on the page must have a set rel attribute (ext, int, pop) //
window.onload = setRel;


