﻿/***********************************************
* 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 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=1 //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[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[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)
}

// -------------------------------------------------------------------
// 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*1)+"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
}



/*Example message arrays for the two demo scrollers*/

var pausecontent=new Array()
pausecontent[32]='<center>Finchdale Bridal Cleaners <br /> Ontario, Canada <p> <a href="http://www.finchdalebridalcleaners.com" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.finchdalebridalcleaners.com" border="0" width="190" height="120" alt="Visit Finchdale Bridal Cleaners"></a> </p></center>'
pausecontent[31]='<center>Finchdale Cleaners <br /> Ontario, Canada <p> <a href="http://www.finchdalecleaners.com" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.finchdalecleaners.com" border="0" width="190" height="120" alt="Visit Finchdale Cleaners"></a> </p></center>'
pausecontent[30]='<center>Cal Laundry Investments <br /> Santa Ana, CA <p> <a href="http://www.callaundry.com" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.callaundry.com" border="0" width="190" height="120" alt="Visit Cal Laundry Investments"></a> </p></center>'
pausecontent[29]='<center>Chesterfield Cleaners <br /> Chesterfield, MO <p> <a href="http://www.chesterfieldcleaners.com" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.chesterfieldcleaners.com" border="0" width="190" height="120" alt="Visit Chesterfield Cleaners"></a> </p></center>'
pausecontent[28]='<center>Best Cleaners <br /> Eden Prairie, MN <p> <a href="http://www.bestcleaners.org" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://bestcleaners.org" border="0" width="190" height="120" alt="Visit Best Cleaners"></a> </p></center>'
pausecontent[27]='<center>Maytag Coin Laundry <br /> of Minnesota <p> <a href="http://maytagcoinlaundry.com" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://maytagcoinlaundry.com" border="0" width="190" height="120" alt="Visit Maytag Coin Laundry"></a> </p></center>'
pausecontent[26]='<center>My LaundroMAX <br /> Richfield, MN <p> <a href="http://mylaundromax.com" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.mylaundromax.com" border="0" width="190" height="120" alt="Visit My LaundroMAX"></a> </p></center>'
pausecontent[25]='<center>Minnesota Coin <br /> Laundry Assoc <p> <a href="http://www.mnlaundries.com" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.mnlaundries.com" border="0" width="190" height="120" alt="Visit MN Laundries"></a> </p></center>'
pausecontent[24]='<center>Roxy Cleaners <br /> St Paul, MN <p> <a href="http://www.roxycleaners.com" target="_blank"> <img src="http://www.directory-networks.net/images/shots/20_tn.jpg" border="0" width="190" height="120" alt="Visit Roxy Cleaners"></a> </p></center>'
pausecontent[23]='<center>Cleaners Equip Co <br /> Denver, CO <p> <a href="http://www.thecleanersequipment.net" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.thecleanersequipment.net" border="0" width="190" height="120" alt="Visit The Cleaners Equipment Company"></a> </p></center>'
pausecontent[22]='<center>Wash Wave Laundry <br /> Wichita, KS <p> <a href="http://www.washwavelaundry.com" target="_blank"> <img src="http://www.directory-networks.net/images/shots/26_tn.jpg" border="0" width="190" height="120" alt="Visit Wash Wave Laundry"></a> </p></center>'
pausecontent[21]='<center>Iris City Cleaners <br /> Mt Pleasant, IA <p> <a href="http://www.iriscitycleaners.com" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.iriscitycleaners.com" border="0" width="190" height="120" alt="Visit Iris City Cleaners"></a> </p></center>'
pausecontent[20]='<center>Skyline Cleaners <br /> Willernie, MN <p> <a href="http://www.skyline-cleaners.net" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://skyline-cleaners.net" border="0" width="190" height="120" alt="Visit Skyline Cleaners"></a> </p></center>'
pausecontent[19]='<center>SoCal Coin <br /> Laundry Assoc <p> <a href="http://www.socalcla.net" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.socalcla.net" border="0" width="190" height="120" alt="Visit SoCal Coin Laundry Assoc"></a> </p></center>'
pausecontent[18]='<center>U.S. Coin <br /> Laundromat Directory <p> <a href="http://www.coinlaundromats.us" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.coinlaundromats.us" border="0" width="190" height="120" alt="Visit U.S. Coin Laundromat Directory"></a> </p></center>'
pausecontent[17]='<center>Directory Networks <br /> Eagan, MN <p> <a href="http://www.directory-networks.net" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.directory-networks.net" border="0" width="190" height="120" alt="Visit Directory Networks"></a> </p></center>'
pausecontent[16]='<center>Rocky Mountain <br /> Fabricare Assoc <p> <a href="http://www.rmfa.org" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.rmfa.org" border="0" width="190" height="120" alt="Visit Rocky Mountain Fabricare Assoc"></a> </p></center>'
pausecontent[15]='<center>Laundry Express <br /> East Haven, CT <p> <a href="http://www.laundry-express.com" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.laundry-express.com" border="0" width="190" height="120" alt="Visit Laundry Express"></a> </p></center>'
pausecontent[14]='<center>Clothesline Laundromat <br /> South St Paul, MN <p> <a href="http://www.clotheslinelaundromat.com" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.clotheslinelaundromat.com" border="0" width="190" height="120" alt="Visit Clothesline Laundromat"></a> </p></center>'
pausecontent[13]='<center>U.S. Dry Cleaners <br /> Directory <p> <a href="http://www.drycleanersdirectory.us" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.drycleanersdirectory.us" border="0" width="190" height="120" alt="Visit U.S. Dry Cleaners Directory"></a> </p></center>'
pausecontent[12]='<center>Drycleaning Factory <br /> Glenview, IL <p> <a href="http://www.drycleaningfactory.com" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.drycleaningfactory.com" border="0" width="190" height="120" alt="Visit Drycleaning Factory"></a> </p></center>'
pausecontent[11]='<center>Roering Auto Body <br /> St Paul, MN <p> <a href="http://www.roeringautobody.com" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.roeringautobody.com" border="0" width="190" height="120" alt="Visit Roering Auto Body"></a> </p></center>'
pausecontent[10]='<center>The Laundry Doctor <br /> St Paul, MN <p> <a href="http://www.thelaundrydoctor.com" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.thelaundrydoctor.com" border="0" width="190" height="120" alt="Visit The Laundry Doctor"></a> </p></center>'
pausecontent[9]='<center>Selby Avenue <br /> St Paul, MN <p> <a href="http://www.selbyavenue.com" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.selbyavenue.com" border="0" width="190" height="120" alt="Visit Selby Avenue Businesses"></a> </p></center>'
pausecontent[8]='<center>Eagle Landings <br /> Fort Wayne, IN <p> <a href="http://www.eaglelandings.biz" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.eaglelandings.biz" border="0" width="190" height="120" alt="Visit Eagle Landings"></a> </p></center>'
pausecontent[7]='<center>Paisano\'s Pizza <br /> St Paul, MN <p> <a href="http://paisanos-pizza.com" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://paisanos-pizza.com" border="0" width="190" height="120" alt="Visit Paisano\'s Pizza"></a> </p></center>'
pausecontent[6]='<center>Corinium Cleaners <br /> Schaumburg, IL <p> <a href="http://www.coriniumcleaners.com" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.coriniumcleaners.com" border="0" width="190" height="120" alt="Visit Corinium Cleaners"></a> </p></center>'
pausecontent[5]='<center>Anytime Storage <br /> Mankato, MN <p> <a href="http://www.anytimestoragemn.com" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.anytimestoragemn.com" border="0" width="190" height="120" alt="Visit Anytime Storage"></a> </p></center>'
pausecontent[4]='<center>Burling Cleaners <br /> Bradley, IL <p> <a href="http://www.burlingprofessionalcleaners.com" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.burlingprofessionalcleaners.com" border="0" width="190" height="120" alt="Visit Burling Cleaners"></a> </p></center>'
pausecontent[3]='<center>Wonder Wash Laundry <br /> Anahiem, CA <p> <a href="http://www.wonderwashlaundry.com" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.wonderwashlaundry.com" border="0" width="190" height="120" alt="Visit Wonder Wash Laundry"></a> </p></center>'
pausecontent[2]='<center>The Cleaners <br /> Greeley, CO <p> <a href="http://www.thecleaners.net" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.thecleaners.net" border="0" width="190" height="120" alt="Visit The Cleaners"></a> </p></center>'
pausecontent[1]='<center>LHS Class of \'58 <br /> Lubbock, TX <p> <a href="http://www.lubbockhighclassof1958.com" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.lubbockhighclassof1958.com" border="0" width="190" height="120" alt="Visit LHS Class of \'58"></a> </p></center>'
pausecontent[0]='<center>The Empty Nest <br /> Burnsville, MN <p> <a href="http://www.theemptynest.org" target="_blank"> <img src="http://www.shrinktheweb.com/xino.php?embed=1&u=a3576&STWAccessKeyId=51b2290b9443f0c&Size=lg&Url=http://www.theemptynest.org" border="0" width="190" height="120" alt="Visit The Empty Nest"></a> </p></center>'


