
var slideimages=new Array()
slideimages[0]='<span class="slideL0"><center><br /><img src="Slide/Police-Week.png" alt="Police Week Celebration" border="1" /><br />The Beggs Chamber of Commerce honored our local police department on May 12th during Nation Police Week. Crystal Simmons, Beggs Chamber of Commerce President, is presenting Chief James Poulin with a Lead By Example pin and key chain.</center></span>'
slideimages[1]='<span class="slideL0"><center><img src="Slide/CClRibbon.png" alt="Cross Country Leather" border="1" /><br />Beggs Chamber of Commerce welcomed Cross Country Leather to our community on December 5th with a ribbon cutting ceremony.<br />We encourage everyone to stop by and welcome them as well.<br />Chamber Treasure/Sec-Joy Gullic, Chamber Ambassador-Carolyn Taylor, Chamber Ambassador-Crystal Simmons, Owner-Janet Thomas with grand-daughter Clara,Shelly Burch, James (Smitty) Smith, &amp; Chamber Public Relations Chairperson Valerie Rice.</center></span>'
slideimages[2]='<span class="slideL0"><center><img src="Slide/MagicAcresRibbon.png" alt="Magic Acres Steak House &amp; Saloon" border="1" /><br />Beggs Chamber of Commerce welcomed Magic Acres Steak House &amp; Saloon on December 5th. We encourage everyone to stop by and welcome them as well. Mrs. Bivins, Chamber Treasure/Sec-Joy Gullic, Chamber Ambassador-Crystal Simmons, 2008 Chamber President - Terry Fox, Owner-Teri Hinman, Chamber Ambassador-Carolyn Taylor, Owner - Bobby Holland, Prep-Chef- Amber Sowers, Hostess-Robyn Boak, Waiter-Mike Bivins, &amp; long time friend and restaurant advisor Anne Daubney.</center></span>'
slideimages[3]='<span class="slideL0"><center><img src="Slide/LOLS.jpg" alt="Livin Out Loud Salon" border="1" /><br />Beggs Chamber of Commerce welcomed Livin Out Loud Salon to our community on May 23rd with a ribbon cutting ceremony.<br />We encourage everyone to stop by and welcome them as well.<br />Chamber President-Terry Fox, Chamber Ambassador-Carolyn Taylor, Stylist-Christi Rickel, Salon Owner-Andrea Markes, Nail Technician-Sherrie Guthrie, Gift Shop-Sandra Rice, Chamber Ambassador-Crystal Simmons, &amp; Chamber VP-Jennifer Hamby</center></span>'
slideimages[4]='<span class="slideL1"><center><img src="Slide/RockABillys.jpg" alt="Rock-A-Billy" border="1" /><br />The Beggs Chamber of Commerce Welcomed Rock-A-Billy to the communtiy on May 23rd with a ribbon cutting ceremony.<br />Stop by &amp; check out the GREAT daily lunch specials! <br />Chamber VP-Jennifer Hamby, Chamber Ambassador-Carolyn Taylor, Chamber President-Terry Fox, Laurinelle Moude, Owners-Mike &amp; Barbara Scott, Karen Akers, Chamber Ambassador-Crystal Simmons, Becky Fox &amp; Chamber Secretary-Joy Gullic</center></span>'
slideimages[5]='<span class="slideL4"><center><img src="Slide/BCoCStorage.jpg" alt="Beggs Chamber of Commerce New Storage Facility" border="1" /><br />The Beggs Chamber of Commerce now has a place to store many of our seasonal items thanks to Mr. Ed Taylor.  He priced everything, turned in the bid, and built the Chamber a much needed facility.<br /></center></span>'


/***********************************************
* Pausing up-down scroller- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

function slidescroller(slideL, divId, divClass, delay){
this.slideL=slideL //message array slideL
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div
document.write('<div width="100%" id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div  class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+slideL[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+slideL[1]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 500)
}

slidescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivleft=parseInt(slidescroller.getCSSpadding(this.tickerdiv))
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivleft*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateleft()}, this.delay)
}
slidescroller.prototype.animateleft=function(){
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.left)>(this.visibledivleft+5)){
this.visiblediv.style.left=parseInt(this.visiblediv.style.left)-5+"px"
this.hiddendiv.style.left=parseInt(this.hiddendiv.style.left)-5+"px"
setTimeout(function(){scrollerinstance.animateleft()}, 50)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}
slidescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}

slidescroller.prototype.getinline=function(div1, div2){
div1.style.left=this.visibledivleft+"px"
div2.style.left=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}
slidescroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.slideL.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.slideL[this.hiddendivpointer]
this.animateleft()
}
}

slidescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingLeft"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-left")
else
return 0
}
