var hBar = new ItemStyle(40, 0, '', 0, 0, '#625E51', '#625E51', 'highText', 'highText', '', '', null, null, 'hand', 'default');
var subM = new ItemStyle(22, 0, '', -15, 0, '#E6E5E0', '#DDDDD5', 'lowText', 'lowText', '', '', null, null, 'hand', 'default');
var Seperator = new ItemStyle(22, 0, '', -15, 0, '#FFFFFF', '#FFFFFF', 'lowText', 'lowText', '', '', null, null, 'default', 'default');
var subBlank = new ItemStyle(22, 1, '&gt;', -15, 3, '#C5C7B0', '#A2A491', 'lowText', 'highText', 'itemBorderBlank', 'itemBorder', null, null, 'hand', 'default');
var button = new ItemStyle(22, 1, '&gt;', -15, 2, '#006633', '#CC6600', 'buttonText', 'buttonHover', 'buttonBorder', 'buttonBorderOver', 80, 95, 'crosshair', 'default');

var winW = 800;
if (parseInt(navigator.appVersion)>3) {
 if (navigator.appName=="Netscape") {winW = window.innerWidth;};
 if (navigator.appName.indexOf("Microsoft")!=-1) {winW = document.body.offsetWidth;};
}
if (winW<=800) {placer=5} else {placer=130};

