
/*** 
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.
**/

//Extra code to find position:
function findPos(){
	
  if(bw.ns4){   //Netscape 4
    x = document.layers.layerMenu.pageX
    y = document.layers.layerMenu.pageY
  }else{ //other browsers
    x=0; y=0; var el,temp
    el = bw.ie4?document.all["divMenu"]:document.getElementById("divMenu");
    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]
}

pos = findPos()

//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=pos[0]
oCMenu.fromTop=pos[1]
//We also need to "re place" the menu on resize. So:
oCMenu.onresize="pos = findPos(); oCMenu.fromLeft=pos[0]; oCMenu.fromTop=pos[1]"
oCMenu.rows=0
oCMenu.menuPlacement=0
                                                            
oCMenu.offlineRoot="" 
oCMenu.onlineRoot="" 
oCMenu.resizeCheck=2 
oCMenu.wait=450
oCMenu.fillImg="http://www.africanwings.co.za/cm_fill.gif"
oCMenu.zIndex=0

//Background bar properties
oCMenu.useBar=1
oCMenu.barWidth="menu"
oCMenu.barHeight="menu" 
oCMenu.barClass="clBar"
oCMenu.barX="menu"
oCMenu.barY="menu"
oCMenu.barBorderX=0
oCMenu.barBorderY=0
oCMenu.barBorderClass=""

//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=160
oCMenu.level[0].height=19
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=-20
oCMenu.level[0].offsetY=10
oCMenu.level[0].rows=0
oCMenu.level[0].arrow=0
oCMenu.level[0].arrowWidth=0
oCMenu.level[0].arrowHeight=0
oCMenu.level[0].align="right"

oCMenu.level[0].slidepx=10
oCMenu.level[0].slidetim=5


//Level properties - ALL properties have to be spesified in level 0
oCMenu.level[1]=new cm_makeLevel() //Add this for each new level
oCMenu.level[1].width=110
oCMenu.level[1].height=24
oCMenu.level[1].regClass="clLevel1"
oCMenu.level[1].overClass="clLevel1over"
oCMenu.level[1].borderX=0
oCMenu.level[1].borderY=0
oCMenu.level[1].borderClass="clLevel1border"
oCMenu.level[1].offsetX=+5
oCMenu.level[1].offsetY=0
oCMenu.level[1].rows=0
oCMenu.level[1].arrow=0
oCMenu.level[1].arrowWidth=0
oCMenu.level[1].arrowHeight=0
oCMenu.level[1].align=""

/******************************************
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','','','contact.html','', '', '25','images/nav/Nav_ContactUs.gif','images/nav/Nav_ContactUs_mo.gif')
	//oCMenu.makeMenu('sub00','top0','','evanaustin.html','', '110', '24', 'images/nav/SubNav_EvanAustin.gif','images/nav/SubNav_EvanAustin_mo.gif')
	
oCMenu.makeMenu('top1','','','general.html','', '', '24','images/nav/Nav_GenInfo.gif','images/nav/Nav_GenInfo_mo.gif')
	oCMenu.makeMenu('sub10','top1','','general.html','', '110', '24', 'images/nav/SubNav_GeneralInfo.gif','images/nav/SubNav_GeneralInfo_mo.gif')
	oCMenu.makeMenu('sub11','top1','','austinbrothers.html','', '110', '24', 'images/nav/SubNav_austenbrothers.gif','images/nav/SubNav_austenbrothers_mo.gif')
	//oCMenu.makeMenu('sub12','top1','','davidaustin.html','', '110', '24', 'images/nav/SubNav_DavidAustin.gif','images/nav/SubNav_DavidAustin_mo.gif')

oCMenu.makeMenu('top2','','','tailoredtrips.html','', '', '24','images/nav/Nav_TailorTrips.gif','images/nav/Nav_TailorTrips_mo.gif')
	//oCMenu.makeMenu('sub20','top2','','4_skillsProg.html','', '', '', 'images/nav/introduction.gif','images/nav/introduction_mo.gif')
	//oCMenu.makeMenu('sub21','top2','','14-QualMatrix.html','', '', '', 'images/nav/qualifications.gif','images/nav/qualifications_mo.gif')
	//oCMenu.makeMenu('sub22','top2','','4_skillsProg.html','', '', '', 'images/nav/products.gif','images/nav/products_mo.gif')	
		
oCMenu.makeMenu('top3','','','packages.html','', '', '24','images/nav/Nav_packages.gif','images/nav/Nav_packages_mo.gif')
	oCMenu.makeMenu('sub30','top3','','oneday.html','', '110', '24', 'images/nav/SubNav_oneday.gif','images/nav/SubNav_oneday_mo.gif')
	oCMenu.makeMenu('sub31','top3','','overnight.html','', '110', '24', 'images/nav/SubNav_overnight.gif','images/nav/SubNav_overnight_mo.gif')
	oCMenu.makeMenu('sub32','top3','','safaris.html','', '110', '24', 'images/nav/SubNav_Safaris.gif','images/nav/SubNav_Safaris_mo.gif')
	oCMenu.makeMenu('sub33','top3','','flight-giants.html','', '110', '24', 'images/nav/SubNav_Whales.gif','images/nav/SubNav_Whales_mo.gif')
	//oCMenu.makeMenu('sub32','top3','','15_achievementPlan.html','', '', '', 'images/nav/achievement.gif','images/nav/achievement_mo.gif')	
	//oCMenu.makeMenu('sub33','top3','','9_feedback.html','', '', '', 'images/nav/feedback.gif','images/nav/feedback_mo.gif')
	
oCMenu.makeMenu('top4','','','gallery.php','', '', '24','images/nav/Nav_galary.gif', 'images/nav/Nav_galary_mo.gif')

	
oCMenu.makeMenu('top5','','','health.html','', '', '24','images/nav/Nav_Health.gif','images/nav/Nav_Health_mo.gif')
	
//oCMenu.makeMenu('top5','','','health.html','', '', '24', 'images/nav/Nav_aboutSA.gif', 'images/nav/Nav_aboutSA_mo.gif')
	//oCMenu.makeMenu('sub50','top5','','10_assessment.html','', '', '', 'images/nav/assessment.gif','images/nav/assessment_mo.gif')
	//oCMenu.makeMenu('sub51','top5','','11-facilitation.html','', '', '', 'images/nav/facilitation.gif','images/nav/facilitation_mo.gif')	
	//oCMenu.makeMenu('sub52','top5','','12-registration.html','', '', '', 'images/nav/registration.gif','images/nav/registration_mo.gif')	
		
//oCMenu.makeMenu('top7','','','','', '', '36','images/nav/Nav_testimonials.gif', 'images/nav/Nav_testimonials_mo.gif')

oCMenu.makeMenu('top6','','','index-2.html','', '', '24','images/nav/Nav_home.gif', 'images/nav/Nav_home_mo.gif')

//Leave this line - it constructs the menu
oCMenu.construct()		

