/*** 
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
oCMenu.frames = 0

//Menu properties   
oCMenu.pxBetween=0
if(bw.mac && bw.ie5){
oCMenu.fromLeft=0
oCMenu.fromTop=0
}else{
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=1 
oCMenu.menuPlacement="left"
                                                             
oCMenu.offlineRoot="file:///C|/Inetpub/wwwroot/dhtmlcentral/projects/coolmenus/examples/" 
oCMenu.onlineRoot="/" 
oCMenu.resizeCheck=1 
oCMenu.wait=0 
oCMenu.fillImg="cm_fill.gif"
oCMenu.zIndex=0

//Background bar properties
oCMenu.useBar=0
oCMenu.barWidth="100%"
oCMenu.barHeight="menu"
oCMenu.barClass="clBar"
oCMenu.barX=0 
oCMenu.barY=140
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=110 //define inline as each is needed to be different width.
oCMenu.level[0].height=26 
oCMenu.level[0].regClass="clLevel0" //defines the level 0 text.
oCMenu.level[0].overClass="clLevel0over" //defines the level 0 text.
oCMenu.level[0].borderX=0
oCMenu.level[0].borderY=0
oCMenu.level[0].borderClass=""//clLevel0border
oCMenu.level[0].offsetX=0
oCMenu.level[0].offsetY=0
oCMenu.level[0].rows=1
oCMenu.level[0].arrow=0
oCMenu.level[0].arrowWidth=0
oCMenu.level[0].arrowHeight=0
oCMenu.level[0].align="bottom" //defines direction of child level (eg level 1)

//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=150
oCMenu.level[1].height=24
oCMenu.level[1].regClass="clLevel1" //defines the level 1 text.
oCMenu.level[1].overClass="clLevel1over" //defines the level 1 text.
oCMenu.level[1].borderX=0
oCMenu.level[1].borderY=0
oCMenu.level[1].align="right"  //defines direction of child level (eg level 2)
oCMenu.level[1].offsetX=-(oCMenu.level[0].width-2)/2+20
oCMenu.level[1].offsetY=0
oCMenu.level[1].borderClass=""//clLevel1border

/******************************************
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('top1','','Home','index.html','','55','','','','','','','','','','')

oCMenu.makeMenu('top2','','About Us','about.html','','72','','','','','','','','','','')
	oCMenu.makeMenu('sub20','top2','&nbsp;Company Profile','profile.html','','','','','','','','','','','','')
	oCMenu.makeMenu('sub21','top2','&nbsp;Latest News','news.html','','','','','','','','','','','','')

oCMenu.makeMenu('top3','','Products &amp; Services','products.html','','131','','','','','','','','','','')
	oCMenu.makeMenu('sub30','top3','&nbsp;Weather/Solvent Resistant Labels','weatherresistant.html','','220','','','','','','','','','','')
	oCMenu.makeMenu('sub31','top3','&nbsp;Freezer Labels','freezer.html','','220','','','','','','','','','','')
	oCMenu.makeMenu('sub32','top3','&nbsp;Booklet Labels','booklet.html','','220','','','','','','','','','','')
	oCMenu.makeMenu('sub33','top3','&nbsp;Variable Information Labels','variableinfo.html','','220','','','','','','','','','','')
	oCMenu.makeMenu('sub34','top3','&nbsp;Laser Labels','laser.html','','220','','','','','','','','','','')
	oCMenu.makeMenu('sub35','top3','&nbsp;Over Stickers','overstickers.html','','220','','','','','','','','','','')
	oCMenu.makeMenu('sub36','top3','&nbsp;Full Colour Labels','fullcolour.html','','220','','','','','','','','','','')
	oCMenu.makeMenu('sub37','top3','&nbsp;Promotional Labels','promo.html','','220','','','','','','','','','','')
	oCMenu.makeMenu('sub38','top3','&nbsp;Barcode Labels','barcode.html','','220','','','','','','','','','','')	
	oCMenu.makeMenu('sub39','top3','&nbsp;Thermal Labels','thermaldirect.html','','220','','','','','','','','','','')	
	oCMenu.makeMenu('sub310','top3','&nbsp;Wine Labels','wine.html','','220','','','','','','','','','','')
	oCMenu.makeMenu('sub311','top3','&nbsp;Courier Tickets','courier.html','','220','','','','','','','','','','')		
	oCMenu.makeMenu('sub312','top3','&nbsp;Stock Labels','stock.html','','220','','','','','','','','','','')	
	oCMenu.makeMenu('sub313','top3','&nbsp;New Labels','New Products.html','','220','','','','','','','','','','')	

oCMenu.makeMenu('top4','','Quotes/Order Form','order.asp','','124','','','','','','','','','','')

oCMenu.makeMenu('top5','','Contact Us','contact.html','','79','','','','','','','','','','')
	oCMenu.makeMenu('sub50','top5','&nbsp;Sales and Technical Support','support.html','','185','','','','','','','','','','')
	oCMenu.makeMenu('sub51','top5','&nbsp;Employment Opportunities','employment.html','','185','','','','','','','','','','')
	oCMenu.makeMenu('sub52','top5','&nbsp;Xact Ideas','Ideas.html','','185','','','','','','','','','','')
	
oCMenu.makeMenu('top6','','Dairy Industry','dairy.html','','93','','','','','','','','','','')

oCMenu.makeMenu('top7','','Why Choose Xact?','whychoosexact.html','','122','','','','','','','','','','')
	oCMenu.makeMenu('sub70','top7','&nbsp;Xact Value Proposition','proposition.html','','','','','','','','','','','','','')
	oCMenu.makeMenu('sub71','top7','&nbsp;Testimonials','testimonials.html','','','','','','','','','','','','','')
    oCMenu.makeMenu('sub72','top7','&nbsp;Environmental Commitment','Environmentally Friendly.html','','','40','','','','','','','','','','')

//Leave this line - it constructs the menu
oCMenu.construct()