// JavaScript Document


/*Client testimonials*/

var pausecontent=new Array()
pausecontent[0]='<h3>&quot;We would highly recommend Elliot Environmental to anyone for mold remediation.&quot;</h3><h4>Lambertville, MI</h4>'

pausecontent[1]='<h3>&quot;Prompt, professional, knowledgeable contact person. Great office staff support. Their system works.&quot;</h3><h4>Lincoln Park MI</h4>'

pausecontent[2]='<h3>&quot;If you have to experience something as terrible as mold, you might as well have a great experience with Elliot Environmental!!&quot;</h3><h4>Washington MI</h4>'

pausecontent[3]='<h3>&quot;I would recommend Elliot Environmental to everyone!&quot;</h3><h4>Lansing MI</h4>'

pausecontent[4]='<h3>&quot;I would hire Elliot Environmental in a minute whenever their services would be necessary! I was very impressed with their prompt attention to my request and concerned/helpful manner. They have my highest recommendation.&quot;</h3><h4>Farmington Hills MI</h4>'

pausecontent[5]='<h3>&quot;I would recommend Elliot Environmental to anyone.&quot;</h3><h4>Lake Orion MI</h4>'

pausecontent[6]='<h3>&quot;I would refer Elliot to anyone who thinks they may have a problem.&quot;</h3><h4>Mt Pleasant MI</h4>'

pausecontent[7]='<h3>&quot;Elliot Environmental&#39;s quote was almost half the price of other quotes we received. Response time was great and they did a good job.&quot;</h3><h4>Commerce Twp MI</h4>'

pausecontent[8]='<h3>&quot;Thank you so much, you guys did a fantastic job. We are very pleased&quot;</h3><h4>Midland MI</h4>'

pausecontent[9]='<h3>&quot;We appreciate the hard work. The work ethic and integrity of you and your crew meant so much&quot;</h3><h4>Goodrich MI</h4>'

pausecontent[10]='<h3>&quot;On time, friendly, thorough, competent, and efficient. I would highly recommend Elliot Environmental to anyone who needed such services.&quot;</h3><h4>Troy MI'

pausecontent[11]='<h3>&quot;I would highly recommend Elliot Environmental to friends and family. Thanks!&quot;</h3><h4>Brighton MI</h4>'

pausecontent[12]='<h3>&quot;Brian and his crew were awesome. They answered any questions we had, were very informative and were very nice people. His prices were lower than any other quotes we received and they did more than was originally planned without any problems. I would highly recommend them.&quot;</h3><h4>Grayling MI</h4>'

pausecontent[13]='<h3>&quot;Thanks again for the terrific job. I would recommend your company to anyone with a problem like ours.&quot;</h3><h4>Sterling Heights MI</h4>'

pausecontent[14]='<h3>&quot;You took the stress right out of the situation. You were professional and personal at the same time. It was great working with you&quot;</h3><h4>West Bloomfield MI</h4>'

pausecontent[15]='<h3>&quot;Thanks for taking care of my basement. You guys are awesome&quot;</h3><h4>Ann Arbor MI</h4>'

pausecontent[16]='<h3>&quot;You and your staff were professional, responsive, and willing to go the extra mile, ensuring all aspects of our situation were covered in a timely manner. You assured me that you would stay on until the job was complete and you did. Thank you.&quot;</h3><h4>Grand Rapids MI</h4>'

pausecontent[17]='<h3>&quot;The timeframe I had for you to complete the work was not ideal: however you made adjustments with your schedule and did as you stated you would do&quot;</h3><h4>Battle Creek MI</h4>'

pausecontent[18]='<h3>&quot;I want to thank you again for a wonderful job with a good attitude. We could not be more pleased&quot;</h3><h4>Saginaw MI</h4>'

pausecontent[19]='<h3>&quot;They do quality work with attention to detail and really care about customer satisfaction. They are the best&quot;</h3><h4>Livonia MI</h4>'

pausecontent[20]='<h3>&quot;Thanks for the great job and for taking the time to explain details to us. &quot;</h3><h4>Dearborn MI</h4>'

pausecontent[21]='<h3>&quot;Thank you for the quick response and the great job you did. We were very impressed with the crew&quot;</h3><h4>Westland MI</h4>'





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

