//Extra code to find position:
function findPos(){
  if(bw.ns4){   //Netscape 4
    x = document.layers.layerMenu.pageX
    y = document.layers.layerMenu.pageY
  }else{ //other browsers
    x=0; y=0; var el,temp
    el = bw.ie4?document.all["divMenu"]:document.getElementById("divMenu");
    if(el.offsetParent){
      temp = el
      while(temp.offsetParent){ //Looping parent elements to get the offset of them as well
        temp=temp.offsetParent; 
        x+=temp.offsetLeft
        y+=temp.offsetTop;
      }
    }
    x+=el.offsetLeft
    y+=el.offsetTop
  }
  //Returning the x and y as an array
  return [x-706,y-30]
}

pos = findPos()

//Menu object creation
oCMenu=new makeCM("oCMenu") //Making the menu object. Argument: menuname

//Menu properties   
oCMenu.pxBetween=0
//Using the cm_page object to place the menu ----
oCMenu.fromLeft=pos[0]
oCMenu.fromTop=pos[1]
//We also need to "re place" the menu on resize. So:
oCMenu.onresize="pos = findPos(); oCMenu.fromLeft=pos[0]; oCMenu.fromTop=pos[1]"

oCMenu.rows=1
oCMenu.menuPlacement=0
                                                             
oCMenu.offlineRoot="" 
oCMenu.onlineRoot='/' 
oCMenu.resizeCheck=1 
oCMenu.wait=1000 
oCMenu.fillImg=""
oCMenu.zIndex=0

//Background bar properties
oCMenu.useBar=0
oCMenu.barWidth="menu"
oCMenu.barHeight="menu" 

oCMenu.barX="menu"
oCMenu.barY="menu"
oCMenu.barBorderX=0
oCMenu.barBorderY=0
oCMenu.barBorderClass=""

//Level properties - ALL properties have to be spesified in level 0
oCMenu.level[0]=new cm_makeLevel() //Add this for each new level
oCMenu.level[0].width=100
oCMenu.level[0].height=20
oCMenu.level[0].regClass="clLevel0"
oCMenu.level[0].overClass="clLevel0over"
oCMenu.level[0].borderX=0
oCMenu.level[0].borderY=0
oCMenu.level[0].borderClass=""
oCMenu.level[0].offsetX=0
oCMenu.level[0].offsetY=0
oCMenu.level[0].rows=0
oCMenu.level[0].arrow=0
oCMenu.level[0].arrowWidth=0
oCMenu.level[0].arrowHeight=0
oCMenu.level[0].align="bottom"


//EXAMPLE SUB LEVEL[1] PROPERTIES - You have to specify the properties you want different from LEVEL[0] - If you want all items to look the same just remove this
oCMenu.level[1]=new cm_makeLevel() //Add this for each new level (adding one to the number)
oCMenu.level[1].width=100
oCMenu.level[1].height=30
oCMenu.level[1].regClass="clLevel1"
oCMenu.level[1].overClass="clLevel1over"
oCMenu.level[1].borderX=0
oCMenu.level[1].borderY=1
oCMenu.level[1].align="right" 
oCMenu.level[1].offsetX=0
oCMenu.level[1].offsetY=0
oCMenu.level[1].borderClass="clLevel1border"


//EXAMPLE SUB LEVEL[2] PROPERTIES - You have to spesify the properties you want different from LEVEL[1] OR LEVEL[0] - If you want all items to look the same just remove this
oCMenu.level[2]=new cm_makeLevel() //Add this for each new level (adding one to the number)
oCMenu.level[2].width=150
oCMenu.level[2].height=30
oCMenu.level[2].offsetX=0
oCMenu.level[2].offsetY=0
oCMenu.level[2].regClass="clLevel2"
oCMenu.level[2].overClass="clLevel2over"
oCMenu.level[2].borderClass="clLevel2border"


/******************************************
Menu item creation:
myCoolMenu.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout) 
*************************************/


oCMenu.makeMenu('M1','','Chapter No 5','')
oCMenu.makeMenu('M110','M1','&nbsp;&nbsp;Introduction','index.htm')
oCMenu.makeMenu('M120','M1','&nbsp;&nbsp;District Warrant','District_Warrant.htm')
oCMenu.makeMenu('M130','M1','&nbsp;&nbsp;History of Preceptories','history_of_portadown_preceptories.htm')
oCMenu.makeMenu('M140','M1','&nbsp;&nbsp;Mission Statement','mission_statement.htm')
oCMenu.makeMenu('M145','M1','&nbsp;&nbsp;Somme Remembrance','somme_90th_anniversary.htm')
oCMenu.makeMenu('M150','M1','&nbsp;&nbsp;District Bannerette','district_bannerette.htm')
oCMenu.makeMenu('M155','M1','&nbsp;&nbsp;Previous District Bannerette','old_district_bannerette.htm')
oCMenu.makeMenu('M160','M1','&nbsp;&nbsp;Oldest District Bannerette','Oldest_district_bannerette.htm')
oCMenu.makeMenu('M165','M1','&nbsp;&nbsp;Lecture Class','lecture_class_history.htm')

