// 1k DHTML API - standards version
d=document;l=d.layers;op=navigator.userAgent.indexOf('Opera')!=-1;px='px';
function gE(e,f){if(l){f=(f)?f:self;var V=f.document.layers;if(V[e])return V[e];for(var W=0;W<V.length;)t=gE(e,V[W++]);return t;}if(d.all)return d.all[e];return d.getElementById(e);}
function sE(e){l?e.visibility='show':e.style.visibility='visible';}
function hE(e){l?e.visibility='hide':e.style.visibility='hidden';}
function dsE(e){l?e.display='block':e.style.display='block';}
function dhE(e){l?e.display='none':e.style.display='none';}
function sZ(e,z){l?e.zIndex=z:e.style.zIndex=z;}
function sX(e,x){l?e.left=x:op?e.style.pixelLeft=x:e.style.left=x+px;}
function sY(e,y){l?e.top=y:op?e.style.pixelTop=y:e.style.top=y+px;}
function sW(e,w){l?e.clip.width=w:op?e.style.pixelWidth=w:e.style.width=w+px;}
function sH(e,h){l?e.clip.height=h:op?e.style.pixelHeight=h:e.style.height=h+px;}
function sC(e,t,r,b,x){l?(X=e.clip,X.top=t,X.right=r,X.bottom=b,X.left=x):e.style.clip='rect('+t+' '+r+' '+b+' '+x+')';}
function wH(e,h){if(l){Y=e.document;Y.open();Y.write(h);Y.close();}if(e.innerHTML)e.innerHTML=h;}

function getElem(e, f) { return gE(e,f) }
function showElem(e) { return e?sE(e):false } // visibility
function hideElem(e) { return e?hE(e):false }
function showDisplayElem(e) { return e?dsE(e):false } // display
function hideDisplayElem(e) { return e?dhE(e):false }
function showMultiDisplayElem(commaSepIds) { 
var itemList = commaSepIds.split(","); 
for (i=0; i<itemList.length; i++) { 
showDisplayElem(getElem(itemList[i])); 
} 
} 
function hideMultiDisplayElem(commaSepIds) { 
    var itemList = commaSepIds.split(","); 
    for (i=0; i<itemList.length; i++) { 
    hideDisplayElem(getElem(itemList[i])); 
    } 
}
function scrollToDivTop(dividName) {
var scrollobj = getElem(dividName);
if (scrollobj) { scrollobj.scrollTop = 0; }	else { scrollobj.scrollLeft = 0; }
}

function setZ(e, z) { return sZ(e,z) }
function setLeft(e, x) { return sX(e,x) }
function setTop(e, y) { return sY(e,y) }
function setWidth(e, w) { return sW(e,w) }
function setHeight(e, h) { return sH(e,h) }
function setClip(e,t,r,b,x) { return sC(e,t,r,b,x) }
function writeHTML(e, h) { return wH(e,h) }
function setClass(e, n) { e.className=n }
function disableElem(e) { e.disabled=true; e.style.visibility='hidden'; }
function enableElem(e) { e.disabled=false; e.style.visibility='visible' }
function isClass(object, className) { return (object.className.search('(^|\\s)' + className + '(\\s|$)') != -1); }
function doAHrefClick(id) {
    var a=getElem(id)
    if (a && a.href)

    // stop click thru propagation
    // would result in 'double' clicking
    if (!e) var e = window.event;
    if (e) {
        e.cancelBubble = true;
        if (e.stopPropagation) e.stopPropagation();
    }

    window.location=a.href

}
function GetElementsWithClassName(elementName,className,obj) {
    var allElements = null
    if (obj) {
        allElements = obj.getElementsByTagName(elementName);
    } else {
    	allElements = document.getElementsByTagName(elementName);
    }
	var elemColl = new Array();
	for (i = 0; i< allElements.length; i++) {
		if (isClass(allElements[i], className)) {
			elemColl[elemColl.length] = allElements[i];
		}
	}
	return elemColl;
}
function DOM_insertAfter(newChild,refChild)
//Post condition: if childNodes[n] is refChild, than childNodes[n+1] is newChild.
{
  var parent=refChild.parentNode;
  if(parent.lastChild==refChild) return parent.appendChild(newChild);
  else return parent.insertBefore(newChild,refChild.nextSibling);
}


