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


var pausecontent=new Array()

pausecontent[0]='<div align=left style="text-decoration:none; color:#808080"> <b>Friday, July 30, 2010 </b><br><br/></div><div align=center style="text-decoration:none; color:blue"><a href="pr102.htm" style="text-decoration:none"><b>NCRPO Operatives Busts Notorious Carnapping Group </strong></b></a></div><br/> <div align=justify>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The National Capital Region Police Office (NCRPO) and the Quezon City Police District (QCPD) have neutralized a carnapping syndicate being led by a certain <b>Ivan PADILLA @ “Jimmy” and @ “Christopher/Kuku”</b>. The anti-carnapping operation resulted to the arrest of  Dale ALIMAGNO Y Flauta, 22 years old, single, 2nd year College student of Olivarez College, and a resident of No. 18 Everlasting St., Bergen Subd., Pulang Lupa II, Las Pinas City; and Glenn DEL CASTILLO Y Flores, 31 years old, single, jobless, and a resident of No. 65 J. Laya St., BF Homes, Paranaque City,and the recovery of a Toyota Camry, with Plate No. ZLN-415, color Gold and a black VOLVO, with Plate No. ZAX-887.<a href="pr102.htm" style="text-decoration:none">read more>> </a></div>'

pausecontent[1]='<div align=left style="text-decoration:none; color:#808080"> <b>Thursday, July 22, 2010 </b><br><br/></div><div align=center style="text-decoration:none; color:blue"><a href="pr100.htm" style="text-decoration:none"><b>NCRPO Finalizes Security Preparations for SONA</b></a></div><br/> <div align=justify>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The National Capital Region Police Office (NCRPO) held today, July 22, 2010, at Camp Bagong Diwa, Bicutan, Taguig City another coordinating conference with all security forces that would be deployed on July 26, 2010, in time for the State-of-the-Nation Address (SONA) and Opening of the Regular Session of the 15th Congress. The security preparations being undertaken by NCRPO are in line with the Special Task Force (STF) “KAPAYAPAAN” activated by the National Headquarters, Philippine National Police. NCRPO will deploy around 8,000 personnel for the metro-wide security operation, with 5,000 to compose Task Group “Quezon” or the security forces primarily deployed in Quezon City.</b><a href="pr100.htm" style="text-decoration:none">read more>> </a></div>'

pausecontent[2]='<div align=left style="text-decoration:none; color:#808080"> <b>Sunday, July 18, 2010 </b><br><br/></div><div align=center style="text-decoration:none; color:blue"><a href="pr98.htm" style="text-decoration:none"><b>NPD police tops crowd control tournament</b></a></div><br/> <div align=justify>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The Northern Police District (NPD) is this year’s champion of the NCRPO Crowd Dispersal Management (CDM) competition held at the Rizal Park Elevated Ground in Manila. The NPD bested the other four Police Districts and the Regional Public Safety Battalion (RPSB)in the show of skills and scenario solving ability in crowd control security operations. In his message to the CDM competition participants and members of the National Capital Region Police Office (NCRPO), Police Director ROBERTO L. ROSALES emphasized that aside from honing the skills and knowledge in CDM operations the tournament is meant to highlight the rules and procedures of the police in respecting human rights.</b><a href="pr98.htm" style="text-decoration:none">read more>> </a></div>'

var pausecontent2=new Array()


pausecontent2[0]='<div align=left style="text-decoration:none; color:#808080"> <b>Monday, July 26, 2010 </b><br><br/></div><div align=center style="text-decoration:none; color:blue"><a href="pr101.htm" style="text-decoration:none"><b>Well-Planned Security, Cooperative Rallysts – Metro Manila Saw Peaceful and Orderly SONA 2010</strong></b></a></div><br/> <div align=justify>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;No barbed wires, no container vans. This was the result of the assent of rally leaders and organizers to the appeal of Super Task Force “Kapayapaan” Commander and NCRPO Chief, Police Director ROBERTO L ROSALES, not to pursue their plan to proceed and to hold their rally at the gate of Batasan Pambansa. It was a sight that seems to welcome the first State-of-the-Nation Address (SONA) of President Benigno Simeon C. Aquino III. <b>“This is a pleasant development for both the police and to those who went to the area to hold their rally. It proves to all of us that there is nothing that reason and concern for the greater good cannot accomplish.”, </b>PDIR ROSALES said in one of his interviews.</b><a href="pr101.htm" style="text-decoration:none">read more>> </a></div>'

pausecontent2[1]='<div align=left style="text-decoration:none; color:#808080"> <b>Monday, July 19, 2010 </b><br><br/></div><div align=center style="text-decoration:none; color:blue"><a href="pr99.htm" style="text-decoration:none"><b>Press Statement<br> PDIR ROBERTO L ROSALES<br>Regional Director, NCRPO</strong></b></a></div><br/> <div align=justify>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is response to news reports regarding the investigation of the new management of the Philippine Amusement and Gaming Corporation (PAGCOR) as to the supposed millions worth of food purchases for burgers and chicken given to the Philippine National Police (PNP). The National Capital Region Police Office (NCRPO), in its June 28, 2010 certification attests that it has received and consumed the food provision given by PAGCOR. However, NCRPO clarifies that it is aware of the request for food it made but has not been privy as to the amount paid for the food ordered by PAGCOR.</b><a href="pr99.htm" style="text-decoration:none">read more>> </a></div>'

pausecontent2[2]='<div align=left style="text-decoration:none; color:#808080"> <b>Friday, July 09, 2010 </b><br><br/></div><div align=center style="text-decoration:none; color:blue"><a href="pr97.htm" style="text-decoration:none"><b>5 Chinese Nationals Arrested and 20 Kilos of Shabu Confiscated</strong></b></a></div><br/> <div align=justify>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The NCRPO Anti-Illegal Drugs Special Operations Task Force (RAIDSOTF) headed by PSUPT LEO FRANCISCO conducted an Operation on July 8, 2010, 10:00PM, at Unit 63, Eurovilla Homes, 2100 New Panaderos St., Sta. Ana, Manila at which resulted to the Arrest of five (5) suspects, namely:<b><br>Ming YUAN YUET, 40 y/o, married<br> Danny TAN y LIM, 30 y/o, married<br> Aga CO y Sandoval, 33 y/o, single<br> Eugene GO y SY, 32 y/o, married<br> and Michelle LEE @ Sally, 24 y/o, single<br></b><a href="pr97.htm" style="text-decoration:none">read more>> </a></div>'

//pausecontent2[0]='<a href="http://www.news.com">News.com: Technology and business reports</a>'
//pausecontent2[1]='<a href="http://www.cnn.com">CNN: Headline and breaking news 24/7</a>'
//pausecontent2[2]='<a href="http://news.bbc.co.uk">BBC News: UK and international news</a>'


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

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