// JavaScript Document


/*Example message arrays for the two demo scrollers*/

var pausecontent=new Array()

pausecontent[0]='<em>As a small but rapidly expanding business we required a new corporate identity and OnlineOlogy were there to provide us with a cost-effective "One Stop Shop."  They not only provided us with a fresh and professional website that was aligned with our National and European market, they also provided us with an updated brand which included new logo design, letterhead design and business card design.  They took timeout to learn about our business and our detailed requirements, so were able to provide insightful suggestions along the way.  I would not hesitate in recommending them to others...... <br/><a href="Testimonials.htm">Read more</a><br /> <br /></em><strong>Marcus Rutter</strong><br />MFC Barcoding Ltd.<br /><br />----------------------------------------------<br /><br /><br/><br />'

pausecontent[1]='<em>Congratulations to Caroline, Alyson and web design team at Onlineology for a pleasant experience and a great end result.<br/><br/>For some time I had been meaning to update my simple one page DIY website, but never found a web designer I had confidence in or could afford! A phone call from Caroline changed that! She made me feel at ease and unpressured to make a decision to go ahead and, gave me great confidence in Onlineology’s ability to do the right job at a price I could afford. Once the process was set in motion, the ideas came rolling in on a daily basis........ <br/><a href="Testimonials.htm#penrose">Read more</a><br /> <br /></em><strong>Marc White</strong><br />Penrose Guest House<br /><br />----------------------------------------------<br /><br /><br/><br />'

pausecontent[2]='<em>An extremely customer-focused company that provides a high level of service. Listened hard to what we needed and came up with design concepts that met the brief. During the development process were patient and responsive to endless questions and requests from us and focused on finding solutions that worked. The resulting website we think speaks for itself....... <br/><a href="Testimonials.htm#insight">Read more</a><br /> <br /></em><strong>Judith Steinert</strong><br />The Insight Connection<br /><br />----------------------------------------------<br /><br /><br/><br />'

pausecontent[3]='<em>I first contacted OnlineOlogy when I was looking for someone to update our website.  We were looking to appeal to both the commercial and domestic markets and found OnlineOlogy’s initial proposals appealing.  OnlineOlogy were friendly, courteous, professional and helpful during the preparation stage.  As part of the project it was quite apparent that we needed to prepare a rebrand and OnlineOlogy completed the rebranding of our image swiftly and effectively. OnlineOlogy also prepared a complete pack of branded stationary items including letter headed paper, compliment slips and business cards ....... <br/><a href="Testimonials.htm#bryer">Read more</a><br /> <br /></em><strong>Lewis Bryer</strong><br />Bryer Consulting Ltd<br /><br />----------------------------------------------<br /><br /><br/><br />'


pausecontent[4]='<em>I wanted to increase the functionality, provide a &lsquo;members only&rsquo; access section and completely rewrite and uplift the whole professional image of my out dated website. I was in a dilemma of who to go to for the best, there are so many companies out there in the market place, but I am so delighted and pleased that I went to OnlineOlogy.  What a pain free, positive experience and nothing was too much trouble for the Tech Team or Caroline Francis, their Client Support Manager. I demanded quite an unusual specification that needed to suit my purposes given the diversity of the sport and leisure industry...... <br/><a href="Testimonials2.htm#ltas">Read more</a><br /> <br /></em><strong>Pete Whittall</strong><br />Director, LTAS Ltd<br /><br />----------------------------------------------<br /><br /><br/><br />'

pausecontent[5]='<em>OnlineOlogy&rsquo;s free Site Challenge report provided a valuable insight into why visitors who happened upon our old website were promptly leaving. We were impressed by OnlineOlogy&rsquo;s understanding of the web design requirements of consultants like ourselves and by their organised approach, very fair pricing and personal attention to detail.<br /><br /> The resulting design is exactly what we wanted and we have received prompt and courteous attention at all times. OnlineOlogy have exceeded our expectations and I would not hesitate to recommend them..... <a href="Testimonials2.htm#Ingrid">Read more</a><br /> <br /></em><strong>Ingrid Siebert</strong><br />Principal Consultant<br />Ingrid Siebert Associates<br /><br />----------------------------------------------<br /><br /><br/><br />'


/*pausecontent[3]='<em>Having looked at  several options, the decision to go with OnlineOlogy for our new website  was made easy because of their professionalism, attention to detail, regard for  a fixed budget and the feeling of total involvement throughout the whole  project. <br /><br />We finished up with a  modern, clean cut site that is entirely as we envisaged at the start of the  project. We would not hesitate to  recommend them to any of our colleagues, associates or clients.......... <a href="Testimonials.htm#RJ">Read more</a><br /> <br /></em><strong>Richard Bull</strong><br />ACIQA,AIIRSM,Tech IOSH<br />Director<br />RJ Consultancy (Southwell) Ltd<br /><br /><br />----------------------------------------------<br /><br /><br/><br />'


pausecontent[4]='<em>Once a decision had been made to revamp our website it was a question of whom do we choose to develop it for us? We had great feedback from OnlineOlogy who came up with many valuable suggestions and ideas as to why our existing site was underperforming and was not standing out from the competition.  Their ideas, design and overview was a valuable insight. Their attention to detail, willingness to understand our business goals and efficiency really is second to none and it has been an absolutely “pain free” project to undertake... <a href="Testimonials.htm#TS">Read more</a></em><br /><br /><br /><strong>Lindsey Nunn</strong><br />General Manager<br/>Total Solution Computing Ltd<br /><br /><br />----------------------------------------------<br /><br /><br/><br />'

pausecontent[5]='<em>We decided to launch a new product range at a national exhibition which left us only four weeks to have our web site modified to include the new line. Our normal web company could not meet the short timescale, but by chance we had received a mailshot from a new local company Onlineology.&nbsp; We decided to give them a try and contacted Mark at Onlineology, who visited us promptly to discuss our requirements. <br /> <br />After meeting with us Mark said that timings were tight, because of existing commitments, but guaranteed that they would meet our target date......... <a href="Testimonials.htm#OC">Read more</a><br /> <br /></em><strong>Spencer Rogers</strong><br/>Orange County Ltd<br /><br /><br />----------------------------------------------<br /><br /><br/><br />'


pausecontent[6]='<em>After starting my own business, OnlineOlogy  helped me to create my website from scratch. The design and development process  was simple and straight forward and they kept me fully informed at every stage.  They made changes and enhancements very quickly and they showed they understood  my business goals by expanding my own ideas rather than simply implementing  them<br/><br />More importantly, the design allows me to expand the site in the future simply  and easily while meeting my needs now. During the whole process, I was able to  concentrate on my business...... <a href="Testimonials.htm#OP">Read more</a></em><br /><strong><br />Andrew Clayson</strong><br />Oxygenic Partnership Limited<br /><br /><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
}


