
//Menu object creation
oCMenu=new makeCM("oCMenu") //Making the menu object. Argument: menuname

oCMenu.frames=0

//Menu properties   
oCMenu.pxBetween=0
oCMenu.fromLeft=
oCMenu.fromTop=86
oCMenu.rows=1 
oCMenu.menuPlacement="center"
                                                             
oCMenu.offlineRoot="" 
oCMenu.onlineRoot="" 
oCMenu.resizeCheck=1 
oCMenu.wait=1000 
oCMenu.fillImg=""
oCMenu.zIndex=0

//Background bar properties
oCMenu.useBar=0
oCMenu.barWidth="100%"
oCMenu.barHeight="menu" 
oCMenu.barClass="clBar"
oCMenu.barX=0 
oCMenu.barY=0
oCMenu.barBorderX=0
oCMenu.barBorderY=0
oCMenu.barBorderClass=""

//Level properties - ALL properties have to be specified in level 0
oCMenu.level[0]=new cm_makeLevel() //Add this for each new level
oCMenu.level[0].width=113
oCMenu.level[0].height=18 
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="bottom"

//dynamic effect (controllable for each level)
oCMenu.level[0].clippx=2 
oCMenu.level[0].cliptim=3
//special animation filters (IE5.5+ only, controllable for each level)


oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Fade(duration=0.5)" 




//Other special animation filters (IE5.5+ only, controllable for each level)

//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Wheel(duration=0.5,spokes=5)"

//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Barn(duration=0.5,orientation=horizontal)"
//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Blinds(duration=0.5,bands=5)"
//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.CheckerBoard(duration=0.5)"
//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Fade(duration=0.5)"
//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.GradientWipe(duration=0.5,wipeStyle=0)"
//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Iris(duration=0.5,irisStyle=STAR)"
//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Iris(duration=0.5,irisStyle=CIRCLE)"
//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Pixelate(duration=0.5,maxSquare=40)"
//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Wheel(duration=0.5,spokes=5)"
//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.RandomDissolve(duration=0.5)"
//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Spiral(duration=0.5)"
//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Stretch(duration=0.5,stretchStyle=push)"
//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Strips(duration=0.5,motion=rightdown)"


//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=oCMenu.level[0].width-4
oCMenu.level[1].height=18
oCMenu.level[1].regClass="clLevel1"
oCMenu.level[1].overClass="clLevel1over"
oCMenu.level[1].borderX=0
oCMenu.level[1].borderY=0
oCMenu.level[1].align="right" 
oCMenu.level[1].offsetX=0
oCMenu.level[1].offsetY=0
oCMenu.level[1].borderClass="clLevel1border"
//dynamic effect
oCMenu.level[1].clippx=2
oCMenu.level[1].cliptim=2
//special animation filters
oCMenu.level[1].filter="progid:DXImageTransform.Microsoft.Fade(duration=0.5)" 


//EXAMPLE SUB LEVEL[2] PROPERTIES - You have to specify 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=100
oCMenu.level[2].height=18
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"




if(bw.ie) makeCM.prototype.onconstruct='document.body.onscroll=new Function(c.name+".checkscrolled("+c.name+")")'
//else makeCM.prototype.onconstruct='setTimeout(c.name+".checkscrolled()",200)' //REMOVE THIS LINE TO HAVE //SCROLLING ON FOR EXPLORER ONLY!!
makeCM.prototype.lscroll=1
makeCM.prototype.scrollstop=1 //Set this variable to 1 for another scrolling effect. Leave at 0 to scroll regular
makeCM.prototype.checkscrolled=function(obj){
	var i;
	if(bw.mac) return //REMOVE THIS LINE TO HAVE SCROLLING ON THE MAC AS WELL - unstable!
  var c=bw.ie?obj:this, o
	if(bw.ns4 || bw.ns6 || bw.op5) c.scrollY=window.pageYOffset
	else c.scrollY=document.body.scrollTop
	if(c.scrollY!=c.lscroll){
    c.hidesub()
    if(c.scrollY>c.fromTop&&c.scrollstop){
      for(i=0;i<c.l[0].m.length;i++){o=c.m[c.l[0].m[i]].b; o.moveIt(o.x,c.scrollY)}
      if(c.useBar) c.bar.moveIt(c.bar.x,c.scrollY)
    }else{
      if(c.scrollstop){
        for(i=0;i<c.l[0].m.length;i++){o=c.m[c.l[0].m[i]].b; o.moveIt(o.x,c.fromTop)}
        if(c.useBar) c.bar.moveIt(c.bar.x,c.barY)
      }else{
        for(i=0;i<c.l[0].m.length;i++){o=c.m[c.l[0].m[i]].b; o.moveIt(o.x,o.oy+c.scrollY)}
        if(c.useBar) c.bar.moveIt(c.bar.x,c.barY+c.scrollY)
      }
    }
		c.lscroll=c.scrollY; cmpage.y=c.scrollY; cmpage.y2=cmpage.orgy+c.scrollY
		if(bw.ie){ clearTimeout(c.tim); c.isover=0; c.hidesub()}
    if(c.hideselectboxes){ //If you are using the hideselect add-in as well the script will now check for selectboxes when scrolling as well
      var x = c.useBar?c.m[c.l[0].m[0]].b.x>c.bar.x?c.bar.x:c.m[c.l[0].m[0]].b.x:c.m[c.l[0].m[0]].b.x;
      var y = c.useBar?c.m[c.l[0].m[0]].b.y>c.bar.y?c.bar.y:c.m[c.l[0].m[0]].b.y:c.m[c.l[0].m[0]].b.y;
      var maxw = c.useBar?c.bar.w:c.rows?c.totw:c.maxw; var maxh = c.useBar?c.bar.h:!c.rows?c.toth:c.maxh
      c.hideselectboxes(0,x,y,maxw,maxh,0)
    }
	}
	if(!bw.ie) setTimeout(c.name+".checkscrolled()",200)
}




















