// JavaScript Document

/*Example message arrays for the two demo scrollers*/
var pausecontent2=new Array()
//pausecontent2[0]='<b>News:</b> Satya Tech signs up with major telecom player.'
//pausecontent2[1]='<b>News:</b> www.idtechsol.co.in re-launched with a new design'
//pausecontent2[2]='<b>News:</b> Satya Tech now is a 200 strong company'

var pausecontent1=new Array()
pausecontent1[0]='<ul><li>My son wasnt really fond of dentists when we got here due to earlier experiences in his childhood. He loves Dr. Travis and I dont have any problems having him get ready to go to the dentist now. Dr. Travis is very professional and you can tell he loves working with children. Thank you Dr. Travis for making coming to the dentist fun again! ... Jen M. <br/></li></ul>'

pausecontent1[1]='<ul><li>Georgetown Pediatric Dentistry is a great place--no waiting, friendly staff, and very good with kids and parents alike! ... Jennifer M. <br/></li></ul>'

pausecontent1[2]='<ul><li>Going into my daughters appointment, we were pretty nervous.  Well truthfully, I was more nervous than she was shed never had a filling before and I was so anxious for her!All my worry was for naught, however.Everything went so well!  Dr. Travis and his staff were attentive and reassuring, anticipated our every need, and made my daughter (and I!) totally at ease.Truly, we could not have hoped for a better experience.  My daughter cant wait to go to the dentist again. Thanks Dr. Travis and Tiffany! ... Christine C.<br/></li></ul>'

pausecontent1[3]='<ul><li>The entire staff is excellent start to finish.  There was no wait time and they took their time and explained everything they were doing to my daughter and made her very comfortable.  She is no longer afraid of the dentist!" ... Jessica S.<br/></li></ul>'

pausecontent1[4]='<ul><li>I brought my six-year-old daughter to Georgetown Pediatric Dentistry for the first time the other day. She was very nervous because she has never liked going for dental visits. Dr. Hildebrand and his staff were amazing! Everything was explained to my daughter before it was done. The x-rays, the cleaning, and exam. The dentist and his staff didn’t say anything to scare her. In fact, I was so impressed by their calm approach. The waiting room and exam areas were very child friendly, clean, and cheerful. Our daughter couldn’t wait to tell her big brother all about her visit to the dentist. Thank you Georgetown Pediatric Dentistry!" ... Leah C.<br/></li></ul>'

pausecontent1[5]='<ul><li>When my daughter left the office she said "That was so much fun...when can we go back." THIS was music to my ears- theres no fear in this girl when it comes to going to the dentist! The staff is very friendly towards the children and adults. We all felt comfortable and at home. I really think that my girls did not want to leave, who would with the dynamite play area, complimentary gourmet  coffees/ tea and computers for use.  Thank You." ... Shelly S.<br/></li></ul>'

pausecontent1[6]='<ul><li>Georgetown Pediatric Dentistry is our family dental home. Coming from a background of a lot of dental treatment and developing a fear of dental associated, it was very important to me to find a fun, talented and warm environment for our children. I was pleasantly surprised to find Georgetown Pediatric Dentistry right around the corner from our home and the staff makes us feel right at home. This place is the best kept secret in Georgetown and is THE PLACE to be for your pediatric dental needs. The staff should "tooth their horn" for getting it right." ...Michelle B.<br/></li></ul>'

pausecontent1[7]='<ul><li>I wanted to thank your entire staff for making Matthews visit go as well as it did. He was extremely worked up the night before and after talking to him about Dr. Travis he was better.  He loved the fact that Dr. Travis said they were buddies.  Thanks so much!"...Melinda M.<br/></li></ul>'

pausecontent1[8]='<ul><li>To the crew at Georgetown Pediatric Dentistry - That was one of the best visits to any doctors office that we have had. My 5 year old had a great time, you all got us in and out in record time, and still kept your quality of service. My son was scared to come in and your team helped to put his fears at ease! Dr. Travis explained everything and the girls in the back kept my 5 year old laughing. When we left, my son said that he had fun! Thanks so much." ...Linda R.<br/></li></ul>'

pausecontent1[9]='<ul><li>We had our first appointment as we were new in town. My son (9) was so used to his former pediatric dentist that he was a little apprehensive on our way to the appointment. As soon as we entered the office my son was immediately relaxed by the quiet office and the western/cowboy theme town. The entire staff was very warm, welcoming, and friendly. I could tell my son was in good hands. After my sons cleaning I met with one of the doctors and he was just as welcoming and friendly as the staff. I am a nurse so I am always aware of the clinical/customer experience and Georgetown Pediatric Dentistry exceeded my expectations. Truly an A+ experience and would highly recommend. When we got home he told his dad that his new dentist is awesome!" ...Nicolette K.<br/></li></ul>'

pausecontent1[9]='<ul><li>Going into my daughters appointment we were pretty nervous. Well, truthfully I was more nervous than she was. She had never had a filling before and I was so anxious for her! All my worry was for nothing however. Everything went so well. Dr. Travis and his staff were attentive and reassuring. They anticipated our every need and made my daughter and I totally at ease. Truly, we could not have hoped for a better experience. My daughter cant wait to go to the dentist again. Thanks Dr. Travis and Tiffany!" ...Christine C.<br/></li></ul>'

pausecontent1[10]='<ul><li>As a mother of five and someone who has been to many dental practices, I can honestly say that Dr. Havard and all the staff at Georgetown Pediatric Dentistry are truly the best. The staff is always professional, patient, and gentle. Most important to me is the fact that my children and I are treated like family. The staff show a genuine care and concern for my children and actually takes the time to get to know each one of them. The staff always makes sure to answer our questions, address concerns, and make everyone comfortable. I am grateful for the care my children receive there and recommend them highly!" ...Nicole S.<br/></li></ul>'

pausecontent1[11]='<ul><li>We just had our first appointments at Georgetown Pediatric Dentistry and it was a wonderful experience. The staff members were so friendly and it is evident that they are trained to work with little ones - and moreover, that they enjoy working with children! The office was fun and clean and had wonderfully innovative ways to keep the kids engaged and happy during their appointments. The kids are already looking forward to their 6 month check-ups!" ...Julie H.<br/></li></ul>'

/***********************************************
* 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()}, 200)
}
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
}