var path = 'http://www.beitberl.ac.il';
var pMenu = new PopupMenu('pMenu');
with (pMenu)
{
/////////////////
//השורה העליונה בתפריט
/////////////////
startMenu('root', false, placer, 31, 13, hBar, '', false);
addItem('&nbsp;', '', '', null, 25);
addItem('צור קשר',path + '/contact-us/pages/default.aspx', 'window', null,50);
addItem('<table border=0><tr><td style=\'position:relative;top:1px;\'><img src=http://www.beitberl.ac.il/SiteImages/home/arrow_white.gif border=0 hspace=0></td></tr></table>', '', '', null, 25);
addItem('&nbsp;מחקר',path + '/research/pages/default.aspx', 'window', null,38);
addItem('<table border=0><tr><td style=\'position:relative;top:1px;\'><img src=http://www.beitberl.ac.il/SiteImages/home/arrow_white.gif border=0 hspace=0></td></tr></table>', '', '', null, 25);
addItem('&nbsp;מרכזים', 'center', 'sm:', null, 38);
addItem('<table border=0><tr><td style=\'position:relative;top:1px;\'><img src=http://www.beitberl.ac.il/SiteImages/home/arrow_white.gif border=0 hspace=0></td></tr></table>', '', '', null, 25);
addItem('&nbsp;ספריות', 'library', 'sm:', null, 38);
addItem('<table border=0><tr><td style=\'position:relative;top:1px;\'><img src=http://www.beitberl.ac.il/SiteImages/home/arrow_white.gif border=0 hspace=0></td></tr></table>', '', '', null, 25);
addItem('&nbsp;ייעוץ והרשמה', path + '/registration/pages/default.aspx', 'window', null,66);
addItem('<table border=0><tr><td style=\'position:relative;top:1px;\'><img src=http://www.beitberl.ac.il/SiteImages/home/arrow_white.gif border=0 hspace=0></td></tr></table>', '', '', null, 25);
addItem('&nbsp;תארים ותעודות', 'degrees', 'sm:', null, 38);
addItem('<table border=0><tr><td style=\'position:relative;top:1px;\'><img src=http://www.beitberl.ac.il/SiteImages/home/arrow_white.gif border=0 hspace=0></td></tr></table>', '', '', null, 25);
addItem('&nbsp;תחומי לימוד', 'studySubjects', 'sm:', null, 60);
addItem('<table border=0><tr><td style=\'position:relative;top:1px;\'><img src=http://www.beitberl.ac.il/SiteImages/home/arrow_white.gif border=0 hspace=0></td></tr></table>', '', '', null, 25);
addItem('&nbsp;מי אנחנו', 'WhoWeAre', 'sm:', null, 50);
addItem('<table border=0><tr><td style=\'position:relative;top:1px;\'><img src=http://www.beitberl.ac.il/SiteImages/home/arrow_white.gif border=0 hspace=0></td></tr></table>', '', '', null, 10);
//סוף שורה עליונה/////////////////


/////////////////
//מי אנחנו
//////////////////////////////////
startMenu('WhoWeAre', true, -40, 27, 120, subM, '', false);
//addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>אלפון</td><td width=12% align=right></td></tr></table>', path + '/about/phone-book/pages/default.aspx', '', subM, 22);
//addItem('', '#', '', Seperator , 1);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>דבר נשיאת המכללה</td><td width=12% align=right></td></tr></table>', path + '/about/president/pages/default.aspx', '', subM, 22);
addItem('', '#', '', Seperator , 1);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>היחידה לקשרי חוץ</td><td width=12% align=right></td></tr></table>', path +'/about/relations/pages/default.aspx', '', subM, 22);
addItem('', '#', '', Seperator , 1);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>הנהלת המכללה</td><td width=12% align=right></td></tr></table>', path +'/about/management/pages/default.aspx', '', subM, 22);
addItem('', '#', '', Seperator , 1);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>לוח שנת הלימודים האקדמית</td><td width=12% align=right></td></tr></table>',path + '/about/pages/luach.aspx', '', subM, 22);
addItem('', '#', '', Seperator , 1);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>חדשות ואירועים</td><td width=12% align=right></td></tr></table>',path + '/about/news/pages/default.aspx', '', subM, 22);
addItem('', '#', '', Seperator , 1);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>לוח אירועים</td><td width=12% align=right></td></tr></table>',path + '/about/events/pages/default.aspx', '', subM, 22);
addItem('', '#', '', Seperator , 1);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>כתבו עלינו</td><td width=12% align=right></td></tr></table>',path + '/about/publishes/pages/default.aspx', '', subM, 22);
addItem('', '#', '', Seperator , 1);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>צור קשר</td><td width=12% align=right></td></tr></table>',path + '', '', subM, 22);

/////////////////
//תחומי לימוד
//////////////////////////////////
startMenu('studySubjects', true, -40, 27, 120, subM, '', false);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>חינוך והוראה</td><td width=12% align=right></td></tr></table>',path + '/academic/education/pages/default.aspx', '', subM, 22);
addItem('', '#', '', Seperator , 1);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>הכשרת מורים ערבים</td><td width=12% align=right></td></tr></table>',path + '/academic/arabic/pages/default.aspx', '', subM, 22);
addItem('', '#', '', Seperator , 1);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>השתלמויות מורים</td><td width=12% align=right></td></tr></table>',path + '/academic/teachers/pages/default.aspx', '', subM, 22);
addItem('', '#', '', Seperator , 1);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>אמנות המדרשה</td><td width=12% align=right></td></tr></table>',path + '/academic/art/pages/default.aspx', '', subM, 22);
addItem('', '#', '', Seperator , 1);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>חברה וממשל</td><td width=12% align=right></td></tr></table>',path + '/academic/society/pages/default.aspx', '', subM, 22);


/////////////////
//תארים ותעודות
//////////////////////////////////
startMenu('degrees', true, -40, 27, 120, subM, '', false);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>תואר ראשון</td><td width=12% align=right></td></tr></table>',path + '/tearim/beducation/pages/default.aspx', '', subM, 22);
addItem('', '#', '', Seperator , 1);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>תואר שני</td><td width=12% align=right></td></tr></table>',path + '/tearim/ma/pages/default.aspx', '', subM, 22);
addItem('', '#', '', Seperator , 1);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>תעודת הוראה</td><td width=12% align=right></td></tr></table>',path + '/tearim/certificate_education/pages/default.aspx', '', subM, 22);
addItem('', '#', '', Seperator , 1);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>לימודי תעודה</td><td width=12% align=right></td></tr></table>',path + '/tearim/certificates_general/pages/default.aspx', '', subM, 22);


/////////////////
//ייעוץ והרשמה
//////////////////////////////////

/////////////////
//ספריות
//////////////////////////////////
startMenu('library', true, -40, 27, 120, subM, '', false);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>הספרייה המרכזית</td><td width=12% align=right></td></tr></table>',path + '/libraries/main-library/pages/default.aspx', '', subM, 22);
addItem('', '#', '', Seperator , 1);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>ספריות המדרשה</td><td width=12% align=right></td></tr></table>',path + '/libraries/midrasha/pages/default.aspx', '', subM, 22);
addItem('', '#', '', Seperator , 1);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>הספרייה הפדגוגית – מרכז תכנון לימודים, הוראה והערכה</td><td width=12% align=right></td></tr></table>',path + '/libraries/matal/pages/default.aspx', '', subM, 45);
addItem('', '#', '', Seperator , 1);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>ספרייה למרכז ימימה לחקר ספרות ילדים ונוער</td><td width=12% align=right></td></tr></table>',path + '/centers/yemima/pages/default.aspx', '', subM, 35);

/////////////////
//מרכזים
//////////////////////////////////
startMenu('center', true, -40, 27, 140, subM, '', false);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>מכון ליזמות בחינוך</td><td width=12% align=right></td></tr></table>',path + '/centers/yazamoot/pages/default.aspx', '', subM, 22);
addItem('', '#', '', Seperator , 1);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>מרכז אבחון והדרכה</td><td width=12% align=right></td></tr></table>',path + '/centers/hadraha/pages/default.aspx', '', subM, 22);
addItem('', '#', '', Seperator , 1);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>מרכז ימימה לחקר ספרות ילדים ונוער</td><td width=12% align=right></td></tr></table>',path + '/centers/yemima/pages/default.aspx', '', subM, 35);
addItem('', '#', '', Seperator , 1);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>מרכז לאוריינות סביבתית</td><td width=12% align=right></td></tr></table>',path + '/centers/oryanoot/pages/default.aspx', '', subM, 22);
addItem('', '#', '', Seperator , 1);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>מרכז להוראת המתמטיקה</td><td width=12% align=right></td></tr></table>',path + '/centers/mathmatika/pages/default.aspx', '', subM, 22);
addItem('', '#', '', Seperator , 1);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>מרכז לתכנון לימודים,הוראה והדרכה</td><td width=12% align=right></td></tr></table>',path + '/centers/matal/pages/default.aspx', '', subM, 35);
addItem('', '#', '', Seperator , 1);
addItem('<table width=100% border=0><tr><td class=MenuLink width=88% align=right dir=rtl>מרכז תמיכה לסטודנטים עם לקויי למידה</td><td width=12% align=right></td></tr></table>',path + '/centers/tmiha/pages/default.aspx', '', subM, 35);


/////////////////
//מחקר 
//////////////////////////////////

/////////////////
//צור קשר
//////////////////////////////////



//showDelay = 0;
//hideDocClick = true;
hideDelay = 500;
}

