/*** 
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.
**/
//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=63
oCMenu.rows=1
oCMenu.menuPlacement=0
oCMenu.offlineRoot="file:///C|/Inetpub/wwwroot/osi/"
oCMenu.onlineRoot=""
oCMenu.resizeCheck=1
oCMenu.wait=300
oCMenu.fillImg="/images/cm_fill.gif"
oCMenu.zIndex=0

//Background bar properties
oCMenu.useBar=0

/******************************************
Level properties:
myCoolMenu.level[x]=new cm_makeLevel(width, height, regClass, overClass, borderX, borderY, borderClass, rows, align, offsetX, offsetY, arrow, arrowWidth, arrowHeight)
*************************************/
oCMenu.level[0]=new cm_makeLevel('',29,"clT","clTover",1,1,"clB",0,"bottom",0,0,0,0,0);
oCMenu.level[1]=new cm_makeLevel('',20,"clS","clSover",1,1,"clB",0,"right",0,0,0,0,0);

oCMenu.level[2]=new cm_makeLevel('',20,"clS2","clS2over");



/******************************************
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('m1','','About OSI','','',70);
	oCMenu.makeMenu('m86','m1','About OSI','/about/','',130);
	oCMenu.makeMenu('m10','m1','Company Overview','/about/overview.htm','',130);
	oCMenu.makeMenu('m11','m1','Mission Statement','/about/mission.htm','',130);
	oCMenu.makeMenu('m12','m1','People at OSI','/about/people.htm','',130);
	oCMenu.makeMenu('m13','m1','Opportunities at OSI','/about/opportunities.htm','',130);
	oCMenu.makeMenu('m14','m1','Locations','/about/locations.htm','',130);

oCMenu.makeMenu('m2','','Products &amp; Services','','',130);
	oCMenu.makeMenu('m81','m2','Products &amp; Services','/products/','',190);
	oCMenu.makeMenu('m20','m2','Advanced Training Technology','/products/training.htm','',190);	
	oCMenu.makeMenu('m21','m2','Information Technology','/products/it.htm','',190);
	oCMenu.makeMenu('m23','m2','Conference Management &amp; Support','/products/conference.htm','',190,29);
	oCMenu.makeMenu('m24','m2','Technical Training Support','/products/techtraining.htm','',190);
	oCMenu.makeMenu('m25','m2','Other Products &amp; Services','/products/other.htm','',190);

oCMenu.makeMenu('m3','','Contract Vehicles','','',110);


	oCMenu.makeMenu('m64','m3','Contract Vehicles','/contract/vehicles.htm','',190);
           oCMenu.makeMenu('m644','m64','Seaport Enhanced','/contract/seaport-e/','',190);
		   oCMenu.makeMenu('m645','m64','GSA Schedule','/contract/gsa.htm','',190);


	oCMenu.makeMenu('m37','m3','Doing Business with OSI','/contract/8a.htm','',190);

	oCMenu.makeMenu('m31','m3','Indian Incentive Program','/contract/indian.htm','',190);
	  oCMenu.makeMenu('m399','m31',' &nbsp; Overview','/contract/indian.htm','',200);
	  oCMenu.makeMenu('m39','m31',' &nbsp; Frequently Asked Questions','/contract/indianfaq.htm','',200);


	/*oCMenu.makeMenu('m30','m3','Mobis GSA Schedule','/contract/mobis.htm','',130);
	oCMenu.makeMenu('m31','m3','IT GSA Schedule','/contract/it.htm','',130);
	oCMenu.makeMenu('m32','m3','Capability Statement','/contract/capability.htm','',130);*/

oCMenu.makeMenu('m4','','Contact Us','/contact/','',70);

//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["m1"].b.moveIt(pos[0],pos[1])
  pos = findPos(1)
  oCMenu.m["m2"].b.moveIt(pos[0],pos[1])
  pos = findPos(2)
  oCMenu.m["m3"].b.moveIt(pos[0],pos[1])
  pos = findPos(3)
  oCMenu.m["m4"].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()"
