var pausecontent=new Array();
pausecontent[0]=unescape('Absolute%0D%0A3D%20Visions%20%20has%20introduced%20the%20first%203D%20digital%20screens%20in%20OOH%20advertising.%20These%203D%20screens%20do%20not%20require%20the%20special%20viewing%20aid%2C%20the%20blue-red%20spectacles%2C%20normally%20required%20to%20view%203D%20moving%20pictures.%3Cbr%3E%3Cdiv%20align%3D%22right%22%3E%3Ca%20href%3D%22http%3A%2F%2Fwww.afaqs.com%2Fperl%2Fooh%2Fnews%2Findex.html%3Fsid%3D21672%22%20target%3D%22_blank%22%3Eafaqs.com%3C%2Fa%3E%3C%2Fdiv%3E');
pausecontent[1]=unescape('Experience%20a%20new%20dimension%20with%20Absolute%203D%20Visions%20%28%20Spectacle%20without%20Spectacles%29%20-%20India%27s%20first%20ever%20glasses%20free%203D%20displays.%3Cbr%3E%3Cdiv%20align%3D%22right%22%3E%3Ca%20href%3D%22http%3A%2F%2Fwww.24-7pressrelease.com%2Fpress-release%2Fexperience-a-new-dimension-with-absolute-3d-visions-spectacle-without-spectacles-indias-first-ever-glasses-free-3d-displays-55425.php%22%20target%3D%22_blank%22%3E24-7pressrelease.com%3C%2Fa%3E%3C%2Fdiv%3E');
pausecontent[2]=unescape('Absolute%203D%20Visions%20has%20developed%20an%20airport%20digital-signage%20network%20using%20glasses-free%203D%20screens%2C%20and%20is%20looking%20to%20deploy%20its%20technology%20in%20other%20locations%20such%20as%20cinemas.%3Cbr%3E%3Cdiv%20align%3D%22right%22%3E%3Ca%20href%3D%22http%3A%2F%2Fwww.screens.tv%2Farticle%2F11248%2FIndian_firm_claims_3D_first.html%22%20target%3D%22_blank%22%3EScreens.tv%3C%2Fa%3E%3C%2Fdiv%3E');
pausecontent[3]=unescape('Absolute%203D%20Visions%20is%20aiming%20to%20free%20the%20medium%20from%20the%20confines%20of%20special%20glasses%20with%20the%20country%27s%20first%20ever%203D%20screens%20that%20do%20not%20require%20special%20glasses%20to%20view%20the%203D%20effect.%3Cbr%3E%3Cdiv%20align%3D%22right%22%3E%3Ca%20href%3D%22http%3A%2F%2Fwww.exchange4media.com%2FOutOfHome%2Fnews_band.asp%3Fsection_id%3D26%26news_id%3D31473%26tag%3D26385%22%20target%3D%22_blank%22%3EExchange4media.com%3C%2Fa%3E%3C%2Fdiv%3E');
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('
'+content[0]+'
'+content[1]+'
')
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
}