// JavaScript Document


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

var pausecontent=new Array()

pausecontent[0]='"Previously we had minimal insight into our sales pipeline now we have a great CRM system which gives us 100% visibility and which has enabled us achieve significant benefits sales effectiveness"<br/><br /><img src="http://www.2020management.com/siteimages/Image/logo-2.jpg"><br><br><strong>Thomas Rostron</strong><br />Head of Global Sales and Business Development<br />Fortis Investments<br /><br /><br /><br/><br />'



pausecontent[1]='"Thanks to 2020 and salesforce.com our marketing effort is radically improved  we no longer waste significant amounts of time collating data and generating campaigns enabling us to focus on customer driven activity."<br/><br /> <img src="http://www.2020management.com/siteimages/Image/logo-3.jpg"><br /><br /><strong>Steve Reinert</strong><br />Head of Client Relationship Services<br />Nordea Investment Bank<br /><br /><br /><br/><br />'


pausecontent[2]='"You have worked professionally and I want to thank you for your hard work and dedication that has turned a really short deadline into a reality – now we have one great CRM system."<br/><br /><img src="http://www.2020management.com/siteimages/Image/logo-14.jpg"><br /><br /><strong>Jens Karstoft </strong><br />General Manager, Zmags<br /><br /><br /><br/><br />'


pausecontent[3]='“The support on this project from 2020 Management enabled the whole team to fully embrace the system and dramatically drive better business results.”<br/><br /><img src="http://www.2020management.com/siteimages/Image/logo-4-1.jpg"><br /><br /><strong>Elly Wordsworth </strong><br />Operations Directors<br />Prosperity Capital Management<br /><br /><br /><br/><br />'


pausecontent[4]='“Before you came in, we didn’t have a system, clarity, or a business performance overview. You forced us to think through our processes thoroughly. Now we have solid processes and a great system,. Plus it keeps getting better. Thank you!.”<br /><br/><img src="http://www.2020management.com/siteimages/Image/logo-6-1.jpg"><br /><br /><strong>Josef Pfannenstil </strong><br />Managing Director, Okoworld<br /><br /><br /><br/><br />'

pausecontent[5]='“Before you came in, we had no idea where to start. With your fantastic help, we now have a solid process which works well and we have learned a lot through this implementation. We have finally moved into the 21st century thanks to 2020!”<br/><br /><img src="http://www.2020management.com/siteimages/Image/logo-7.jpg"><br /><br /><strong>Jonathan Wood  </strong><br />Systems Development Manager<br />Bank of Cyprus<br /><br /><br /><br/><br />'


pausecontent[6]='“Just a quick email to say “you are a star” - thank you very much for all your hard work. The training went down very well in Hong Kong and Singapore; no small feat given the language challenges. I couldn’t have done it without you.”<br /><br /><img src="http://www.2020management.com/siteimages/Image/logo-8-1.jpg"><br /><br /><strong>Mika-John Southworth </strong><br />Sales Operations<br />Reuters Trade & Risk Management<br /><br /><br /><br/><br />'


pausecontent[7]='“This is research that turns results into reality, by linking them to internal strategy and process and delivering recommendations. A very valuable piece of work for us.”<br/><br /><img src="http://www.2020management.com/siteimages/Image/logo-9-1.jpg"><br /><br /><strong>Linda Murihead </strong><br />Client services Director<br />Zurich International<br /><br /><br /><br/><br />'


pausecontent[8]='“2020’s involvement was critical. They helped us formulate our strategy, and then successfully managed the implementation to completely reinvent our customer service delivery. Frankly we couldn’t have done it without them.”<br/><br /><img src="http://www.2020management.com/siteimages/Image/logo-10-1.jpg"><br /><br /><strong>Steve Pearson</strong><br />Operations Director<br />Sesame<br /><br /><br /><br/><br />'



pausecontent[9]='“The balanced scorecard programme has given the whole team clarity on our business goals, and enabled everyone to understand the importance of their own personal contribution. 2020 have also made the it motivating and fun!”<br /><br /><img src="http://www.2020management.com/siteimages/Image/logo-11-1.jpg"><br /><strong>Lee Dwerryhouse </strong><br />Head of Retail<br />Liverpool Football Club<br /><br /><br /><br/><br />'


pausecontent[10]='“The research and implementation programme has produced outstanding business results in terms of increased new business, customer advocacy and job satisfaction for the team. I’d recommend 2020 to anyone.” <br /><br /><img src="http://www.2020management.com/siteimages/Image/logo-12-1.jpg"><br /><br /><strong>Jack Meikle</strong><br />Sales Operations Director<br />Standard Life<br /><br /><br /><br/><br />'


pausecontent[11]='“2020 have enabled us to provide clarity in our goals, and drive consistency in the performance of the whole contact centre. Managers are now able to really develop team members to deliver service to our customers in the optimal way.”<br/><br /><img src="http://www.2020management.com/siteimages/Image/logo-13-1.jpg"><br /><br /><strong>Graham Partlow</strong><br />Head of Contact Centre<br />PC Service Call<br /><br /><br /><br/><br />'




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