/***********************************************
* 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.
***********************************************/

var pausecontent=new Array()
pausecontent[0]='<a href="/about/SDRA/friends/506_YardandGarden_big.html"><img src="/images/logos/506_Yard&Garden.png" alt="506 Yard and Garden" title="506Yard and Garden" border="0"></a>';
pausecontent[1]='<a href="/about/SDRA/friends/Addisons_Restaurant_big.html"><img src="/images/logos/Addisons_Restaurant.png" alt="Addison\'s Restaurant" title="Addison\'s Restaurant" border="0"></a>';
pausecontent[2]='<a href="/about/SDRA/friends/Barrington_Insurance_big.html"><img src="/images/logos/Barrington_Insurance.png" alt="Barrington Insurance Brokers" title="Barrington Insurance Brokers" border="0"></a>';
pausecontent[3]='<a href="/about/SDRA/friends/Bence_Motors_big.html"><img src="/images/logos/Bence_Motors.png" alt="Bence Motors" title="Bence Motors" border="0"></a>';
pausecontent[4]='<a href="/about/SDRA/friends/BL_Outdoor_big.html"><img src="/images/logos/BL_Outdoor.png" alt="Bishop Lake Outdoor Centre" title="Bishop Lake Outdoor Centre" border="0"></a>';
pausecontent[5]='<a href="/about/SDRA/friends/Country_Traditions_big.html"><img src="/images/logos/Country_Traditions.png" alt="Country Traditions" title="Country Traditions" border="0"></a>';
pausecontent[6]='<a href="/about/SDRA/friends/Countryside_Carpentry_big.html"><img src="/images/logos/Countryside_Carpentry.png" alt="Countryside Carpentry" title="Countryside Carpentry" border="0"></a>';
pausecontent[7]='<a href="/about/SDRA/friends/Custom_Cover_big.html"><img src="/images/logos/Custom_Coverup.png" alt="Custom Coverup" title="Custom Coverup" border="0"></a>';
pausecontent[8]='<a href="/about/SDRA/friends/DW_Design_big.html"><img src="/images/logos/DW_Design.png" alt="DW Design" title="DW Design" border="0"></a>';
pausecontent[9]='<a href="/about/SDRA/friends/Fobert_Forestry_big.html"><img src="/images/logos/Fobert_Forestry.png" alt="Fobert Forestry" title="Fobert Forestry" border="0"></a>';
pausecontent[10]='<a href="/about/SDRA/friends/FOODLAND_big.html"><img src="/images/logos/FOODLAND.png" alt="Northbrook Foodland" title="Northbrook Foodland"border="0"></a>';
pausecontent[11]='<a href="/about/SDRA/friends/Grands_Store_big.html"><img src="/images/logos/Grands_Store.png" alt="Grand\'s Store" title="Grand\'s Store" border="0"></a>';
pausecontent[12]='<a href="/about/SDRA/friends/Hearth_Home_big.html"><img src="/images/logos/Hearth_Home.png" alt="Hearth<i>at</i>Home" title="Hearth<i>at</i>Home" border="0"></a>';
pausecontent[13]='<a href="/about/SDRA/friends/HOME_big.html"><img src="/images/logos/HOME.png" alt="Cloyne Home Hardware" title="Cloyne Home Hardware" border="0"></a>';
pausecontent[14]='<a href="/about/SDRA/friends/JCH_Logging_big.html"><img src="/images/logos/JCH_Logging.png" alt="JCH Logging" title="JCH Logging" border="0"></a>';
pausecontent[15]='<a href="/about/SDRA/friends/Terry_Langevin_big.html"><img src="/images/logos/Terry_Langevin.png" alt="Terry Langevin" title="Terry Langevin" border="0"></a>';
pausecontent[16]='<a href="/about/SDRA/friends/Lighthouse_Restaurant_big.html"><img src="/images/logos/Lighthouse_Restaurant.png" alt="Lighthouse Restaurant" title="Lighthouse Restaurant" border="0"></a>';
pausecontent[17]='<a href="/about/SDRA/friends/Marble_Lake_Lodge_big.html"><img src="/images/logos/Marble_Lake_Lodge.png" alt="Marble Lake Lodge" title="Marble Lake Lodge" border="0"></a>';
pausecontent[18]='<a href="/about/SDRA/friends/Mumby_Septic_big.html"><img src="/images/logos/Mumby_Septic.png" alt="Joe Mumby" title="Joe Mumby" border="0"></a>';
pausecontent[19]='<a href="/about/SDRA/friends/Northbrook_Gas&Variety_big.html"><img src="/images/logos/Northbrook_Gas&Variety.png" alt="Northbrook_Gas and Variety" title="Northbrook_Gas and Variety" border="0"></a>';
pausecontent[20]='<a href="/about/SDRA/friends/Northbrook_Outfitters_big.html"><img src="/images/logos/Northbrook_Outfitters.png" alt="Northbrook Outfitters" title="Northbrook Outfitters" border="0"></a>';
pausecontent[21]='<a href="/about/SDRA/friends/Nowell_Construction_big.html"><img src="/images/logos/Nowell_Construction.png" alt="Ron Nowell Construction" title="Ron Nowell Construction" border="0"></a>';
pausecontent[22]='<a href="/about/SDRA/friends/Nowell_Motors_big.html"><img src="/images/logos/Nowell_Motors.png" alt="Nowell Motors Ltd." title="Nowell Motors Ltd." border="0"></a>';
pausecontent[23]='<a href="/about/SDRA/friends/Regan_ReMax_big.html"><img src="/images/logos/Regan_ReMax.png" alt="Suzanne Regan" title="Suzanne Regan" border="0"></a>';
pausecontent[24]='<a href="/about/SDRA/friends/Reiser_Contracting_big.html"><img src="/images/logos/Reiser_Contracting.png" alt="Reiser Contracting" title="Reiser`Contracting border="0"></a>';
pausecontent[25]='<a href="/about/SDRA/friends/RONA_big.html"><img src="/images/logos/RONA.png" alt=" Hook\'s Rona" title="Hook\'s Rona" title="Hook\'s Rona" border="0"></a>';
pausecontent[26]='<a href="/about/SDRA/friends/Ronfeld_Electric_big.html"><img src="/images/logos/Ronfeld_Electric.png" alt="Ronfeld Electric" title="Ronfeld Electric" border="0"></a>';
pausecontent[27]='<a href="/about/SDRA/friends/Shay_Photography_big.html"><img src="/images/logos/Shay_Photography.png" alt="Shay Photography" title="Shay Photography" border="0"></a>';
pausecontent[28]='<a href="/about/SDRA/friends/Smarts_Marina_big.html"><img src="/images/logos/Smarts_Marina.png" alt="Smart\'s Marina" title="Smart\'s Marina" border="0"></a>';
pausecontent[29]='<a href="/about/SDRA/friends/Smittys_Appliances_big.html"><img src="/images/logos/Smittys_Appliances.png" alt="Smitty\'s Appliances" title="Smitty\'s Appliances" border="0"></a>';
pausecontent[30]='<a href="/about/SDRA/friends/Staceys_big.html"><img src="/images/logos/Staceys_Graphics.png" alt="Stacey\'s Custom Graphics" title="Stacey\'s Custom Graphics"  border="0"></a>';
pausecontent[31]='<a href="/about/SDRA/friends/Tims_Autobody_big.html"><img src="/images/logos/Tims_Autobody.png" alt="Tim\'s Autobody"  title="Tim\'s Autobody" border="0"></a>';
pausecontent[32]='<a href="/about/SDRA/friends/Tobia_Pharmacy_big.html"><img src="/images/logos/Tobia_Pharmacy.png" alt="Tobia\'s Pharmacy" title="Tobia\'s Pharmacy" border="0"></a>';
pausecontent[33]='<a href="/about/SDRA/friends/Total_Pest_big.html"><img src="/images/logos/Total_Pest.png" alt="Total Pest Management" title="Total Pest Management" border="0"></a>';
pausecontent[34]='<a href="/about/SDRA/friends/Truelove_Carpentry_big.html"><img src="/images/logos/Truelove_Carpentry.png" alt="Truelove Carpentry" title="Truelove Carpentry" border="0"></a>';
pausecontent[35]='<a href="/about/SDRA/friends/Village_Foods_big.html"><img src="/images/logos/Village_Foods.png" alt="Cloyne Village Foods" title="Cloyne Village Foods" border="0"></a>';
pausecontent[36]='<a href="/about/SDRA/friends/ViP_Moving_big.html"><img src="/images/logos/ViP_Moving.png" alt="ViP Moving" title="ViP Moving" border="0"></a>';
pausecontent[37]='<a href="/about/SDRA/friends/Winney_LePage_big.html"><img src="/images/logos/Winney_LePage.png" alt="Chris Winney" title="Chris Winney" border="0"></a>';
pausecontent[38]='<a href="/about/SDRA/friends/Yourway_Castle_big.html"><img src="/images/logos/Yourway_Castle.png" alt="Yourway Building Centre" title="Yourway Building Centre" border="0"></a>';

var jj= Math.floor(Math.random() * pausecontent.length)
var kk=(jj==pausecontent.length-1)? 0 : jj+1

function pausescroller(content, divId, divClass, delay){
this.content=content //message array content
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=kk //index of message array for hidden div
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[jj]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[kk]+'</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)
}

// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------

pausescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.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.visibledivtop*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.animateup()}, this.delay)
}


// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------

pausescroller.prototype.animateup=function(){
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()}, 50)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}

// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------

pausescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}

pausescroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}

// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------

pausescroller.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.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}

pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}


