// JavaScript Document
var defaultMenuWidth="180px" //set default menu width.

var linkset=new Array()

linkset[0]='<b>Berita Utama</b>' //Optional Separator
linkset[0]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=1&id=1&Itemid=50">Muka Depan</a>'
linkset[0]+='<b>Nasional & Semasa</b>' //Optional Separator
linkset[0]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=1&id=15&Itemid=53">Parlimen Hari Ini</a>'
linkset[0]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=1&id=14&Itemid=52">Luar Negara</a>'
linkset[0]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=1&id=16&Itemid=54">Ekonomi</a>'
linkset[0]+='<hr>' //Optional Separator
linkset[0]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=1&id=48&Itemid=90">Liputan Khas</a>'

linkset[1]='<b>Utara</b>' //Optional Separator
linkset[1]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=8&id=50&Itemid=95">Kedah Darul Aman</a>'
linkset[1]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=8&id=57&Itemid=102">Perlis</a>'
linkset[1]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=8&id=55&Itemid=100">Pulau Pinang</a>'
linkset[1]+='<b>Timur</b>' //Optional Separator
linkset[1]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=8&id=51&Itemid=96">Kelantan Darul Naim</a>'
linkset[1]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=8&id=54&Itemid=99">Pahang Darul Makmur</a>'
linkset[1]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=8&id=59&Itemid=104">Terengganu Darul Iman</a>'
linkset[1]+='<b>Selatan</b>' //Optional Separator
linkset[1]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=8&id=49&Itemid=94">Johor Darul Takzim</a>'
linkset[1]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=8&id=52&Itemid=97">Melaka</a>'
linkset[1]+='<b>Barat</b>' //Optional Separator
linkset[1]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=8&id=53&Itemid=98">Negeri Sembilan</a>'
linkset[1]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=8&id=56&Itemid=101">Perak Darul Ridzuan</a>'
linkset[1]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=8&id=58&Itemid=103">Selangor Darul Ehsan</a>'
linkset[1]+='<hr>' //Optional Separator
linkset[1]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=8&id=60&Itemid=105">Sabah</a>'
linkset[1]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=8&id=61&Itemid=106">Sarawak</a>'
linkset[1]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=8&id=62&Itemid=107">Wilayah Persekutuan</a>'

linkset[2]='<b>HarakahDaily</b>' //Optional Separator
linkset[2]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=7&id=27&Itemid=56">Surat Pembaca</a>'
linkset[2]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=7&id=43&Itemid=86">Editorial</a>'
linkset[2]+='<a href="http://www.englishsection.com" target="_blank">English Section</a>'
linkset[2]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=7&id=36&Itemid=62">Pilihan Raya</a>'
linkset[2]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=7&id=40&Itemid=113">Ihya Ramadhan</a>'
linkset[2]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=7&id=39&Itemid=71">Salam Perantau</a>'
linkset[2]+='<b>Edisi Cetak</b>' //Optional Separator
linkset[2]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=7&id=34&Itemid=59">Terbaik Dari Harakah</a>'
linkset[2]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=7&id=30&Itemid=55">Kelantan</a>'

linkset[3]='<b>Rencana</b>' //Optional Separator
linkset[3]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=6&id=26&Itemid=82">Pendapat</a>'
linkset[3]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=1&id=46&Itemid=91">Agama</a>'
linkset[3]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=1&id=47&Itemid=92">Wanita</a>'
linkset[3]+='<b>Kenyataan</b>' //Optional Separator
linkset[3]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=6&id=25&Itemid=83">Rasmi</a>'

linkset[4]='<b>Dari Meja Harakah</b>' //Optional Separator
linkset[4]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=4&id=18&Itemid=76">Minda Editor</a>'
linkset[4]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=4&id=19&Itemid=77">Catatan Wartawan</a>'
linkset[4]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=4&id=20&Itemid=81">Khabar dari Bangi</a>'
linkset[4]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=4&id=21&Itemid=78">Gosip Semasa</a>'
linkset[4]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=4&id=23&Itemid=75">Dari Meja Ketua Pengarang</a>'
linkset[4]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=4&id=65&Itemid=110">50 Tahun Kemerdekaan</a>'
linkset[4]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=4&id=67&Itemid=114">Di Luar Tempurung</a>'
linkset[4]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=4&id=66&Itemid=111">Politik Kampus<br><span class="small_sub">Pilihan Raya Kampus 2007</span></a>'

linkset[5]='<b>Blog & Kolumnis</b>' //Optional Separator
linkset[5]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=4&id=22&Itemid=79">Hauzah Seni / Politik</a>'
linkset[5]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=4&id=44&Itemid=88">Yalta</a>'
linkset[5]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=4&id=45&Itemid=89">Subky Menulis</a>'
linkset[5]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=4&id=63&Itemid=108">Menongkah Arus</a>'
linkset[5]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=4&id=64&Itemid=109">Siku</a>'
linkset[5]+='<a href="http://www.harakahdaily.net/index.php?option=com_content&task=category&sectionid=4&id=35&Itemid=80">Tarbiyah Dari Penjara</a>'


var ie5=document.all && !window.opera
var ns6=document.getElementById

if (ie5||ns6)
document.write('<div id="popitmenu" onMouseover="clearhidemenu();" onMouseout="dynamichide(event)"></div>')

function iecompattest(){
return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}

function showmenu(e, which, optWidth){
if (!document.all&&!document.getElementById)
return
clearhidemenu()
menuobj=ie5? document.all.popitmenu : document.getElementById("popitmenu")
menuobj.innerHTML=which
menuobj.style.width=(typeof optWidth!="undefined")? optWidth : defaultMenuWidth
menuobj.contentwidth=menuobj.offsetWidth
menuobj.contentheight=menuobj.offsetHeight
eventX=ie5? event.clientX : e.clientX
eventY=ie5? event.clientY : e.clientY
//Find out how close the mouse is to the corner of the window
var rightedge=ie5? iecompattest().clientWidth-eventX : window.innerWidth-eventX
var bottomedge=ie5? iecompattest().clientHeight-eventY : window.innerHeight-eventY
//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<menuobj.contentwidth)
//move the horizontal position of the menu to the left by it's width
menuobj.style.left=ie5? iecompattest().scrollLeft+eventX-menuobj.contentwidth+"px" : window.pageXOffset+eventX-menuobj.contentwidth+"px"
else
//position the horizontal position of the menu where the mouse was clicked
menuobj.style.left=ie5? iecompattest().scrollLeft+eventX+"px" : window.pageXOffset+eventX+"px"
//same concept with the vertical position
if (bottomedge<menuobj.contentheight)
menuobj.style.top=ie5? iecompattest().scrollTop+eventY-menuobj.contentheight+"px" : window.pageYOffset+eventY-menuobj.contentheight+"px"
else
menuobj.style.top=ie5? iecompattest().scrollTop+event.clientY+"px" : window.pageYOffset+eventY+"px"
menuobj.style.visibility="visible"
return false
}

function contains_ns6(a, b) {
//Determines if 1 element in contained in another
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function hidemenu(){
if (window.menuobj)
menuobj.style.visibility="hidden"
}

function dynamichide(e){
if (ie5&&!menuobj.contains(e.toElement))
hidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
hidemenu()
}

function delayhidemenu(){
delayhide=setTimeout("hidemenu()",500)
}

function clearhidemenu(){
if (window.delayhide)
clearTimeout(delayhide)
}

if (ie5||ns6)
document.onclick=hidemenu