/*Example message arrays for the two demo scrollers*/
var pausecontent=new Array()
//pausecontent[1]='
MAJLIS PERPISAHAN AHLI JAWATANKUASA KERJA TERTINGGI PUSPANITA KEBANGSAAN PADA 10 NOVEMBER 2010 JAM 3.00 PETANG BERTEMPAT DI RESTORAN SERI MELAYU JALAN COLAY, KUALA LUMPUR.
'
//pausecontent[0]='PUSPANITA KEBANGSAAN MENGUCAPKAN SELAMAT MENYAMBUT HARI RAYA AIDIL ADHA SEMUA AHLI PUSPANITA YANG BERAGAMA ISLAM.
'
//pausecontent[0]='MAJLIS JAMUAN HARI RAYA AIDILFITRI TAHUN 2010 PADA 4 OKTOBER 2010 PADA JAM 1.30 PETANG - 5.30 PETANG BERTEMPAT DI PUSPANITAPURI, PUTRAJAYA.
'
pausecontent[2]='SELAMAT DATANG KE LAMAN WEB PUSPANITA KEBANGSAAN.
'
pausecontent[0]='Teks Ucapan Ketua Setiausaha Negara merangkap Penasihat PUSPANITA, YBhg. Tan Sri Mohd Sidek Hassan sempena Mesyuarat Agung Perwakilan(MAP) PUSPANITA Kebangsaan ke 29 pada 5 Mei 2011.
Klik disini.
'
pausecontent[1]='Teks Ucapan Yang DiPertua PUSPANITA, YBhg. Puan Sri Dato Wan Noorlina Wan Hussin sempena Mesyuarat Agung Perwakilan(MAP) PUSPANITA Kebangsaan ke 29 pada 5 Mei 2011.
Klik disini. '
//pausecontent[4]='MAJLIS LADIES NIGHT PUSPANITA KEBANGSAAN 2010 BERTEMAKAN BUSANA WARISAN MELAYU AKAN DIADAKAN PADA MALAM 5 MEI 2010 JAM 1945 - 2330 BERTEMPAT DI PUSPANITAPURI, PUTRAJAYA.
'
//pausecontent[0]='LAWATAN YDP PUSPANITA KEBANGSAAN KE KEMENTERIAN PERDAGANGAN DALAM NEGERI, KOPERASI DAN KEPENGGUNAAN (KPDNKK) PADA 18 JUN 2010.
'
//pausecontent[1]='LAWATAN YDP PUSPANITA KEBANGSAAN KE KEMENTERIAN KEWANGAN PADA 22 JUN 2010.
'
//pausecontent[0]='HARI JUALAN PUSPANITA 2010 SEMPENA MESYUARAT AGUNG PERWAKILAN (MAP) PUSPANITA KEBANGSAAN KALI KE 28 AKAN DIADAKAN PADA 5 DAN 6 MEI 2010 BERTEMPAT DI PUSPANITAPURI, PUTRAJAYA.
'
//pausecontent[3]=''
//pausecontent[2]='MAJLIS HIGH TEA SEMPENA MERAIKAN BEKAS PENAUNG PUSPANITA KEBANGSAAN, TUN JEANNE ABDULLAH DI PALACE OF GOLDEN HOTEL, SERI KEMBANGAN PADA 17 JUN 2009.
'
//pausecontent[1]='MAJLIS SAMBUTAN RAMADHAN IAITU SEMBAHYANG SUNAT TASBIH DAN DOA SELAMAT AKAN DIADAKAN PADA JAM 10.30 PAGI 21 OGOS 2009 DI PUSPANITAPURI, PUTRAJAYA.
'
//pausecontent[2]='
MESYUARAT MAJLIS TERTINGGI (MT) BIL. 2/2009 AKAN DIADAKAN PADA 9 OKTOBER 2009 BERMULA PADA PUKUL 9:30 PAGI DI DE SERI ENDON, PUSPANITAPURI, PUTRAJAYA.
'
//pausecontent[1]='
SEMINAR USAHAWAN INTERNET@SOHO AKAN DIADAKAN PADA 27 OKTOBER 2009 BERTEMPAT DI DE SERI ENDON, PUSPANITAPURI, PUTRAJAYA.
'
//pausecontent[1]='
PUSPANITA KEBANGSAAN MENGUCAPKAN SELAMAT HARI DEEPAVALI KEPADA AHLI PUSPANITA YANG BERAGAMA HINDU.
'
//pausecontent[1]='
MAJLIS SAMBUTAN HARI RAYA AIDILFITRI PUSPANITA KEBANGSAAN AKAN DIADAKAN PADA JAM 2.30 PETANG 8 OKTOBER 2009 BERTEMPAT DI DE SERI ENDON, PUSPANITAPURI, PUTRAJAYA.
'
//pausecontent[4]=''
/***********************************************
* 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(''+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
}
//tukar font size
/*------------------------------------------------------------
Document Text Sizer- Copyright 2003 - Taewook Kang. All rights reserved.
Coded by: Taewook Kang (txkang.REMOVETHIS@hotmail.com)
Web Site: http://txkang.com
Script featured on Dynamic Drive (http://www.dynamicdrive.com)
Please retain this copyright notice in the script.
License is granted to user to reuse this code on
their own website if, and only if,
this entire copyright notice is included.
--------------------------------------------------------------*/
//Specify affected tags. Add or remove from list:
var tgs = new Array( 'div','td','tr','font');
//Specify spectrum of different font sizes:
var szs = new Array( 'xx-small','x-small','small','medium','large','x-large','xx-large' );
var startSz = 2;
function ts( trgt,inc ) {
if (!document.getElementById) return
var d = document,cEl = null,sz = startSz,i,j,cTags;
sz += inc;
if ( sz < 0 ) sz = 0;
if ( sz > 6 ) sz = 6;
startSz = sz;
if ( !( cEl = d.getElementById( trgt ) ) ) cEl = d.getElementsByTagName( trgt )[ 0 ];
cEl.style.fontSize = szs[ sz ];
for ( i = 0 ; i < tgs.length ; i++ ) {
cTags = cEl.getElementsByTagName( tgs[ i ] );
for ( j = 0 ; j < cTags.length ; j++ ) cTags[ j ].style.fontSize = szs[ sz ];
}
}
//------------------------------popup ash
function openpopupx(popurl)
{
var winpops=window.open(popurl,"","width=650,height=600,toolbar=false,location=false,status=false,scrollbars,menubar=false,resizable=false")
}
//------------------- mesej info