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)
}

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+3)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-3+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-3+"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
}

/*Mensajes para el scroller */

pausecontent[0]='<a href=Note_SAP_2007_TopPerformer.html target=_main>Zantek is recognized as<br>SAP Top Performer<br>Business Partner of 2007<br><img src="Images/2007_SAP_Partner_TOP_Performer_sm.jpg" alt="2007 SAP Top Performer Price" width=42 height=52 border=0></A><br>(January,2008) <br><br>'
pausecontent[1]='<a href=careers_ERP_Consultant.html target=_main>NOW HIRING: ERP Implementation Consultant.<br><img src="Images/home_IMAGE_Left_Careers.jpg" alt="ERP Implementation Consultant" width=52 height=52 border=0></a><br>(Feb 23,2008)'  
pausecontent[2]='<a href=Partners_SAP_Management%20Software.html target=_main>• Business Management Software Designed to Meet the Changing Needs of Small Business.</a><br>(May 8,2007)'
pausecontent[3]='<a href=Partners_SAP.html target=_main>"The staff at Zantek have always proved themselves to be professional ..."<br>Stephen Gannon<br>Regional Technology Specialist - RBCDS</a><br>(May 8,2007)'
pausecontent[4]='<a href=contact_us_Calgary.html target=_main>Welcome Terry Tout as Manager of Zantek s Calgary branch. Terry is in charge of our Alberta and BC operations...</a><br>(April,2007)'
pausecontent[5]='<a href=Partners_SAP_Why.html target=_main>Why we chose SAP <br>(and you should too)<img src="Images/home_IMAGE_Small_SAP2.jpg" alt="SAP Business One" width=41 height=50 border=0></A> <br>(Fall,2006) '
pausecontent[6]='<a href=http://www.zantek-it.com/Downloads/Axe%20Houghton%20-%20Success%20Story%20(A4)[1].pdf target=_blank>How Zantek and SAP have partnered with local business to improve their bottom line</A> <br>(Winter,2006) '
pausecontent[7]='<a href=Partners_SAP_POS.html target=_main>  Zantek has the most<br>reliable Retail Point of Sales system</A> <br>(April,2007) '
pausecontent[8]='<a href=Partners_SAP_NewPartnership.html target=_main>Ron Mondor, President of Zantek Information Technology, is pleased to announce our recent partnership with SAP Canada</a> <br>(Fall,2006) '
pausecontent[9]='<a href=Partners_SAP_Management%20Software.html target=_main>Business Management Software Designed to Meet the Changing Needs of Small Business.</a><br>(May 8,2007)'
/*
pausecontent[6]='<a href=Smile.html target=_blank>I hate computers and computers hates me</a><br />(Ongoing)'
pausecontent[7]='<a href=SmileII.html target=_blank>Wendi got Windi</a><br />(February 24,2007)'
*/
