


/******************************************
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','','Schulorganisation','')
	oCMenu.makeMenu('sub00','top0','Schulleitung','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=11')
	oCMenu.makeMenu('sub01','top0','Sekretariat, Hausverwaltung','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=23')
	oCMenu.makeMenu('sub02','top0','Schuldaten','#')
	       oCMenu.makeMenu('sub020','sub02','Wahlpflichtf&auml;cher','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=24')
		   oCMenu.makeMenu('sub021','sub02','Sch&uuml;lerzahlen','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=25')	   
	oCMenu.makeMenu('sub03','top0','Schulprofil, Flyer','http://www.stars-altoetting.de/index.php?file=download/overview.php&down_id=17')
	oCMenu.makeMenu('sub04','top0','Formulare','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=44')


oCMenu.makeMenu('top1','','Termine','')
    oCMenu.makeMenu('sub10','top1','Vertretung','http://www.stars-altoetting.de/index.php?file=artikel/showartikel.php&art_id=3')
	oCMenu.makeMenu('sub11','top1','Terminplan','http://www.stars-altoetting.de/index.php?file=termine/gesamt.php')
	oCMenu.makeMenu('sub12','top1','Ferienordnung','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=43')

oCMenu.makeMenu('top2','','Schulberatung','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=27')


oCMenu.makeMenu('top3','','Lehrkräfte','')
    oCMenu.makeMenu('sub30','top3','Sprechstunden','http://www.stars-altoetting.de/index.php?file=artikel/showartikel.php&art_id=39')
	oCMenu.makeMenu('sub31','top3','Kollegium','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=22')


oCMenu.makeMenu('top4','','Eltern','')
    oCMenu.makeMenu('sub40','top4','F&ouml;rderverein','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=13')
	oCMenu.makeMenu('sub41','top4','Elternbeirat','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=14')
    oCMenu.makeMenu('sub42','top4','Elternbriefe','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=21')
	

oCMenu.makeMenu('top5','','Sch&uuml;ler','')
    oCMenu.makeMenu('sub50','top5','SMV','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=33')
	oCMenu.makeMenu('sub51','top5','Sch&uuml;lerzeitung','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=28')
	oCMenu.makeMenu('sub52','top5','Betriebspraktikum','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=38')


oCMenu.makeMenu('top6','','Schulleben','')
    oCMenu.makeMenu('sub60','top6','Hausordnung','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=34')
	oCMenu.makeMenu('sub61','top6','Rahmenvereinbarung','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=41')
	oCMenu.makeMenu('sub62','top6','Schulsanitätsdienst','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=29')
	oCMenu.makeMenu('sub63','top6','Fotogalerie','http://www.stars-altoetting.de/index.php?file=pixlie/showpixlie.php')
	oCMenu.makeMenu('sub64','top6','Lebensraum Schule','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=35')
	oCMenu.makeMenu('sub65','top6','Krisenteam','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=31')
	oCMenu.makeMenu('sub66','top6','Pausenmeditation','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=32')
	oCMenu.makeMenu('sub67','top6','Orchester','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=37')
	oCMenu.makeMenu('sub68','top6','Chor','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=36')



oCMenu.makeMenu('top7','','F&auml;cher','')
    oCMenu.makeMenu('sub70','top7','Betriebswirtschaftslehre/Rw','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=18')
	oCMenu.makeMenu('sub71','top7','Mathematik','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=19')
	oCMenu.makeMenu('sub72','top7','Deutsch','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=20')
	oCMenu.makeMenu('sub73','top7','Physik','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=39')
	oCMenu.makeMenu('sub74','top7','Sozialkunde','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=40')
	
	oCMenu.makeMenu('top8','','Medienp&auml;d. Beratung ','http://www.stars-altoetting.de/index.php?file=content/viewkat.php&kat_id=45')


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


//Extra code to find position:
function findPos(num){
  //alert(num)
  if(bw.ns4){   //Netscape 4
    x = document.layers["layerMenu"+num].pageX
    y = document.layers["layerMenu"+num].pageY
  }else{ //other browsers
    x=0; y=0; var el,temp
    el = bw.ie4?document.all["divMenu"+num]:document.getElementById("divMenu"+num);
    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,y]
}
function placeElements(){
  //Changing the position of ALL top items:
  pos = findPos(0)
  oCMenu.m["top0"].b.moveIt(pos[0],pos[1])
  pos = findPos(1)
  oCMenu.m["top1"].b.moveIt(pos[0],pos[1])
  pos = findPos(2)
  oCMenu.m["top2"].b.moveIt(pos[0],pos[1])
  pos = findPos(3)
  oCMenu.m["top3"].b.moveIt(pos[0],pos[1])
  pos = findPos(4)
  oCMenu.m["top4"].b.moveIt(pos[0],pos[1])
  pos = findPos(5)
  oCMenu.m["top5"].b.moveIt(pos[0],pos[1])
    pos = findPos(6)
  oCMenu.m["top6"].b.moveIt(pos[0],pos[1])
    pos = findPos(7)
  oCMenu.m["top7"].b.moveIt(pos[0],pos[1])
  pos = findPos(8)
  oCMenu.m["top8"].b.moveIt(pos[0],pos[1])
  
  //Setting the fromtop value
  oCMenu.fromTop = pos[1]
}
placeElements()
//Setting it to re place the elements after resize - the resize is not perfect though..
oCMenu.onafterresize="placeElements()"