/*** 
This is the menu creation code, shamelessly converted from table_placement2 demo
roy's comments are marked with -r-.
**/

//Menu object creation
oCMenu=new makeCM("oCMenu") //Making the menu object. Argument: menuname

//Menu properties   
oCMenu.pxBetween=1
//Using the cm_page object to place the menu ----
  //There are some differences between the browsers that I try to fix here.
//oCMenu.fromLeft=!bw.ns4?cmpage.x2 - 160:cmpage.x2 - 176
//We also need to "replace" the menu on resize. So:
//oCMenu.onresize="oCMenu.fromLeft=cmpage.x2 - 160" /*-r- funny jumping menu*/

oCMenu.fromTop=74   
oCMenu.fromLeft=2   
oCMenu.rows=0
oCMenu.menuPlacement="left"
                                                             
oCMenu.offlineRoot="file:~/sites/huca/includes/" /*-r- Has to be changed when
script moves */
oCMenu.onlineRoot="" 
oCMenu.resizeCheck=1 
oCMenu.wait=500 
oCMenu.fillImg="cm_fill.gif"
oCMenu.zIndex=0

//Background bar properties
oCMenu.useBar=0
oCMenu.barWidth="menu"
oCMenu.barHeight="menu" 
oCMenu.barClass="clBar"
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=90
oCMenu.level[0].height=34 
oCMenu.level[0].regClass="clLevel0"
oCMenu.level[0].overClass="clLevel0over"
oCMenu.level[0].borderX=0
oCMenu.level[0].borderY=0
oCMenu.level[0].borderClass="clLevel0border"
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="right" //-r-this sets where the next level will be placed


//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=159
oCMenu.level[1].height=22
oCMenu.level[1].regClass="clLevel1"
oCMenu.level[1].overClass="clLevel1over"
oCMenu.level[1].borderX=1
oCMenu.level[1].borderY=1
oCMenu.level[1].align="right" 
oCMenu.level[1].offsetX=-(oCMenu.level[0].width-2)/2+20
oCMenu.level[1].offsetY=0
oCMenu.level[1].borderClass="clLevel1border"

//SUB LEVEL[2] 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[2]=new cm_makeLevel() //Add this for each new level (adding one to the number)
oCMenu.level[2].width=oCMenu.level[1].width
oCMenu.level[2].height=oCMenu.level[1].height
oCMenu.level[2].regClass="clLevel2"
oCMenu.level[2].overClass="clLevel2over"
oCMenu.level[2].borderX=1
oCMenu.level[2].borderY=1
oCMenu.level[2].align="left" 
oCMenu.level[2].offsetX=-(oCMenu.level[0].width-2)/2+20 //-r- slightly overlap
oCMenu.level[2].offsetY=0

/******************************************
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('top0','','&nbsp;About Us','/aboutus/general.shtml','')
  oCMenu.makeMenu('sub00','top0','General','/aboutus/general.shtml')
  oCMenu.makeMenu('sub01','top0','Staff','/aboutus/staff.shtml')

oCMenu.makeMenu('top1','','&nbsp;News','/news/news.shtml')
   oCMenu.makeMenu('sub10','top1','Latest','/news/news.shtml')
   oCMenu.makeMenu('sub11','top1','Archive','/news/narchive.shtml')

oCMenu.makeMenu('top2','','&nbsp;Services','')
   oCMenu.makeMenu('sub210','top2','Internet','/services/internet/internet.shtml')
   oCMenu.makeMenu('sub212','top2','&nbsp;&#183; Connect from home ','/services/internet/connect/home.shtml')
   oCMenu.makeMenu('sub213','top2','&nbsp;&#183; Connect from campus ','/services/internet/connect/campus.shtml')
   oCMenu.makeMenu('sub214','top2','&nbsp;&#183; Connect via Tango','/services/internet/connect/tango/')
   oCMenu.makeMenu('sub215','top2','&nbsp;&#183; Connect via Samba','/services/internet/connect/SambaVPN/')
   oCMenu.makeMenu('sub216','top2','&nbsp;&#183; Connect via Wireless','/services/internet/connect/wireless/')
   oCMenu.makeMenu('sub217','top2','&nbsp;&#183; Mail','/services/internet/mail/')
   oCMenu.makeMenu('sub220','top2','Security Center','/services/security/index.shtml')
   oCMenu.makeMenu('sub230','top2','FTP','/services/software/ftp/ftp.shtml')
   oCMenu.makeMenu('sub231','top2','Microshop','/services/software/microshop.shtml')
   oCMenu.makeMenu('sub240','top2','Public Computing','/services/labs.shtml')
   oCMenu.makeMenu('sub250','top2','Facilities','/services/facilities.shtml')
   oCMenu.makeMenu('sub260','top2','Telephony','/services/telephony/index.shtml')

oCMenu.makeMenu('top3','','&nbsp;Support','')
   oCMenu.makeMenu('sub300','top3','Contacts','/helpdesk/helpdesk.shtml')
   oCMenu.makeMenu('sub310','top3','Troubleshooting','/helpdesk/tshoot/index.shtml')
   oCMenu.makeMenu('sub320','top3','Computer Management','/helpdesk/docs.shtml')
   
oCMenu.makeMenu('top4','','&nbsp;Academic<br>&nbsp;Computing','','','',40)
  oCMenu.makeMenu('sub400','top4','E-Learning','http://www.huji.ac.il/huji/e_learning.htm')
  oCMenu.makeMenu('sub410','top4','Digital Libraries','http://libnet.ac.il/')
  oCMenu.makeMenu('sub420','top4','Super Computing','http://www.hpcu.ac.il')
  oCMenu.makeMenu('sub430','top4','IUCC (Machba)','http://www.machba.ac.il')
  oCMenu.makeMenu('sub440','top4','Other Universities','')
    oCMenu.makeMenu('sub4400','sub440','Bar-Ilan','http://www.biu.ac.il/Computing/','_blank')
    oCMenu.makeMenu('sub4410','sub440','Ben Gurion','http://www.bgu.ac.il/computing/','_blank')
    oCMenu.makeMenu('sub4420','sub440','Haifa','http://cc.haifa.ac.il/')
    oCMenu.makeMenu('sub4430','sub440','Technion','http://www.technion.ac.il/technion/tcc/','_blank')
    oCMenu.makeMenu('sub4440','sub440','Tel Aviv','http://www.tau.ac.il/cc/','_blank')
    oCMenu.makeMenu('sub4450','sub440','Weizmann','http://www.weizmann.ac.il/CC/','_blank')
oCMenu.makeMenu('top5','','&nbsp;Branches','')
  oCMenu.makeMenu('sub500','top5','Ein-Kerem','http://ekcc.md.huji.ac.il')
  oCMenu.makeMenu('sub510','top5','Edmond J. Safra','/branches/givatram/index.shtml')
  oCMenu.makeMenu('sub520','top5','Mt. Scopus','http://msca.huji.ac.il')
  oCMenu.makeMenu('sub530','top5','Rehovot','http://helpdesk.agri.huji.ac.il')

oCMenu.makeMenu('top6','','&nbsp;Policy','')
  oCMenu.makeMenu('sub600','top6','Acceptable Use','/policyh.shtml')
  oCMenu.makeMenu('sub640','top6','Eligibility','/services/internet/rights.shtml')
  oCMenu.makeMenu('sub650','top6','Account Form','/services/internet/accountform.shtml')
oCMenu.makeMenu('top7','','&nbsp;Search','/sitemap.shtml')
//Leave this line - it constructs the menu
oCMenu.construct()		
