// JavaScript Document

/*Example message arrays for the two demo scrollers*/

var pausecontent=new Array()

pausecontent[0] = '<a href="1testimonials.aspx"><font color="#000000">As a Kidzee teacher, I have been able to integrate the Illume fundamentals and put them into practice in class. It has been a very fulfilling experience to learn the Illume and practice it. I&rsquo;m also thankful to all the parents for their support and regular participation in all our workshops and open house meets....</font></a></br><p><font color="#00B2EE">&ndash; Ms Rekha &ndash; Kidzee Teacher of Nursery Class.</font>'
pausecontent[1] = '<a href="1testimonials.aspx"><font color="#000000">My daughter Saheli went to Kidzee Nursery after she had spent a year of playschool in our locality. But in less than a week, she adjusted to the new school as if she had never been to any other school&#33; The teachers in Saheli&rsquo;s nursery class spend so much quality time with her. I was pleasantly surprised to receive a greeting card made by her on Mother&rsquo;s Day. Thank you Kidzee for being a second home for Saheli&#33;</font></a></br><p><font color="#00B2EE">&ndash; Ms Rekha &ndash; Kidzee Teacher of Nursery Class.</font>'
pausecontent[2] = '<a href="1testimonials.aspx"><font color="#000000">It gives me great pleasure to tell you that my daughter, Ditipriya Mukherjee, in her first two years at Kidzee, has shown the inclination to study, has developed a great sense of discipline and cleanliness, and has started taking part in extracurricular activities. Thanks to the sincere efforts of Kidzee teachers, my child has made considerable progress in her scholastic life.</font></a></br><p><font color="#00B2EE">&ndash; Sujoy Mukherjee, Ditipriya&rsquo;s father.</font>'
pausecontent[3] = '<a href="1testimonials.aspx"><font color="#000000">Imparting knowledge is God&rsquo;s gift in form of a teacher&rsquo;s teachings Shrayan, his mother Sahana and me &#40;his father&#41; are grateful to Kidzee for upbringing Shrayan. We will remember Kidzee forever for value guidance and knowledge sharing.</font></a></br><p><font color="#00B2EE">&ndash; Dr. Debabrata Mukhopadhyay, Shrayan&rsquo;s father.</font>'
pausecontent[4] = '<a href="1testimonials.aspx"><font color="#000000">Kidzee is Rishi&rsquo;s first school experience. He looks forward to school every morning and he&rsquo;s shown very positive all-round development in the last five months. As parents, we find that the teachers and principal&rsquo;s involvement is total and complete. We are very pleased with the choice of Kidzee for Rishi.</font></a></br><p><font color="#00B2EE">&ndash; Ganesh Sharma, Rishi&rsquo;s father.</font>'
pausecontent[5] = '<a href="1testimonials.aspx"><font color="#000000">It is said that a child&rsquo;s foundation for life is laid at home and his&#47;her first step outside the home is in school, so school should be like a second home to the child. Kidzee has proved to be a second home for my child, Drishti.</font></a></br><p><font color="#00B2EE">&ndash; Vandana Arora, Drishti&rsquo;s mother .</font>'
pausecontent[6] = '<a href="1testimonials.aspx"><font color="#000000">I am thankful to Kidzee for helping my daughter, Shankhadipa, grow up fearlessly and amicably under the able guidance of the teachers and staff. For my daughter, school meant fun and friends. I hardly remember a day when she had not wanted to go to school.</font></a></br><p><font color="#00B2EE">&ndash; Paushali Bhattacharya, Shankhadipa&rsquo;s mother.</font>'
pausecontent[7] = '<a href="1testimonials.aspx"><font color="#000000">When our daughter, Baby Kriti Prashant Shetty, entered Kidzee, she was just 18 months old. She has blossomed this year. Her self-confidence has reached new levels, and her study skills are now 3 times better than what it was originally. She enjoys school, and she&rsquo;s learnt so much through Kidzee.</font></a></br><p><font color="#00B2EE">&ndash; Ushavati and Prashant Shetty, Kriti&rsquo;s parents.</font>'
pausecontent[8] = '<a href="1testimonials.aspx"><font color="#000000">Conducting class is much easier now with the availability of DAILY PLANS outlining the minutest of details right from child entering the classroom till its time for him&#47;her to leave.</font></a></br><p><font color="#00B2EE">&ndash; Mrs. Kanika Patel.</font>'
pausecontent[9] = '<a href="1testimonials.aspx"><font color="#000000">Syllabus is child appropriate and evenly spaced out lessening the burden for teachers and child both.</font></a></br><p><font color="#00B2EE">&ndash; Ms. Gauri. J. Rohira.</font>'
pausecontent[10] = '<a href="1testimonials.aspx"><font color="#000000">Children are able to assimilate information and respond well to the questions asked during the recapitulation.</font></a></br><p><font color="#00B2EE">&ndash; Mrs. Zeenobia K. Printer.</font>'
pausecontent[11] = '<a href="1testimonials.aspx"><font color="#000000">Recap of the concepts done through games helped a lot in reinforcement of the concept in the children.</font></a></br><p><font color="#00B2EE">&ndash; Mrs. Jyoti Lewis.</font>'





/***********************************************
* 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
}