oCMenu.makeMenu('M2','','History','')
oCMenu.makeMenu('M210','M2','&nbsp;&nbsp;At the Cross','at_the_cross.htm')
oCMenu.makeMenu('M220','M2','&nbsp;&nbsp;Ideals of a Sir Knight','ideals_of_a_sir_knight.htm')
oCMenu.makeMenu('M230','M2','&nbsp;&nbsp;Sovereign Grand Masters','Sovereign_Grand_Masters.htm')
oCMenu.makeMenu('M240','M2','&nbsp;&nbsp;History of the Black Institution','History_of_the_Royal_Black_Institution.htm')
oCMenu.makeMenu('M250','M2','&nbsp;&nbsp;Scarva','scarva.htm')
oCMenu.makeMenu('M260','M2','&nbsp;&nbsp;Sir Knight John Allen','sir_knight_john_allen.htm')
oCMenu.makeMenu('M265','M2','&nbsp;&nbsp;Sir Knight William Allen','Sir_W_Allen.htm')
oCMenu.makeMenu('M270','M2','&nbsp;&nbsp;Songs','songs.htm')
oCMenu.makeMenu('M280','M2','&nbsp;&nbsp;Colonel Edward Saunderson','saunderson.htm')
oCMenu.makeMenu('M285','M2','&nbsp;&nbsp;Brownlow House','brownlow_house.htm')
oCMenu.makeMenu('M290','M2','&nbsp;&nbsp;Sir Knt A Adair JP DGM','Late_Sir_Knt_Alexander_Adair_JP_DGM.htm')

oCMenu.makeMenu('M3','','Gallery','')
oCMenu.makeMenu('M310','M3','&nbsp;&nbsp;District Bannerette','district_bannerette.htm')
oCMenu.makeMenu('M320','M3','&nbsp;&nbsp;Scarva 2008','Scarva_2008.htm')
oCMenu.makeMenu('M325','M3','&nbsp;&nbsp;Thumbnail Gallery District Banners','thumb_nail_gallery.htm')
oCMenu.makeMenu('M330','M3','&nbsp;&nbsp;Edenderry 1930s','edenderry_1930s.htm')
oCMenu.makeMenu('M335','M3','&nbsp;&nbsp;Old Black Carleton St photograph','Carleton_Street.htm')
oCMenu.makeMenu('M340','M3','&nbsp;&nbsp;First RBP Warrant','first_warrant.htm')
oCMenu.makeMenu('M345','M3','&nbsp;&nbsp;Presentation 2007','Sir_Knt_James_Hewitt_presentation.htm')
oCMenu.makeMenu('M350','M3','&nbsp;&nbsp;Last Saturday','Last_Saturday_2008.htm')
oCMenu.makeMenu('M355','M3','&nbsp;&nbsp;New Bannerette Unfurling','Unfurl_New_Bannerette_2008.htm')

oCMenu.makeMenu('M4','','Links','')
oCMenu.makeMenu('M410','M4','&nbsp;&nbsp;Home','index.htm')
oCMenu.makeMenu('M415','M4','&nbsp;&nbsp;Black Knights Alphabet','The_Royal_Sir_Knights_Alphabet.htm')
oCMenu.makeMenu('M420','M4','&nbsp;&nbsp;Guest Book','http://pub28.bravenet.com/guestbook/2400523517')
oCMenu.makeMenu('M430','M4','&nbsp;&nbsp;Contact Us','mailto:contact@portadownrbdcno5.co.uk')
oCMenu.makeMenu('M440','M4','&nbsp;&nbsp;Charitable Causes','Charitable_Causes.htm')
oCMenu.makeMenu('M445','M4','&nbsp;&nbsp;Links to other sites','links.htm')

oCMenu.makeMenu('M5','','Parades/Events','')
oCMenu.makeMenu('M510','M5','Forth coming Events/Parades','events_and_parades.htm')

oCMenu.makeMenu('M6','','Molyneaux Mace','')
oCMenu.makeMenu('M610','M6','&nbsp;&nbsp;Molyneaux Mace','molyneaux.htm')
oCMenu.makeMenu('M620','M6','&nbsp;&nbsp;Collarette and Jewel','collarette_and_jewel.htm')
oCMenu.makeMenu('M630','M6','&nbsp;&nbsp;Coat of Arms','molyneaux_coat_of_arms.htm')
oCMenu.makeMenu('M640','M6','&nbsp;&nbsp;The Mace','molyneaux_mace.htm')
oCMenu.makeMenu('M645','M6','&nbsp;&nbsp;More Mace Images','mace_thumbnails_2.htm')
oCMenu.makeMenu('M650','M6','&nbsp;&nbsp;More Mace Images','mace_thumbnails.htm')

oCMenu.makeMenu('M7','','Regalia/Emblems','')
oCMenu.makeMenu('M710','M7','&nbsp;&nbsp;Aprons','aprons.htm')
oCMenu.makeMenu('M720','M7','&nbsp;&nbsp;Medals/Jewels','jewels_and_medals.htm')
oCMenu.makeMenu('M740','M7','&nbsp;&nbsp;Sash/Collarettes','sashes_and_collarettes.htm')
oCMenu.makeMenu('M750','M7','&nbsp;&nbsp;Badges','badges.htm')
oCMenu.makeMenu('M760','M7','&nbsp;&nbsp;Unique Black Banners','old_banners.htm')
oCMenu.makeMenu('M770','M7','Royal Black Emblems','emblems.htm')
oCMenu.makeMenu('M780','M7','Royal Black Tokens/Pennies','tokens_black_pennies.htm')


//Leave this line - it constructs the menu
oCMenu.construct()		