addDropShadow(pMenu, window.subM, [40,"#333333",6,6,-4,-4], [40,"#666666",4,4,0,0]);

page.elmPos=function(e,p)
{
 var x=0,y=0,w=p?p:this.win;
 e=e?(e.substr?(isNS4?w.document.anchors[e]:getRef(e,w)):e):p;
 if(isNS4){if(e&&(e!=p)){x=e.x;y=e.y};if(p){x+=p.pageX;y+=p.pageY}}
 if (e && this.MS && navigator.platform.indexOf('Mac')>-1 && e.tagName=='A')
 {
  e.onfocus = new Function('with(event){self.tmpX=clientX-offsetX;' + 'self.tmpY=clientY-offsetY}');
  e.focus();x=tmpX;y=tmpY;e.blur()
 }
 else while(e){x+=e.offsetLeft;y+=e.offsetTop;e=e.offsetParent}
 return{x:x,y:y};
};


function addDropShadow(mObj, iS)
{
 for (var mN in mObj.menu){var a=arguments, mD=mObj.menu[mN][0], addW=addH=0; if (mD.itemSty != iS) continue; for (var shad=2; shad<a.length; shad++) { var s = a[shad]; var alpha = (s[0]!=null && navigator.userAgent.indexOf('AppleWebKit') == -1); if (isNS4) mD.extraHTML += '<layer bgcolor="'+s[1]+'" left="'+s[2]+'" top="'+s[3]+'" width="'+ (mD.menuW+s[4])+'" height="'+(mD.menuH+s[5])+'" z-index="'+(arguments.length-shad)+'"></layer>'; else mD.extraHTML += '<div style="position:absolute; background:'+s[1]+'; left:'+s[2]+ 'px; top:'+s[3]+'px; width:'+(mD.menuW+s[4])+'px; height:'+(mD.menuH+s[5])+'px; -z-index:'+ (a.length-shad)+'; '+ (alpha?'filter:alpha(opacity='+s[0]+'); -moz-opacity:'+s[0]+'%; opacity:'+(s[0]/100):'')+ '"></div>'; addW=Math.max(addW, s[2]+s[4]); addH=Math.max(addH, s[3]+s[5]); } mD.menuW+=addW; mD.menuH+=addH; } };