/******************************************
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','',' Department','','')
	oCMenu.makeMenu('sub00','top0','General','http://www.math.metu.edu.tr/department/general.shtml')
        oCMenu.makeMenu('sub01','top0','Organisation','http://www.math.metu.edu.tr/department/organisation.shtml')
        oCMenu.makeMenu('sub02','top0','Phone Lists','tel.shtml')
	oCMenu.makeMenu('sub03','top0','Mailing Lists','http://www.math.metu.edu.tr/csnm/serv_liste.html')
        
         	
oCMenu.makeMenu('sub001','sub00','History','history.shtml','',140,0)
                oCMenu.makeMenu('sub002','sub00','Overview','http://www.math.metu.edu.tr/department/overview.shtml','',140,0)		
                oCMenu.makeMenu('sub003','sub00','Campusmap','http://www.math.metu.edu.tr/department/map.shtml','',140,0)		
                oCMenu.makeMenu('sub004','sub00','Profile by numbers','http://www.math.metu.edu.tr/department/numbers.shtml','',140,0)
		oCMenu.makeMenu('sub005','sub00','Üniversite ögrencileri için','http://www.po.metu.edu.tr/tanitim/','',140,0)

oCMenu.makeMenu('top1','',' People','')
	oCMenu.makeMenu('sub10','top1','Faculty and Staff','http://www.math.metu.edu.tr/people/faculty.shtml')
	oCMenu.makeMenu('sub11','top1','Research Assistants','http://arf.math.metu.edu.tr/people/resassistants.shtml')
	oCMenu.makeMenu('sub12','top1','Past Faculty','http://arf.math.metu.edu.tr/people/past_faculty.shtml')
	
oCMenu.makeMenu('sub13','top1','Alumni','http://alumni.math.metu.edu.tr')
	
oCMenu.makeMenu('top2','',' Courses','')
	oCMenu.makeMenu('sub21','top2','Undergraduate','http://www.math.metu.edu.tr/courses/undergrad.shtml')
	oCMenu.makeMenu('sub22','top2','Graduate','http://www.math.metu.edu.tr/courses/graduate.shtml')
	oCMenu.makeMenu('sub23','top2','Core','http://www.math.metu.edu.tr/courses/core.shtml')
	oCMenu.makeMenu('sub24','top2','Elective','http://www.math.metu.edu.tr/courses/elective.shtml')
	oCMenu.makeMenu('sub25','top2','Service','http://www.math.metu.edu.tr/courses/service.shtml')
	oCMenu.makeMenu('sub26','top2','Courses Offered','http://www.math.metu.edu.tr/courses/offered_courses.shtml')


oCMenu.makeMenu('top3','','Academic','')
	oCMenu.makeMenu('sub31','top3','Preprints','http://www.math.metu.edu.tr/academic/preprints.shtml')
	oCMenu.makeMenu('sub32','top3','PhD. Awarded','http://www.math.metu.edu.tr/academic/phd.shtml')
	oCMenu.makeMenu('sub33','top3','Msc. Awarded','http://www.math.metu.edu.tr/academic/ms.shtml')

oCMenu.makeMenu('top4','','Seminars','')
	oCMenu.makeMenu('sub41','top4','General seminars','http://www.math.metu.edu.tr/seminars/general.shtml')
	oCMenu.makeMenu('sub42','top4','Other Seminars','http://www.math.metu.edu.tr/seminars/other.shtml')
	oCMenu.makeMenu('sub43','top4','Conferences','http://www.math.metu.edu.tr/seminars/conferences.shtml')
	

	

oCMenu.makeMenu('top5','','Local','')
	oCMenu.makeMenu('sub51','top5','EMIS Mirror Site','http://emis.math.metu.edu.tr/')
	oCMenu.makeMenu('sub52','top5','International Relations','http://www.math.metu.edu.tr/local/relations.shtml')
	oCMenu.makeMenu('sub53','top5','Publications','http://www.math.metu.edu.tr/local/publications.shtml')
	oCMenu.makeMenu('sub54','top5','GradCom','http://www.math.metu.edu.tr/~gradcom')
	oCMenu.makeMenu('sub55','top5','Links','http://www.math.metu.edu.tr/local/')
	       


//Leave this line - it constructs the menu
oCMenu.construct()	