// expires is in days
function setCookie( name, value, expires, path, domain, secure ) {
var today = new Date();
today.setTime( today.getTime() );
if ( expires ) {
expires = expires * 1000 * 60 * 60 * 24;
}
var expires_date = new Date( today.getTime() + (expires) );
document.cookie = name + "=" +escape( value ) + ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + ( ( path ) ? ";path=" + path : "" ) + ( ( domain ) ? ";domain=" + domain : "" ) + ( ( secure ) ? ";secure" : "" );
}

function getCookie( name ) {
var start = document.cookie.indexOf( name + "=" );
var len = start + name.length + 1;
if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) ) {
return null;
}
if ( start == -1 ) return null;
var end = document.cookie.indexOf( ";", len );
if ( end == -1 ) end = document.cookie.length;
return unescape( document.cookie.substring( len, end ) );
}

function deleteCookie( name, path, domain ) {
if ( Get_Cookie( name ) ) document.cookie = name + "=" +
( ( path ) ? ";path=" + path : "") +
( ( domain ) ? ";domain=" + domain : "" ) +
";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}

clearDefault = function(obj) {
    if (obj.defaultValue == obj.value) obj.value = ''
}
function doDropDown(obj) {
    var url = obj.options[obj.selectedIndex].value
    if (url != "null") {
    window.location = url
    }
}
function silas_randomizeClass(id, className, limit) {
    var div = getElem(id);
    if (div) {
        var rand = parseInt(Math.random()*parseInt(limit));
        div.className += " " + className + rand
    }
}

// For the Church Page HOPE Tabs //
if (window.addEventListener || window.attachEvent){
document.write('<style type="text/css">\n')
document.write('.dropcontent{display:none;}\n')
document.write('</style>\n')
}


var showrecords=1 //specify number of contents to show per tab

document.getElementsByClass=function(tag, classname){
var tagcollect=document.all? document.all.tags(tag): document.getElementsByTagName(tag) //IE5 workaround
var filteredcollect=new Array()
var inc=0
for (i=0;i<tagcollect.length;i++){
if (tagcollect[i].className==classname)
filteredcollect[inc++]=tagcollect[i]
}
return filteredcollect
}

function contractall(){
var inc=0
while (contentcollect[inc]){
contentcollect[inc].style.display="none"
inc++
}
}

function expandone(whichpage){
var lowerbound=(whichpage-1)*showrecords
//var upperbound=(tabstocreate==whichpage)? contentcollect.length-1 : lowerbound+showrecords-1
contractall()
//for (i=lowerbound;i<=upperbound;i++)
contentcollect[lowerbound].style.display="block"
}

function highlightone(whichtab){
for (i=0;i<tabscollect.length;i++){
//tabscollect[i].style.backgroundColor=taboriginalcolor
//tabscollect[i].style.borderRightColor="white"
//tabsfootcollect[i].style.backgroundColor="white"
}
//tabscollect[whichtab].style.backgroundColor=tabhighlightcolor
//tabscollect[whichtab].style.borderRightColor="gray"
//tabsfootcollect[whichtab].style.backgroundColor="#E8E8E8"
}

function generatetab(){
contentcollect=document.getElementsByClass("div", "dropcontent")
tabstocreate=Math.ceil(contentcollect.length/showrecords)
linkshtml=""
linkshtml2=""
//for (i=1;i<=tabstocreate;i++){
//linkshtml+='<span class="tabstyle" onClick="expandone('+i+');highlightone('+(i-1)+')"><b>Page '+i+'</b></span>'
//linkshtml2+='<a href="#" class="tabsfootstyle" onClick="expandone('+i+');highlightone('+(i-1)+');return false">Page '+i+'</a> '
//}
//document.getElementById("cyclelinks").innerHTML=linkshtml
//document.getElementById("cyclelinks2").innerHTML=linkshtml2
//tabscollect=document.getElementsByClass("span", "tabstyle")
//tabsfootcollect=document.getElementsByClass("a", "tabsfootstyle")
//highlightone(0)
expandone(1)
}
/*
if (window.addEventListener)
window.addEventListener("load", generatetab, false)
else if (window.attachEvent)
window.attachEvent("onload", generatetab)*/
// End For the church HOPE tabs //


// Expand/Collapse Function
function switchMenu(obj) {
var el = document.getElementById(obj);
if ( el.style.display != 'none' ) {
el.style.display = 'none';
}
else {
el.style.display = '';
}
}

// Slideshow for homepage //
var SlideShowSpeed = 3000;
var CrossFadeDuration = .4;
var Picture = new Array(); 
var Caption = new Array(); 
Picture[1]  = '../images/content/pagebuilder/19048.jpg';
Picture[2]  = '../images/content/pagebuilder/19103.jpg';
Caption[1]  = "";
Caption[2]  = "";
var tss;
var iss;
var jss = 1;
var pss = Picture.length-1;

var preLoad = new Array();
for (iss = 1; iss < pss+1; iss++){
preLoad[iss] = new Image();
preLoad[iss].src = Picture[iss];}

function runSlideShow(){
if (document.all){
document.images.PictureBox.style.filter="blendTrans(duration=2)";
document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox.filters.blendTrans.Apply();}
document.images.PictureBox.src = preLoad[jss].src;
if (document.getElementById) document.getElementById("CaptionBox").innerHTML= Caption[jss];
if (document.all) document.images.PictureBox.filters.blendTrans.Play();
jss = jss + 1;
if (jss > (pss)) jss=1;
tss = setTimeout('runSlideShow()', SlideShowSpeed);
} 

/*if (window.addEventListener)
window.addEventListener("load", runSlideShow, false)
else if (window.attachEvent)
window.attachEvent("onload", runSlideShow)*/


//End slideshow for homepage


//countdown

function CD_T(id,e){var n=new Date();CD_D(+n,id,e);setTimeout("CD_T('"+id+"',"+e+")",1100-n.getMilliseconds())};function CD_D(n,id,e){var ms=e-n;if(ms<=0) ms*=-1;var d=Math.floor(ms/864E5);ms-=d*864E5;var h=Math.floor(ms/36E5);ms-=h*36E5;var m=Math.floor(ms/6E4);ms-=m*6E4;var s=Math.floor(ms/1E3);CD_OBJS[id].innerHTML=d+""+(d==1?" ":":")+CD_ZP(h)+":"+CD_ZP(m)+":"+CD_ZP(s)+""};function CD_ZP(i){return(i<10?"0"+i:i)};function CD_Init(){var pref="countdown";var objH=1;if(document.getElementById||document.all){for(var i=1;objH;++i){var id=pref+i;objH=document.getElementById?document.getElementById(id):document.all[id];if(objH&&(typeof objH.innerHTML)!='undefined'){var s=objH.innerHTML;var dt=CD_Parse(s);if(!isNaN(dt)){CD_OBJS[id]=objH;CD_T(id,dt.valueOf());if(objH.style){objH.style.visibility="visible"}}else {objH.innerHTML=s+"<a href=\"http://andrewu.co.uk/clj/countdown/\" title=\"Countdown Error:Invalid date format used,check documentation (see link)\">*</a>"}}}}};function CD_Parse(strDate){var objReDte=/(\d{4})\-(\d{1,2})\-(\d{1,2})\s+(\d{1,2}):(\d{1,2}):(\d{0,2})\s+GMT([+\-])(\d{1,2}):?(\d{1,2})?/;if(strDate.match(objReDte)){var d=new Date(0);d.setUTCFullYear(+RegExp.$1,+RegExp.$2-1,+RegExp.$3);d.setUTCHours(+RegExp.$4,+RegExp.$5,+RegExp.$6);var tzs=(RegExp.$7=="-"?-1:1);var tzh=+RegExp.$8;var tzm=+RegExp.$9;if(tzh){d.setUTCHours(d.getUTCHours()-tzh*tzs)}if(tzm){d.setUTCMinutes(d.getUTCMinutes()-tzm*tzs)};return d}else {return NaN}};var CD_OBJS=new Object();if(window.attachEvent){window.attachEvent('onload',CD_Init)}else if(window.addEventListener){window.addEventListener("load",CD_Init,false)}else {window.onload=CD_Init}

//end countdown 

// Slideshow for Miracles Page //
var SlideShowSpeeds = 3000;
var CrossFadeDurations = .4;
var Pictures = new Array(); 
var Captions = new Array(); 
Pictures[3]  = '../images/content/pagebuilder/20218.jpg';
Pictures[4]  = '../images/content/pagebuilder/19931.jpg';
Pictures[5]  = '../images/content/pagebuilder/19581.jpg';
Pictures[1]  = '../images/content/pagebuilder/20362.jpg';
Pictures[2]  = '../images/content/pagebuilder/20273.jpg';

Captions[3]  = "The Gascho Family";
Captions[4]  = "The Kovach Family";
Captions[5]  = "The DeMers Family";
Captions[1]  = "The Forck Family";
Captions[2]  = "The Jager Family";

var tsss;
var isss;
var jsss = 1;
var psss = Pictures.length-1;

var preLoads = new Array();
for (isss = 1; isss < psss+1; isss++){
preLoads[isss] = new Image();
preLoads[isss].src = Pictures[isss];}

function runSlideShows(){
if (document.all){
document.images.PictureBoxs.style.filter="blendTrans(duration=2)";
document.images.PictureBoxs.style.filter="blendTrans(duration=CrossFadeDurations)";
document.images.PictureBoxs.filters.blendTrans.Apply();}
document.images.PictureBoxs.src = preLoads[jsss].src;
if (document.getElementById) document.getElementById("CaptionBoxs").innerHTML= Captions[jsss];
if (document.all) document.images.PictureBoxs.filters.blendTrans.Play();
jsss = jsss + 1;
if (jsss > (psss)) jsss=1;
tsss = setTimeout('runSlideShows()', SlideShowSpeeds);
} 
/*
if (window.addEventListener)
window.addEventListener("load", runSlideShows, false)
else if (window.attachEvent)
window.attachEvent("onload", runSlideShows)
*/
/* Timeline Text Swap */

function writeTextTimeline(txt)
{
document.getElementById("timelinedesc").innerHTML=txt
}

 function change_image(txt2,ht) {
   document.all.myiframe.src=txt2;
   document.all.myiframe.height=ht;   
   //use the all collection to access attributes of the IFRAME element
}

/*Dynamic content slider*/
/* Featured Content Slider script- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com) Last updated: Feb 28th- 07- Added ability to customize pagination links' text*/////Ajax related settingsvar csbustcachevar=0 //bust potential caching of external pages after initial Ajax request? (1=yes, 0=no)var csloadstatustext="<img src='loading.gif' /> Requesting content..." //HTML to indicate Ajax page is being fetchedvar csexternalfiles=[] //External .css or .js files to load to style the external content(s), if any. Separate multiple files with comma ie: ["cat.css", dog.js"]////NO NEED TO EDIT BELOW////////////////////////var enablepersist=truevar slidernodes=new Object() //Object array to store references to each content slider's DIV containers (<div class="contentdiv">)var csloadedobjects="" //Variable to store file names of .js/.css files already loaded (if Ajax is used)function ContentSlider(sliderid, autorun, customPaginateText, customNextText){	var slider=document.getElementById(sliderid)	if (typeof customPaginateText!="undefined" && customPaginateText!="") //Custom array of pagination links text defined?		slider.paginateText=customPaginateText	if (typeof customNextText!="undefined" && customNextText!="") //Custom HTML for "Next" link defined?		slider.nextText=customNextText	slidernodes[sliderid]=[] //Array to store references to this content slider's DIV containers (<div class="contentdiv">)	ContentSlider.loadobjects(csexternalfiles) //Load external .js and .css files, if any	var alldivs=slider.getElementsByTagName("div")	for (var i=0; i<alldivs.length; i++){		if (alldivs[i].className=="contentdiv"){			slidernodes[sliderid].push(alldivs[i]) //add this DIV reference to array			if (typeof alldivs[i].getAttribute("rel")=="string") //If get this DIV's content via Ajax (rel attr contains path to external page)				ContentSlider.ajaxpage(alldivs[i].getAttribute("rel"), alldivs[i])		}	}	ContentSlider.buildpagination(sliderid)	var loadfirstcontent=true	if (enablepersist && getCookie(sliderid)!=""){ //if enablepersist is true and cookie contains corresponding value for slider		var cookieval=getCookie(sliderid).split(":") //process cookie value ([sliderid, int_pagenumber (div content to jump to)]		if (document.getElementById(cookieval[0])!=null && typeof slidernodes[sliderid][cookieval[1]]!="undefined"){ //check cookie value for validity			ContentSlider.turnpage(cookieval[0], parseInt(cookieval[1])) //restore content slider's last shown DIV			loadfirstcontent=false		}	}	if (loadfirstcontent==true) //if enablepersist is false, or cookie value doesn't contain valid value for some reason (ie: user modified the structure of the HTML)		ContentSlider.turnpage(sliderid, 0) //Display first DIV within slider	if (typeof autorun=="number" && autorun>0) //if autorun parameter (int_miliseconds) is defined, fire auto run sequence		window[sliderid+"timer"]=setTimeout(function(){ContentSlider.autoturnpage(sliderid, autorun)}, autorun)}ContentSlider.buildpagination=function(sliderid){	var slider=document.getElementById(sliderid)	var paginatediv=document.getElementById("paginate-"+sliderid) //reference corresponding pagination DIV for slider	var pcontent=""	for (var i=0; i<slidernodes[sliderid].length; i++) //For each DIV within slider, generate a pagination link		pcontent+='<a href="#" onClick=\"ContentSlider.turnpage(\''+sliderid+'\', '+i+'); return false\">'+(slider.paginateText? slider.paginateText[i] : i+1)+'</a> '	pcontent+='<a href="#" style="font-weight: bold;" onClick=\"ContentSlider.turnpage(\''+sliderid+'\', parseInt(this.getAttribute(\'rel\'))); return false\">'+(slider.nextText || "Next")+'</a>'	paginatediv.innerHTML=pcontent	paginatediv.onclick=function(){ //cancel auto run sequence (if defined) when user clicks on pagination DIV	if (typeof window[sliderid+"timer"]!="undefined")		clearTimeout(window[sliderid+"timer"])	}}ContentSlider.turnpage=function(sliderid, thepage){	var paginatelinks=document.getElementById("paginate-"+sliderid).getElementsByTagName("a") //gather pagination links	for (var i=0; i<slidernodes[sliderid].length; i++){ //For each DIV within slider		paginatelinks[i].className="" //empty corresponding pagination link's class name		slidernodes[sliderid][i].style.display="none" //hide DIV	}	paginatelinks[thepage].className="selected" //for selected DIV, set corresponding pagination link's class name	slidernodes[sliderid][thepage].style.display="block" //show selected DIV	//Set "Next" pagination link's (last link within pagination DIV) "rel" attribute to the next DIV number to show	paginatelinks[paginatelinks.length-1].setAttribute("rel", thenextpage=(thepage<paginatelinks.length-2)? thepage+1 : 0)	if (enablepersist)		setCookie(sliderid, sliderid+":"+thepage)}ContentSlider.autoturnpage=function(sliderid, autorunperiod){	var paginatelinks=document.getElementById("paginate-"+sliderid).getElementsByTagName("a") //Get pagination links	var nextpagenumber=parseInt(paginatelinks[paginatelinks.length-1].getAttribute("rel")) //Get page number of next DIV to show	ContentSlider.turnpage(sliderid, nextpagenumber) //Show that DIV	window[sliderid+"timer"]=setTimeout(function(){ContentSlider.autoturnpage(sliderid, autorunperiod)}, autorunperiod)}function getCookie(Name){ 	var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair	if (document.cookie.match(re)) //if cookie found		return document.cookie.match(re)[0].split("=")[1] //return its value	return ""}function setCookie(name, value){	document.cookie = name+"="+value}////////////////Ajax Related functions //////////////////////////////////ContentSlider.ajaxpage=function(url, thediv){	var page_request = false	var bustcacheparameter=""	if (window.XMLHttpRequest) // if Mozilla, Safari etc		page_request = new XMLHttpRequest()	else if (window.ActiveXObject){ // if IE		try {		page_request = new ActiveXObject("Msxml2.XMLHTTP")		} 		catch (e){		try{		page_request = new ActiveXObject("Microsoft.XMLHTTP")		}		catch (e){}		}	}	else		return false	thediv.innerHTML=csloadstatustext	page_request.onreadystatechange=function(){		ContentSlider.loadpage(page_request, thediv)	}	if (csbustcachevar) //if bust caching of external page		bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()	page_request.open('GET', url+bustcacheparameter, true)	page_request.send(null)}ContentSlider.loadpage=function(page_request, thediv){	if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))		thediv.innerHTML=page_request.responseText}ContentSlider.loadobjects=function(externalfiles){ //function to load external .js and .css files. Parameter accepts a list of external files to load (array)	for (var i=0; i<externalfiles.length; i++){		var file=externalfiles[i]		var fileref=""		if (csloadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceeding			if (file.indexOf(".js")!=-1){ //If object is a js file				fileref=document.createElement('script')				fileref.setAttribute("type","text/javascript");				fileref.setAttribute("src", file);			}			else if (file.indexOf(".css")!=-1){ //If object is a css file				fileref=document.createElement("link")				fileref.setAttribute("rel", "stylesheet");				fileref.setAttribute("type", "text/css");				fileref.setAttribute("href", file);			}		}		if (fileref!=""){			document.getElementsByTagName("head").item(0).appendChild(fileref)			csloadedobjects+=file+" " //Remember this object as being already added to page		}	}}
/*End dynamic content slider*/
/*drop in slideshow test */
var _dropinslideshowcount=0function dropinslideshow(imgarray, w, h, delay){	this.id="_dropslide"+(++_dropinslideshowcount) //Generate unique ID for this slideshow instance (automated)	this.createcontainer(parseInt(w), parseInt(h))	this.delay=delay	this.imgarray=imgarray	var preloadimages=[]	for (var i=0; i<imgarray.length; i++){		preloadimages[i]=new Image()		preloadimages[i].src=imgarray[i][0]	}	this.animatestartpos=parseInt(h)*(-1) //Starting "top" position of an image before it drops in	this.slidedegree=10 //Slide degree (> is faster)	this.slidedelay=30 //Delay between slide animation (< is faster)	this.activecanvasindex=0 //Current "active" canvas- Two canvas DIVs in total	this.curimageindex=0	this.zindex=99	this.isMouseover=0	this.init()}dropinslideshow.prototype.createcontainer=function(w, h){ document.write('<div id="'+this.id+'" style="position:relative; width:'+w+'px; height:'+h+'px; overflow:hidden">')	document.write('<div style="position:absolute; width:'+w+'px; height:'+h+'px; top:0;"></div>')	document.write('<div style="position:absolute; width:'+w+'px; height:'+h+'px; top:-'+h+'px;"></div>')	document.write('</div>')	this.slideshowref=document.getElementById(this.id)	this.canvases=[]	this.canvases[0]=this.slideshowref.childNodes[0]	this.canvases[1]=this.slideshowref.childNodes[1]}dropinslideshow.prototype.populatecanvas=function(canvas, imageindex){	var imageHTML='<img src="'+this.imgarray[imageindex][0]+'" style="border: 0" />'	if (this.imgarray[imageindex][1]!="")		imageHTML='<a href="'+this.imgarray[imageindex][1]+'" target="'+this.imgarray[imageindex][2]+'">'+imageHTML+'</a>'	canvas.innerHTML=imageHTML}dropinslideshow.prototype.animateslide=function(){	if (this.curimagepos<0){ //if image hasn't fully dropped in yet		this.curimagepos=this.curimagepos+this.slidedegree		this.activecanvas.style.top=this.curimagepos+"px"	}	else{		clearInterval(this.animatetimer)		this.activecanvas.style.top=0		this.setupnextslide()		var slideshow=this		setTimeout(function(){slideshow.rotateslide()}, this.delay)	}}dropinslideshow.prototype.setupnextslide=function(){	this.activecanvasindex=(this.activecanvasindex==0)? 1 : 0	this.activecanvas=this.canvases[this.activecanvasindex]	this.activecanvas.style.top=this.animatestartpos+"px"	this.curimagepos=this.animatestartpos	this.activecanvas.style.zIndex=(++this.zindex)	this.curimageindex=(this.curimageindex<this.imgarray.length-1)? this.curimageindex+1 : 0	this.populatecanvas(this.activecanvas, this.curimageindex)}dropinslideshow.prototype.rotateslide=function(){	var slideshow=this	if (this.isMouseover)		setTimeout(function(){slideshow.rotateslide()}, 50)	else		this.animatetimer=setInterval(function(){slideshow.animateslide()}, this.slidedelay)}dropinslideshow.prototype.init=function(){	var slideshow=this	this.populatecanvas(this.canvases[this.activecanvasindex], 0)	this.setupnextslide()	this.slideshowref.onmouseover=function(){slideshow.isMouseover=1}	this.slideshowref.onmouseout=function(){slideshow.isMouseover=0}	setTimeout(function(){slideshow.rotateslide()}, this.delay)}
/* end drop in slideshow */

/************************************************ AnyLink Vertical Menu- © Dynamic Drive (www.dynamicdrive.com)* This notice MUST stay intact for legal use* Visit http://www.dynamicdrive.com/ for full source code***********************************************/var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)var horizontaloffset=2 //horizontal offset of menu from default location. (0-5 is a good value)/////No further editting neededvar ie4=document.allvar ns6=document.getElementById&&!document.allif (ie4||ns6)document.write('<div id="dropmenudiv" style="visibility:hidden;width: 160px" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')function getposOffset(what, offsettype){var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;var parentEl=what.offsetParent;while (parentEl!=null){totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;parentEl=parentEl.offsetParent;}return totaloffset;}function showhide(obj, e, visible, hidden, menuwidth){if (ie4||ns6)dropmenuobj.style.left=dropmenuobj.style.top=-500dropmenuobj.widthobj=dropmenuobj.styledropmenuobj.widthobj.width=menuwidthif (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")obj.visibility=visibleelse if (e.type=="click")obj.visibility=hidden}function iecompattest(){return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body}function clearbrowseredge(obj, whichedge){var edgeoffset=0if (whichedge=="rightedge"){var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15dropmenuobj.contentmeasure=dropmenuobj.offsetWidthif (windowedge-dropmenuobj.x-obj.offsetWidth < dropmenuobj.contentmeasure)edgeoffset=dropmenuobj.contentmeasure+obj.offsetWidth}else{var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffsetvar windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18dropmenuobj.contentmeasure=dropmenuobj.offsetHeightif (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move menu up?edgeoffset=dropmenuobj.contentmeasure-obj.offsetHeightif ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either? (position at top of viewable window then)edgeoffset=dropmenuobj.y}}return edgeoffset}function populatemenu(what){if (ie4||ns6)dropmenuobj.innerHTML=what.join("")}function dropdownmenu(obj, e, menucontents, menuwidth){if (window.event) event.cancelBubble=trueelse if (e.stopPropagation) e.stopPropagation()clearhidemenu()dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudivpopulatemenu(menucontents)if (ie4||ns6){showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)dropmenuobj.x=getposOffset(obj, "left")dropmenuobj.y=getposOffset(obj, "top")dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+obj.offsetWidth+horizontaloffset+"px"dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+"px"}return clickreturnvalue()}function clickreturnvalue(){if (ie4||ns6) return falseelse return true}function contains_ns6(a, b) {while (b.parentNode)if ((b = b.parentNode) == a)return true;return false;}function dynamichide(e){if (ie4&&!dropmenuobj.contains(e.toElement))delayhidemenu()else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))delayhidemenu()}function hidemenu(e){if (typeof dropmenuobj!="undefined"){if (ie4||ns6)dropmenuobj.style.visibility="hidden"}}function delayhidemenu(){if (ie4||ns6)delayhide=setTimeout("hidemenu()",disappeardelay)}function clearhidemenu(){if (typeof delayhide!="undefined")clearTimeout(delayhide)}