/*** 
This is the menu creation code - place it right after you body tag
Feel free to add this to a stand-alone js file and link it to your page.
**/
function StatusText(myText){window.status=myText;	return true}
//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=0
oCMenu.fromTop=0
oCMenu.rows=1
oCMenu.menuPlacement=0
oCMenu.openOnClick=1
                                                             
oCMenu.offlineRoot="C:\Web Projects\hsc" 
oCMenu.onlineRoot="" 
oCMenu.resizeCheck=1 
oCMenu.wait=500 
oCMenu.fillImg="images/spacer.gif"
oCMenu.zIndex=0

//Background bar properties
oCMenu.useBar=0

//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="110"
oCMenu.level[0].height=16 
oCMenu.level[0].regClass="clLevel0"
oCMenu.level[0].overClass="clLevel0over"
oCMenu.level[0].borderX=1
oCMenu.level[0].borderY=1
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"
oCMenu.level[1]=new cm_makeLevel()
oCMenu.level[1].width="160"
oCMenu.level[1].height=18 
oCMenu.level[1].regClass="clLevel1"
oCMenu.level[1].overClass="clLevel1over"


/******************************************
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;Home','default.asp','','','','','','','','','','','','StatusText("Return to the Home Page.")','StatusText("")')
oCMenu.makeMenu('top1','','&nbsp;General','')
	oCMenu.makeMenu('sub10','top1','Who Are We?','whoarewe.htm','','','','','','','','','','','','StatusText("Who or what is the Hinckley Soul Club?")','StatusText("")')
	oCMenu.makeMenu('sub11','top1','Beginnings','beginnings.htm','','','','','','','','','','','','StatusText("How did it all start?")','StatusText("")')
	oCMenu.makeMenu('sub12','top1','Acknowledgements','acknowledgements.htm','','','','','','','','','','','','StatusText("Acknowlegements.")','StatusText("")')
	oCMenu.makeMenu('sub13','top1','News','news.htm','','','','','','','','','','','','StatusText("News, past and present.")','StatusText("")')
	oCMenu.makeMenu('sub14','top1','Have Your Say','haveyoursay.asp','','','','','','','','','','','','StatusText("See what people are saying, and even join in with the Forum.")','StatusText("")')
	oCMenu.makeMenu('sub15','top1','Contact','contact.htm','','','','','','','','','','','','StatusText("Get in touch with the Hinckley Soul Club.")','StatusText("")')
	oCMenu.makeMenu('sub16','top1','What\'s On','whatson.htm','','','','','','','','','','','','StatusText("Add your venue to the What\'s On Guide")','StatusText("")')
	oCMenu.makeMenu('sub17','top1','The Guestbook','guestbook.htm','','','','','','','','','','','','StatusText("View and Sign the Guestbook")','StatusText("")')
	oCMenu.makeMenu('sub18','top1','Curiosity Corner','curiositycorner.htm','','','','','','','','','','','','StatusText("Places to go and things to see")','StatusText("")')
	oCMenu.makeMenu('sub19','top1','Survey Results','survey.asp','','','','','','','','','','','','StatusText("See the results of current and past surveys")','StatusText("")')
oCMenu.makeMenu('top2','','&nbsp;Local Venues','')
	oCMenu.makeMenu('sub21','top2','The Junction Disco','junction.htm','','','','','','','','','','','','StatusText("The Junction Disco, Hinckley, Leicestershire.")','StatusText("")')
	oCMenu.makeMenu('sub22','top2','Tiffany\'s', 'tiffanys.htm','','','','','','','','','','','','StatusText("Tiffanys Nightclub, Hinckley, Leicestershire.")','StatusText("")')
	oCMenu.makeMenu('sub23','top2','The Constitutional Club', 'constitutionalclub.htm','','','','','','','','','','','','StatusText("The Constitutional Club, Hinckley, Leicestershire.")','StatusText("")')
	oCMenu.makeMenu('sub24','top2','The Vinery Hotel', 'vinery.htm','','','','','','','','','','','','StatusText("The Vinery Hotel, Hinckley, Leicestershire.")','StatusText("")')
	oCMenu.makeMenu('sub25','top2','The Union Inn', 'union.htm','','','','','','','','','','','','StatusText("The Union Inn, Hinckley, Leicestershire.")','StatusText("")')
	oCMenu.makeMenu('sub26','top2','Bond Gate Social Club', 'bondgate.htm','','','','','','','','','','','','StatusText("Bond Gate Social Club, Nuneaton, Warwickshire. ")','StatusText("")')
	oCMenu.makeMenu('sub27','top2','St. John\'s Ambulance Hall', 'stjohns.htm','','','','','','','','','','','','StatusText("The St.Johns Ambulance Hall, Hinckley, Leicestershire.")','StatusText("")')
	oCMenu.makeMenu('sub28','top2','Ashby Road Sports Club', 'ashbyroad.htm','','','','','','','','','','','','StatusText("Ashby Road Sports Club, Hinckley, Leicestershire.")','StatusText("")')
	oCMenu.makeMenu('sub29','top2','Working Men\'s Club', 'workingmens.htm','','','','','','','','','','','','StatusText("The Working Mens Club, Hinckley, Leicestershire.")','StatusText("")')
	oCMenu.makeMenu('sub2a','top2','Bubbles', 'bubbles.htm','','','','','','','','','','','','StatusText("Bubbles Nightclub, Hinckley, Leicestershire.")','StatusText("")')
	oCMenu.makeMenu('sub2b','top2','The Leisure Centre', 'leisurecentre.htm','','','','','','','','','','','','StatusText("The Leisure Centre, Hinckley, Leicestershire.")','StatusText("")')
	oCMenu.makeMenu('sub2c','top2','The Boy\'s Club', 'boysclub.htm','','','','','','','','','','','','StatusText("Tom Towers Boys Club, Hinckley, Leicestershire.")','StatusText("")')
	oCMenu.makeMenu('sub2d','top2','The Sweet Pea Club', 'sweetpea.htm','','','','','','','','','','','','StatusText("The Sweet Pea Club, Hinckley, Leicestershire.")','StatusText("")')
	oCMenu.makeMenu('sub2e','top2','Wykin Social Club', 'wykin.htm','','','','','','','','','','','','StatusText("Wykin Social Club, Hinckley, Leicestershire.")','StatusText("")')
	oCMenu.makeMenu('sub2f','top2','The Clarendon Club', 'clarendonclub.htm','','','','','','','','','','','','StatusText("The Clarendon Club, Hinckley, Leicestershire.")','StatusText("")')
oCMenu.makeMenu('top3','','&nbsp;National Venues','')
	oCMenu.makeMenu('sub30','top3','Twisted Wheel Manchester', 'wheel.htm','','','','','','','','','','','','StatusText("The Twisted Wheel Club, Manchester.")','StatusText("")')
	oCMenu.makeMenu('sub31','top3','The Torch Stoke', 'torch.htm','','','','','','','','','','','','StatusText("The Torch, Stoke-On-Trent.")','StatusText("")')
	oCMenu.makeMenu('sub32','top3','Va-Va\'s Bolton', 'vava.htm','','','','','','','','','','','','StatusText("Va-Vas, Bolton.")','StatusText("")')	
	oCMenu.makeMenu('sub33','top3','The Catacombs', 'catacombs.htm','','','','','','','','','','','','StatusText("The Catacombs Club, Wolverhampton.")','StatusText("")')
	oCMenu.makeMenu('sub34','top3','Blackpool Mecca', 'mecca.htm','','','','','','','','','','','','StatusText("Blackpool Mecca.")','StatusText("")')
	oCMenu.makeMenu('sub35','top3','Cleethorpes', 'cleethorpes.htm','','','','','','','','','','','','StatusText("Cleethorpes Pier and Winter Gardens.")','StatusText("")')
	oCMenu.makeMenu('sub36','top3','Coalville Tiffany\'s', 'coalville.htm','','','','','','','','','','','','StatusText("Coalville Tiffanys, Leicestershire.")','StatusText("")')
	oCMenu.makeMenu('sub37','top3','Samantha\'s Sheffield', 'samanthas.htm','','','','','','','','','','','','StatusText("Samanthas Soul Scene, Sheffield.")','StatusText("")')
	oCMenu.makeMenu('sub38','top3','Nottingham Palais', 'nottspalais.htm','','','','','','','','','','','','StatusText("Nottingham Palais.")','StatusText("")')
	oCMenu.makeMenu('sub39','top3','Wigan Casino', 'wigan.htm','','','','','','','','','','','','StatusText("Wigan Casino.")','StatusText("")')
oCMenu.makeMenu('top4','','&nbsp;Sounds','')
	oCMenu.makeMenu('sub40','top4','Fave Tunes', 'favetunes.htm','','','','','','','','','','','','StatusText("Listen to Soulies Favourite Sounds.")','StatusText("")')
	oCMenu.makeMenu('sub41','top4','Live Venues', 'livevenues.htm','','','','','','','','','','','','StatusText("Experience the atmosphere at Allnighters and Alldayers")','StatusText("")')
	oCMenu.makeMenu('sub42','top4','Top Sounds Poll','topsounds.asp','','','','','','','','','','','','StatusText("Vote for your favourite Northern Soul sound of all time.")','StatusText("")')
oCMenu.makeMenu('top5','','&nbsp;Pictures & Video','')
	oCMenu.makeMenu('sub50','top5','Posters & Ads', 'posters.htm','','','','','','','','','','','','StatusText("Posters and Adverts.")','StatusText("")')
	oCMenu.makeMenu('sub51','top5','Photos 1', 'photos1.htm','','','','','','','','','','','','StatusText("Photos of people and things...")','StatusText("")')
	oCMenu.makeMenu('sub52','top5','Photos 2', 'photos2.htm','','','','','','','','','','','','StatusText("More photos of people and things...")','StatusText("")')
	oCMenu.makeMenu('sub53','top5','Photos 3', 'photos3.htm','','','','','','','','','','','','StatusText("And more photos of people and things...")','StatusText("")')
	oCMenu.makeMenu('sub54','top5','Photos 4', 'photos4.htm','','','','','','','','','','','','StatusText("Even more photos of people and things...")','StatusText("")')
	oCMenu.makeMenu('sub55','top5','Photos 5', 'photos5.htm','','','','','','','','','','','','StatusText("And yet more photos of people and things...")','StatusText("")')
	oCMenu.makeMenu('sub56','top5','Photos 6', 'photos6.htm','','','','','','','','','','','','StatusText("And a few more photos of people and things...")','StatusText("")')	
	oCMenu.makeMenu('sub57','top5','Photos 7', 'photos7.htm','','','','','','','','','','','','StatusText("Jackie\'s photos of people and things...")','StatusText("")')	
	oCMenu.makeMenu('sub58','top5','Photos 8', 'photos8.htm','','','','','','','','','','','','StatusText("Debbie\'s photos of people and things...")','StatusText("")')	
	oCMenu.makeMenu('sub59','top5','Video', 'video.htm','','','','','','','','','','','','StatusText("Oh! and some video of Hinckley Soul venues.")','StatusText("")')
	oCMenu.makeMenu('sub5A','top5','Rogue\'s Gallery', 'roguesgallery.htm','','','','','','','','','','','','StatusText("Some daft photos that don\'t fit anywhere else!")','StatusText("")')
	oCMenu.makeMenu('sub5B','top5','YouTube Video', 'youtubevideo.htm','','','','','','','','','','','','StatusText("Northern Soul Video from YouTube")','StatusText("")')
	oCMenu.makeMenu('sub5C','top5','Wesley Phillips', 'wesley.htm','','','','','','','','','','','','StatusText("Wesley Phillips - Live in Benidorm")','StatusText("")')
	oCMenu.makeMenu('sub5D','top5','The Temptations USA', 'tempsusa.htm','','','','','','','','','','','','StatusText("The Temptations USA - Live in Benidorm")','StatusText("")')

	
//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])  
  //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()"

