//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]
}

/* use only if you are dynamically positioning menu - this is not a great idea by the way */
//pos = findPos();


var oM=new makeCM("oM")
oM.pxBetween =0
//oM.fromTop=171
//oM.fromLeft=0

oM.fromLeft= 226;
oM.fromTop= 83;
//We also need to "re place" the menu on resize. So:
//oM.onresize="pos = findPos(); oM.fromLeft=pos[0]; oM.fromTop=pos[1]"


oM.menuPlacement="left"
oM.wait=600
oM.fillImg="spacer.gif"
oM.zIndex=100 
oM.resizeCheck=1 

oM.onlineRoot=""
oM.offlineRoot=""

oM.rows=1

//Background bar properties
oM.useBar=0
oM.barWidth="100%" 
oM.barHeight="menu"
oM.barX=0
oM.barY="menu"
oM.barClass="clBar" 
oM.barBorderX=0
oM.barBorderY=2
oM.barBorderClass="clB3"


//Level properties
//Syntax for fast creation (advanced users only)
//oM.level[1]=new cm_makeLevel(width,height,regClass,overClass,borderX,borderY,borderClass,rows,align,offsetX,offsetY,arrow,arrowWidth,arrowHeight)

oM.level[0]=new cm_makeLevel()
oM.level[0].width=77
oM.level[0].height=25
oM.level[0].regClass="clT" 
oM.level[0].overClass="clTover"  
oM.level[0].borderX=0
oM.level[0].borderY=0
oM.level[0].borderClass="clB2" 
oM.level[0].rows=0
oM.level[0].align="bottom"
oM.level[0].offsetX=0
oM.level[0].offsetY=0
oM.level[0].arrow=0
oM.level[0].arrowWidth=0
oM.level[0].arrowHeight=0


oM.level[1]=new cm_makeLevel()
oM.level[1].width=180
oM.level[1].height=30
oM.level[1].regClass="clS" 
oM.level[1].overClass="clSover" 
oM.level[1].borderX=0
oM.level[1].borderY=1
oM.level[1].borderClass="clB1"
oM.level[1].align="top"
oM.level[1].rows=1
oM.level[1].arrow="spacer.gif"
oM.level[1].arrowWidth=0
oM.level[1].arrowHeight=0



/******************************************
Menu item creation:
myCoolMenu.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout) 
*************************************/

oM.makeMenu('top0','','','#','','77','','images/nav/ivpa_web_03.gif','images/nav/ivpa_web_03_roll.gif');
	oM.makeMenu('sub00','top0','Who we are','whoweare.html');
	oM.makeMenu('sub01','top0','IVPA Governance','ivpagovernance.html');
	oM.makeMenu('sub02','top0','History','history.html');
	oM.makeMenu('sub03','top0','Our Principles and Practices','principles.html');
	oM.makeMenu('sub04','top0','Contact Us','contactus.html');
	oM.makeMenu('sub05','top0','Donate','donate.html');

oM.makeMenu('top1','','','#','','131','','images/nav/ivpa_web_04.gif','images/nav/ivpa_web_04_roll.gif');
	oM.makeMenu('sub10','top1','Why Volunteer Abroad','whyvolunteer.html');
	oM.makeMenu('sub11','top1','Personal Stories','personalstories.html');
	oM.makeMenu('sub12','top1','Selecting the "Right" Program','therightprogram.html');
	oM.makeMenu('sub13','top1','Questions to Ask your Program','askprogram.html');
	oM.makeMenu('sub14','top1','Why Pay to Volunteer','whypay.html');
	oM.makeMenu('sub15','top1','Fundraising Tips','fundtips.html');
	oM.makeMenu('sub16','top1','Preparing to Go','preptogo.html');
	oM.makeMenu('sub17','top1','While You\'re Abroad','whileabroad.html');
	oM.makeMenu('sub18','top1','Coming Home','cominghome.html');
	oM.makeMenu('sub19','top1','FAQs','faqs.html');

oM.makeMenu('top2','','','#','','113','','images/nav/ivpa_web_05.gif','images/nav/ivpa_web_05_roll.gif');
	oM.makeMenu('sub20','top2','Member List','memberlist.html');
	oM.makeMenu('sub21','top2','Search Members\' Programs','http://www.volunteerinternational.org/search.cfm#Search');


oM.makeMenu('top3','','','#','','113','','images/nav/ivpa_web_06.gif','images/nav/ivpa_web_06_roll.gif');
	oM.makeMenu('sub30','top3','Requirements','requirements.html');
	oM.makeMenu('sub31','top3','Membership Benefits and Dues','benefitsanddues.html');
	oM.makeMenu('sub32','top3','Join Now','joinnow.html');

oM.makeMenu('top4','','','#','','77','','images/nav/ivpa_web_07.gif','images/nav/ivpa_web_07_roll.gif');
    oM.makeMenu('sub40','top4','Volunteer Sites','volunteer_sites.html','','200');
	oM.makeMenu('sub41','top4','Fellowship, Scholarships, Funding','scholarships_funding.html','','200');
	oM.makeMenu('sub42','top4','Publications','publications.html','','200');
	oM.makeMenu('sub43','top4','International Job Links','int_jobs.html','','200');
	oM.makeMenu('sub44','top4','Other Resources','other_resources.html','','200');

oM.makeMenu('top5','','','','','47','','images/nav/ivpa_web_08.gif','images/nav/ivpa_web_08_roll.gif');
    oM.makeMenu('sub50','top5','Press Releases','press_releases.html','','200');
	oM.makeMenu('sub51','top5','In the News','in_the_news.html','','200');
	oM.makeMenu('sub52','top5','Press Kit','press_kit.html','','200');
	oM.makeMenu('sub53','top5','Blog','http://volunteerinternational.wordpress.com/','','200');

oM.construct();
