var pausecontent1=new Array()
pausecontent1[0]='"Life is a Game, Play it." - BABA'
pausecontent1[1]='"Dust if you think, Dust you are. God if you think, God you are. Verily thoughts decide who you are. Decide your thoughts carefully." - BABA'
pausecontent1[2]='"Use the present moment best to sharpen your skills, to broaden your intelligence, to expand your heart and to master the technique of facing the challenges of life with courage and equanimity." - BABA'
pausecontent1[3]='"Life is a Dream, Realize it." - BABA'
pausecontent1[4]='"Life is a Challenge, Meet it." - BABA'
pausecontent1[5]='"Education does not end with mastery of the meanings of words. It means opening wide the door of the Mind; It means cleansing the Inner tools of the Consciousness, Mind, Ego & the Senses. True education must purge one of all traces of selfishness." - BABA'
pausecontent1[6]='"Life is a Sacrifice, Offer it." - BABA'
pausecontent1[7]='"Life is the greatest adventure." - BABA'
pausecontent1[8]='"Truth fears no trust or trial." - BABA'
pausecontent1[9]='"Power and strength come from within." - BABA'
pausecontent1[10]='"Determination is Power." - BABA'
pausecontent1[11]='"In the middle of difficulty lies opportunity." - BABA'
pausecontent1[12]='"Applaud when we run, console when we fall, cheer when we recover." - BABA'
pausecontent1[13]='"There is only one corner of the universe you can be sure of improving -YOURSELF." - BABA'
pausecontent1[14]='"The human spirit is stronger than anything that happens to it." - BABA'
pausecontent1[15]='"The purpose of life - a Life with Purpose." - BABA'
pausecontent1[16]='"No Guts - No Glory." - BABA'
pausecontent1[17]='"Your big opportunity - right where you are now." - BABA'
pausecontent1[18]='"If not you - Who; If not now - When?" - BABA'
pausecontent1[19]='"The greatest puzzle-Who am I?" - BABA'
pausecontent1[20]='"Motivation gets you Started-Habit keeps you Going." - BABA'
pausecontent1[21]='"God helps those who Persevere." - BABA'
pausecontent1[22]='"Ask not for rights and privileges, Ask for duties and responsibilities." - BABA'
pausecontent1[23]='"First Be, Then Do, in the End Speak." - BABA'
pausecontent1[24]='"General knowledge is like the bulb. Spiritual knowledge is like the current. Only when Positive and Negative meet, darkness is dispelled." - BABA'
pausecontent1[25]='"Time is precious. The water of a river and youth of a young man can never be restored once they are lost." - BABA'
pausecontent1[26]='"If there is Righteousness in the heart, there will be beauty in the Character. If there is beauty in the character, there will be Harmony in the home. If there is harmony in the home, there will be Order in the Nation." - BABA'
pausecontent1[27]='"Jewels are many but Gold is one, Cows are many but milk is one. Beings are many but breath is one, Castes are many, Humanity is one. Stars are many, the Sky is one. Nations are many, the Earth is one." - BABA'


phraseCnt = pausecontent1.length;

function pausescroller1(content, divId, divClass, delay){

randomNum1 = Math.floor ((Math.random() * phraseCnt))
randomNum2 = Math.floor ((Math.random() * (phraseCnt-1)))

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">'+pausecontent1[randomNum1]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+pausecontent1[randomNum2]+'</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()}, 10000)
}

// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------

pausescroller1.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(pausescroller1.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
// -------------------------------------------------------------------

pausescroller1.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
// -------------------------------------------------------------------

pausescroller1.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}

pausescroller1.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
// -------------------------------------------------------------------

pausescroller1.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()
}
}
pausescroller1.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
}
