/*** 
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=1
//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=2
oCMenu.menuPlacement=0
       

                                                             
oCMenu.offlineRoot="" 
oCMenu.onlineRoot="" 
oCMenu.resizeCheck=1 
oCMenu.wait=1000 
oCMenu.fillImg="cm_fill.gif"
oCMenu.zIndex=0


//Netscape 4 and Opera form work-around !! !! !! !! !!
if(bw.ns4 || bw.op5 || bw.op6){
  oCMenu.onshow="document.layers?document.layers.formLayer.visibility='hidden':document.getElementById('formDiv').style.visibility='hidden';"
  oCMenu.onhide="document.layers?document.layers.formLayer.visibility='visible':document.getElementById('formDiv').style.visibility='visible';"
}

//Background bar properties
oCMenu.useBar=1
oCMenu.barWidth=""
oCMenu.barHeight="26" 
oCMenu.barClass="clBar"
oCMenu.barX=1 
oCMenu.barY=147
oCMenu.barBorderX=0
oCMenu.barBorderY=0
oCMenu.barBorderClass="clBarborder"



//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=100
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=""
oCMenu.level[0].offsetX=0
oCMenu.level[0].offsetY=0
oCMenu.level[0].rows=0
oCMenu.level[0].arrow="images/menu_arrow.gif"
oCMenu.level[0].arrowWidth=5
oCMenu.level[0].arrowHeight=26
oCMenu.level[0].align="bottom"
oCMenu.level[0].zIndex=50


//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
oCMenu.level[1].height=16
oCMenu.level[1].regClass="clLevel1"
oCMenu.level[1].overClass="clLevel1over"
oCMenu.level[1].borderX=1
oCMenu.level[1].borderY=1
oCMenu.level[1].align="right" 
oCMenu.level[1].offsetX=-(oCMenu.level[0].width-2)/2+50
oCMenu.level[1].offsetY=0
oCMenu.level[1].borderClass="clLevel1border"
oCMenu.level[1].arrow="images/menu_arrow.gif"
oCMenu.level[1].arrowWidth=10
oCMenu.level[1].arrowHeight=9
oCMenu.level[1].zIndex=5

//EXAMPLE SUB LEVEL[2] PROPERTIES - You have to spesify 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=oCMenu.level[1].width
oCMenu.level[2].height=16
oCMenu.level[2].offsetX=-(oCMenu.level[1].width-2)/2
oCMenu.level[2].offsetY=0
oCMenu.level[2].regClass="clLevel2"
oCMenu.level[2].overClass="clLevel2over"
oCMenu.level[2].borderClass="clLevel2border"
oCMenu.level[2].arrow="images/menu_arrow.gif"
oCMenu.level[2].arrowWidth=10
oCMenu.level[2].arrowHeight=9
oCMenu.level[2].zIndex=50

/******************************************
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','','HOME','index.asp','','75')

oCMenu.makeMenu('top1','','EQUOTE','','','90')
	oCMenu.makeMenu('sub0','top1','CAR & HOME INSURANCE','equote.asp','','150')
	oCMenu.makeMenu('sub1','top1','LIFE INSURANCE','lifequote.asp','','150')
	
oCMenu.makeMenu('top2','','INFO','','','72')
	oCMenu.makeMenu('sub20','top2','COMPANY PROFILE','company-profile.asp','','150')
	oCMenu.makeMenu('sub21','top2','POLICY BOOKS','','_blank','150')
		oCMenu.makeMenu('sub210','sub21','CAR & HOME INSURANCE','docs/ffwpolicybook.pdf','_blank','150')
		oCMenu.makeMenu('sub211','sub21','LIFE INSURANCE','docs/FFWLifepolicybook.pdf','_blank','150')
	oCMenu.makeMenu('sub22','top2','ACCESS TO INFORMATION','information.htm','_blank','150')
	//oCMenu.makeMenu('sub24','top2','PICTURE GALLERY','gallery.asp','','150')
	//oCMenu.makeMenu('sub25','top2','TELEVISION ADVERT','tvad.asp','','150')
	oCMenu.makeMenu('sub26','top2','CONSUMER EDUCATION','tvad.asp','','150')
		oCMenu.makeMenu('sub212','sub26','SAIA EDUCATION PAMPHLET','docs/SAIA Pamphlet.pdf','_blank','150')
		oCMenu.makeMenu('sub213','sub26','SAIA EDUCATION BOOK','docs/SAIA Book.pdf','_blank','150')
	oCMenu.makeMenu('sub27','top2','BRAND HISTORY','brand_history.asp','','150')
	oCMenu.makeMenu('sub28','top2','SPONSORSHIPS','','','150')
		oCMenu.makeMenu('sub281','sub28','SPORT SPONSORSHIPS','sportsponsorship.asp','','150')
		oCMenu.makeMenu('sub282','sub28','LOUISE CARVER','louisecarver_signing.asp','','150')
		
oCMenu.makeMenu('top3','','CAR & HOME','','','105')
	oCMenu.makeMenu('sub31','top3','FAB FREE BENEFITS','fab-free-benefits.asp','','150')
		oCMenu.makeMenu('sub312','sub31','MEDICAL ASSIST','medical-assist.asp','','200')
		oCMenu.makeMenu('sub313','sub31','ROAD ASSIST','road-assist.asp','','200')
		oCMenu.makeMenu('sub314','sub31','TRAUMA ASSIST','trauma-assist.asp','','200')
		oCMenu.makeMenu('sub315','sub31','HOME ASSIST','home-assist.asp','','200')
		oCMenu.makeMenu('sub316','sub31','LEGAL ASSIST','legal-assist.asp','','200')
		oCMenu.makeMenu('sub311','sub31','ENTERTAINMENT ASSIST','entertainment-assist.asp','','200')
		oCMenu.makeMenu('sub317','sub31','EXPO-SURE','value_AP_life.asp','','200')
	oCMenu.makeMenu('sub32','top3','CAR','','','150')
		oCMenu.makeMenu('sub321','sub32','COMPREHENSIVE COVER','comprehensive-car-insurance.asp','','200')
		oCMenu.makeMenu('sub322','sub32','THIRD PARTY, FIRE AND THEFT','third-party-fire-theft.asp','','200')
		oCMenu.makeMenu('sub323','sub32','THIRD PARTY ONLY','third-party-insurance.asp','','200')
		oCMenu.makeMenu('sub324','sub32','COMPREHENSIVE OFF ROAD','comprehensive-offroad-insurance.asp','','200')
	oCMenu.makeMenu('sub33','top3','HOME CONTENTS','home-content-insurance.asp','','150')
	oCMenu.makeMenu('sub34','top3','PORTABLE POSSESSIONS','portable-possession-insurance.asp','','150')
	oCMenu.makeMenu('sub35','top3','MOTORCYCLE','motorcycle-insurance.asp','','150')
	oCMenu.makeMenu('sub36','top3','CARAVAN','caravan-insurance.asp','','150')
	oCMenu.makeMenu('sub37','top3','TRAILER','trailer-insurance.asp','','150')
	oCMenu.makeMenu('sub38','top3','WATERCRAFT','watercraft-insurance.asp','','150')
	oCMenu.makeMenu('sub39','top3','BUILDING AND HOMES','building-insurance.asp','','150')
	oCMenu.makeMenu('sub310','top3','VALUE ADDED PRODUCTS','value-added-products.asp','','150')
		oCMenu.makeMenu('sub3101','sub310','PERSONAL ACCIDENT POLICY','personal-accident-plan.asp','','200')
		oCMenu.makeMenu('sub3102','sub310','PROTECTION PLAN','protection-plan.asp','','200')
		//oCMenu.makeMenu('sub3103','sub310','RETRENCHMENT PLAN','retrenchment-policy.asp','','200')
		oCMenu.makeMenu('sub3104','sub310','PREMIUM WAIVER PLAN','premium-waiver-plan.asp','','200')
		oCMenu.makeMenu('sub3105','sub310','POLISH UP','polish-up.asp','','200')
oCMenu.makeMenu('top4','','LIFE','lifeinsurance.asp','','80')	
	oCMenu.makeMenu('sub40','top4','CREDIT LIFE COVER','creditcov_life.asp','','150')
	oCMenu.makeMenu('sub41','top4','PURE LIFE COVER','purecov_life.asp','','150')
	oCMenu.makeMenu('sub42','top4','VALUE ADDED PRODUCTS','value_AP_life.asp','','150')
	oCMenu.makeMenu('sub43','top4','MEDICAL','medical_life.asp','','150')

oCMenu.makeMenu('top5','','BUSINESS','','','100')	
	oCMenu.makeMenu('sub50','top5','BUSINESS INSURANCE','business-insurance.asp','','150')
	oCMenu.makeMenu('sub51','top5','BUSINESS ASSIST','business-assist.asp','','150')
		oCMenu.makeMenu('sub511','sub51','PROFESSIONAL ASSIST','professional-assist.asp','','150')
		oCMenu.makeMenu('sub512','sub51','ROAD ASSIST','road-assist-business.asp','','150')
		oCMenu.makeMenu('sub513','sub51','OFFICE ASSIST','office-assist.asp','','150')
		oCMenu.makeMenu('sub514','sub51','MEDICAL ASSIST','medical-assist-business.asp','','150')

oCMenu.makeMenu('top6','','WE CARE','','','100')	
	oCMenu.makeMenu('sub60','top6','1ST FOR WOMEN TRUST','1st-for-women-trust.asp','','150')
	//oCMenu.makeMenu('sub51','top5','CHRISTMAS WISH LIST','christmaswish.asp','','150')
	oCMenu.makeMenu('sub61','top6','GUARDIAN ANGELS','guardian.asp','','150')
	oCMenu.makeMenu('sub62','top6','HUMAN TRAFFICKING','human_trafficking.asp','','150')


oCMenu.makeMenu('top8','','NEWS','','','75')
	oCMenu.makeMenu('sub80','top8','COMPETITIONS','','','160')
	//oCMenu.makeMenu('sub70','top7','WOMEN`S DAY','http://www.firstforwomen.co.za/womensday/welcome.asp','','180')		
	//oCMenu.makeMenu('sub801','sub80','O MAG COMPETITION','o.asp','','250')
	oCMenu.makeMenu('sub802','sub80','VALENTINES COMPETITION','feb2010comp/index.asp?vdn=6738','','250')
	//oCMenu.makeMenu('sub803','sub80','R20 000 FOR YOUR BOND TERMS & CONDITIONS','property_terms.asp','','250')
	oCMenu.makeMenu('sub804','sub80','CALENDAR COMPETITIONS TERMS & CONDITIONS','competition-terms.asp','','250')
		//oCMenu.makeMenu('sub711','sub71','O CALENDAR','o.asp','','180')	//oCMenu.makeMenu('sub712','sub71','MADONNA','http://www.firstforwomen.co.za/Madonna/index.asp?vdn=6620','_blank','180')
					
	oCMenu.makeMenu('sub81','top8','PRESS RELEASES','press-releases.asp','','160')
	oCMenu.makeMenu('sub82','top8','PREMIUM INCREASES','premium-increases.asp','','160')
	//oCMenu.makeMenu('sub72','top7','GUARDIAN ANGEL','guardian.asp','','150')
	oCMenu.makeMenu('sub83','top8','EVENTS','','','160')
	oCMenu.makeMenu('sub830','sub83','OPRAH YOU HAVE THE POWER EVENT','oprah.asp','','160')
	oCMenu.makeMenu('sub831','sub83','1ST FOR WOMEN NETWORKING','lifestyle_event.asp','','160')
	//oCMenu.makeMenu('sub832','sub83','1ST FOR WOMEN NETWORKING - NOVEMBER 09','lifestyle_event.asp','','240')
	oCMenu.makeMenu('sub833','sub83','SISTERS WITH BLISTERS 2009','swb_2009.asp','','160')
	//oCMenu.makeMenu('sub834','sub83','LOUISE CARVER SUMMER TOUR','LouiseCarver.asp','','160')
	//oCMenu.makeMenu('sub835','sub83','MOTHER’S DAY EVENT 2009','mothersday_2009.asp','','160')
	//oCMenu.makeMenu('sub84','top8','ARMY WIVES SPONSORSHIP','armywives.asp','','160')
	oCMenu.makeMenu('sub84','top8','PARTNERSHIPS','','','160')
	oCMenu.makeMenu('sub840','sub84','ALTECH NETSTAR','altech.asp','','160')
	//oCMenu.makeMenu('sub841','sub84','LINDSAY SAKER','lindsaysaker/new_car.html','_blank','160')
	

oCMenu.makeMenu('top9','','TALK TO US','','','105')
	oCMenu.makeMenu('sub90','top9','EXPERIENCE SURVEY','responsetek.asp','','115')
	oCMenu.makeMenu('sub91','top9','CONTACT US','','','115')
		oCMenu.makeMenu('sub910','sub91','CAR & HOME INSURANCE','contact.asp','','130')
		oCMenu.makeMenu('sub911','sub91','LIFE INSURANCE','contactus_life.asp','','130')
	oCMenu.makeMenu('sub92','top9','CLIENT SERVICES','client-services.asp','','115')
		oCMenu.makeMenu('sub920','sub92','CAR & HOME INSURANCE','client-services.asp','','130')
		oCMenu.makeMenu('sub921','sub92','LIFE INSURANCE','clientserv_life.asp','','130')
	oCMenu.makeMenu('sub93','top9','COMMENTS','feedback.asp','','115')
		oCMenu.makeMenu('sub930','sub93','ADD YOUR OWN','feedback.asp','','130')
		oCMenu.makeMenu('sub931','sub93','EXISTING','compliment.asp','','130')
	oCMenu.makeMenu('sub94','top9','FRAUD AND ETHICS','fraud_ethics.asp','','115')

oCMenu.makeMenu('top10','','EXISTING CLIENTS','existing_clients.asp','','125','','','','menu_exs','menu_exs_over') 
//oCMenu.makeMenu('sub100','top10','MANAGE MY POLICY','mypolicyintro.asp','','150') 
//oCMenu.makeMenu('sub101','top10','ONLINE CLAIMS','','','150') 
	//oCMenu.makeMenu('sub111','sub101','CAR & HOME INSURANCE','https://www.claimsnet.co.za/cofirstforw/','_blank','150')
	//oCMenu.makeMenu('sub112','sub101','LIFE INSURANCE','lifeclaims.asp','','150')
//Leave this line - it constructs the menu
oCMenu.construct()