/******************************************
Menu item creation:
myCoolMenu.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout) 
*************************************/



/** Consumer Information start **/
oCMenu.makeMenu('top1','','<div align="center">Consumer Information</div>','consumerinfo/overview.html','',200)
	oCMenu.makeMenu('sub11','top1','SNBE Members','snbemembers/Memb.aspx')
	oCMenu.makeMenu('sub12','top1','Home Improvement','consumerinfo/homeimprovement.html')
	oCMenu.makeMenu('sub13','top1','Using Licensed Contractors','consumerinfo/usingcontractors.html')
	oCMenu.makeMenu('sub14','top1','Stop Unlicensed Contractors','consumerinfo/stopcontractors.html')
/** Consumer Information end **/


oCMenu.makeMenu('top2','','','','',1,22,'images/spacer.gif','','','','','','nolink')

/** Member Information start **/
oCMenu.makeMenu('top3','','<div align="center">Member Information</div>','memberinfo/buildersexchange.html','',200)
	oCMenu.makeMenu('sub31','top3','What&rsquo;s the Builders Exchange?','memberinfo/buildersexchange.html')
	oCMenu.makeMenu('sub32','top3','Member Services','memberinfo/memberservices.html')
	oCMenu.makeMenu('sub33','top3','Join the Builders Exchange','pdf/SNBE Membership Application.pdf')
				/** Insurance programs start **/
	oCMenu.makeMenu('sub34','top3','Insurance Programs','insurance/insurance.html')
		oCMenu.makeMenu('sub340','sub34','Overview','insurance/insurance.html','','','','','','clLevel2o','clLevel2overo')
		oCMenu.makeMenu('sub341','sub34','Introduction','insurance/insuranceintro.html')
 	oCMenu.makeMenu('sub342','sub34','Workers&rsquo; Compensation Insurance','insurance/workerscorp.html')
	 oCMenu.makeMenu('sub343','sub34','Employee Benefits Plans','insurance/plansoverview.html')
								/** Employee Benefits Plans start **/
	
												/** Medical Plans start **/
	  
				/** Safety start **/
	oCMenu.makeMenu('sub35','top3','Safety Information','safety/safety.html')
		oCMenu.makeMenu('sub350','sub35','Overview','safety/safety.html','','','','','','clLevel2o','clLevel2overo')
		oCMenu.makeMenu('sub351','sub35','Safety Videos Library','safety/safetyvideos.html')
		oCMenu.makeMenu('sub352','sub35','How to Stage a Safety Meeting?','safety/tailgateintro.html','','',29)

								/** Tailgate Topics start **/
		oCMenu.makeMenu('sub353','sub35','Tailgate Topics','safety/tailgate.html')
			oCMenu.makeMenu('sub3530','sub353','Overview','safety/tailgate.html','','','','','','clLevel3o','clLevel3overo')
			oCMenu.makeMenu('sub3531','sub353','Electric Hand Tools','safety/tailgatetools.html')
			oCMenu.makeMenu('sub3532','sub353','Horseplay','safety/tailgatehorseplay.html')
			oCMenu.makeMenu('sub3533','sub353','Learning First Aid','safety/tailgatelearning.html')
			oCMenu.makeMenu('sub3534','sub353','Accident Investigations','safety/tailgateaccident.html')
			oCMenu.makeMenu('sub3535','sub353','Violence in the Workplace','safety/tailgateviolence.html')
			oCMenu.makeMenu('sub3536','sub353','Defensive Driving','safety/tailgatedefensive.html')
			oCMenu.makeMenu('sub3537','sub353','Hearing Protection','safety/tailgatehearing.html')
			oCMenu.makeMenu('sub3538','sub353','Trenches & Excavations','safety/tailgatetrenches.html')
			oCMenu.makeMenu('sub3539','sub353','Work Site Fires Emergencies','safety/tailgateworksite.html')
			oCMenu.makeMenu('sub35310','sub353','Repetitive Motion Injuries','safety/tailgaterepetitive.html')
			oCMenu.makeMenu('sub35311','sub353','Most Cited OSHA Violations','safety/tailgatemost.html')
			oCMenu.makeMenu('sub35312','sub353','Chemical Hazards','safety/tailgatechemical.html')
			oCMenu.makeMenu('sub35313','sub353','Safety Attitudes & Accidents','safety/tailgatesafety.html')
								/** Tailgate Topics end **/
				/** Safety end **/

				/** News start **/
	oCMenu.makeMenu('sub36','top3','News &amp; Information','news/news.html')
		oCMenu.makeMenu('sub360','sub36','Overview','news/news.html','','','','','','clLevel2o','clLevel2overo')
		oCMenu.makeMenu('sub361','sub36','SNBE Events &amp; Seminars','news/snbeevents.html')
		oCMenu.makeMenu('sub362','sub36','Local Legislation','news/localnews.html')
		oCMenu.makeMenu('sub363','sub36','State Legislation','news/statenews.html')
		oCMenu.makeMenu('sub364','sub36','Federal Legislation','news/federalnews.html')
		oCMenu.makeMenu('sub365','sub36','State Agency Regulations','news/stateagents.html')
		oCMenu.makeMenu('sub366','sub36','Construction Related Links','news/links.html')
				/** News end **/

	oCMenu.makeMenu('sub37','top3','Napa Max','napamax/napamax.html')
	oCMenu.makeMenu('sub38','top3','Golden State Builders Exchanges','news/gstate_exchanges.html')
/** Member Information end **/

oCMenu.makeMenu('top4','','','','',1,22,'images/spacer.gif','','','','','','nolink')

/** Construction News start **/
oCMenu.makeMenu('top5','','<div align="center">Construction News</div>','','',200)
	oCMenu.makeMenu('sub51','top5','Projects Out To Bid','projects/')
		oCMenu.makeMenu('sub53','top5','Building Permits','bldgpermit/')
	oCMenu.makeMenu('sub54','top5','Legal Notices','legalnotice/')
/** Construction News end **/

//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(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()"
