
/*****************************************************************************
Copyright (c) 2001 Thomas Brattli (webmaster@dhtmlcentral.com)

DHTML coolMenus - Get it at coolmenus.dhtmlcentral.com
Version 4.0_beta
This script can be used freely as long as all copyright messages are
intact.

Extra info - Coolmenus reference/help - Extra links to help files ****
CSS help: http://192.168.1.31/projects/coolmenus/reference.asp?m=37
General: http://coolmenus.dhtmlcentral.com/reference.asp?m=35
Menu properties: http://coolmenus.dhtmlcentral.com/properties.asp?m=47
Level properties: http://coolmenus.dhtmlcentral.com/properties.asp?m=48
Background bar properties: http://coolmenus.dhtmlcentral.com/properties.asp?m=49
Item properties: http://coolmenus.dhtmlcentral.com/properties.asp?m=50
******************************************************************************/

/***
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=0
oCMenu.rows=1
oCMenu.menuPlacement=0

oCMenu.offlineRoot=""
oCMenu.onlineRoot=""
oCMenu.resizeCheck=1
oCMenu.wait=1000
oCMenu.fillImg="images/spacer.gif"
oCMenu.zIndex=0

//Background bar properties
oCMenu.useBar=0

//Level properties - ALL properties have to be spesified in level 1
oCMenu.level[0]=new cm_makeLevel() //Add this for each new level
oCMenu.level[0].width=150
oCMenu.level[0].height=29
oCMenu.level[0].regClass="clLevel1"
oCMenu.level[0].overClass="clLevel1over"
oCMenu.level[0].borderX=0
oCMenu.level[0].borderY=0
oCMenu.level[0].borderClass="clLevel1border"
oCMenu.level[0].offsetX=-1
oCMenu.level[0].offsetY=-1
oCMenu.level[0].rows=0
oCMenu.level[0].arrow=""
oCMenu.level[0].arrowWidth=0
oCMenu.level[0].arrowHeight=0
oCMenu.level[0].align="bottom"
oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Fade(duration=0.5)"


//Level properties - ALL properties have to be spesified in level 2
oCMenu.level[1]=new cm_makeLevel() //Add this for each new level
oCMenu.level[1].width=150
oCMenu.level[1].height=20
oCMenu.level[1].regClass="clLevel2"
oCMenu.level[1].overClass="clLevel2over"
oCMenu.level[1].borderX=1
oCMenu.level[1].borderY=1
oCMenu.level[1].borderClass="clLevel2border"
oCMenu.level[1].offsetX=-1
oCMenu.level[1].offsetY=-1
oCMenu.level[1].rows=0
oCMenu.level[1].arrow="images/skin2006/arrow.gif"
oCMenu.level[1].arrowWidth=15
oCMenu.level[1].arrowHeight=12
oCMenu.level[1].align="bottom"
oCMenu.level[1].filter="progid:DXImageTransform.Microsoft.Fade(duration=0.5)"


//Level properties - ALL properties have to be spesified in level 3
oCMenu.level[2]=new cm_makeLevel() //Add this for each new level
oCMenu.level[2].width=150
oCMenu.level[2].height=20
oCMenu.level[2].regClass="clLevel3"
oCMenu.level[2].overClass="clLevel3over"
oCMenu.level[2].borderX=1
oCMenu.level[2].borderY=1
oCMenu.level[2].borderClass="clLevel3border"
oCMenu.level[2].offsetX=-1
oCMenu.level[2].offsetY=-1
oCMenu.level[2].rows=0
oCMenu.level[2].arrow="images/skin2006/arrow.gif"
oCMenu.level[2].arrowWidth=15
oCMenu.level[2].arrowHeight=12
oCMenu.level[2].align="bottom"
oCMenu.level[2].filter="progid:DXImageTransform.Microsoft.Fade(duration=0.5)"


/******************************************
Menu item creation:
myCoolMenu.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout)
*************************************/


// Level1 (id=195) - Home (no parent)
oCMenu.makeMenu('1950','',"HOME",'index.cfm?fuseaction=home.main','_self','50','','','','','','bottom','','','','','')
oCMenu.makeMenu('1950195',"1950",'Home','index.cfm?fuseaction=home.main','_self','','','','','','','right','','','','','')
	
// Level1 (id=2) - About the Pelican (no parent)
oCMenu.makeMenu('20','',"ABOUT THE PELICAN",'about.html','_self','160','','','','','','bottom','','','','','')
oCMenu.makeMenu('202',"20",'About the Pelican','about.html','_self','','','','','','','right','','','','','')
	
	// Level2 (id=188) - Riviera Beach, Fla. 01/15/2006 (parent of Level1 (id=2) - About the Pelican)
	oCMenu.makeMenu('18802',"20",'Riviera Beach, Fla. 01/15/2006','index.cfm?fuseaction=pages.release','_self','','','','','','','right','','','','','')
		
	// Level2 (id=200) - Pelican Printing Blog (parent of Level1 (id=2) - About the Pelican)
	oCMenu.makeMenu('20002',"20",'Pelican Printing Blog','index.cfm?fuseaction=pages.blog','_self','','','','','','','right','','','','','')
		
	// Level2 (id=223) - Riviera Beach, Fla. 01/15/2006 (parent of Level1 (id=2) - About the Pelican)
	oCMenu.makeMenu('22302',"20",'Riviera Beach, Fla. 01/15/2006','index.cfm?fuseaction=pages.release','_self','','','','','','','right','','','','','')
		
	// Level2 (id=39) - Our Guarantee (parent of Level1 (id=2) - About the Pelican)
	oCMenu.makeMenu('3902',"20",'Our Guarantee','index.cfm?fuseaction=pages.guarantee','_self','','','','','','','right','','','','','')
		
	// Level2 (id=113) - Privacy Policy (parent of Level1 (id=2) - About the Pelican)
	oCMenu.makeMenu('11302',"20",'Privacy Policy','index.cfm?fuseaction=pages.privacy','_self','','','','','','','right','','','','','')
		
	// Level2 (id=80) - Site Map (parent of Level1 (id=2) - About the Pelican)
	oCMenu.makeMenu('8002',"20",'Site Map','sitemap.html','_self','','','','','','','right','','','','','')
		
// Level1 (id=3) - Products (no parent)
oCMenu.makeMenu('30','',"PRODUCTS",'index.cfm?fuseaction=pages.products','_self','90','','','','','','bottom','','','','','')
oCMenu.makeMenu('303',"30",'Products','index.cfm?fuseaction=pages.products','_self','','','','','','','right','','','','','')
	
	// Level2 (id=68) - Print Products (parent of Level1 (id=3) - Products)
	oCMenu.makeMenu('6803',"30",'Print Products','index.cfm?fuseaction=pages.products','_self','','','','','','','right','','','','','')
		
	// Level2 (id=81) - Design Services (parent of Level1 (id=3) - Products)
	oCMenu.makeMenu('8103',"30",'Design Services','design.html','_self','','','','','','','right','','','','','')
		
	// Level2 (id=190) - Commercial Printing (parent of Level1 (id=3) - Products)
	oCMenu.makeMenu('19003',"30",'Commercial Printing','commercial_printing.html','_self','','','','','','','right','','','','','')
		
	// Level2 (id=60) - Direct Mail Services (parent of Level1 (id=3) - Products)
	oCMenu.makeMenu('6003',"30",'Direct Mail Services','direct-mail.html','_self','','','','','','','right','','','','','')
		
	// Level2 (id=61) - Mailing Lists (parent of Level1 (id=3) - Products)
	oCMenu.makeMenu('6103',"30",'Mailing Lists','mailing-list.html','_self','','','','','','','right','','','','','')
		
	// Level2 (id=63) - Warehouse Mail Campaigns (parent of Level1 (id=3) - Products)
	oCMenu.makeMenu('6303',"30",'Warehouse Mail Campaigns','mail-campaigns.htm','_self','','','','','','','right','','','','','')
		
	// Level2 (id=64) - Billing Statement Mailing (parent of Level1 (id=3) - Products)
	oCMenu.makeMenu('6403',"30",'Billing Statement Mailing','billing.html','_self','','','','','','','right','','','','','')
		
	// Level2 (id=88) - Database Marketing (parent of Level1 (id=3) - Products)
	oCMenu.makeMenu('8803',"30",'Database Marketing','Database-Services.htm','_self','','','','','','','right','','','','','')
		
// Level1 (id=4) - Custom Quotes (no parent)
oCMenu.makeMenu('40','',"CUSTOM QUOTES",'custom-order.html','_self','130','','','','','','bottom','','','','','')
oCMenu.makeMenu('404',"40",'Custom Quotes','custom-order.html','_self','','','','','','','right','','','','','')
	
	// Level2 (id=143) - Contact Us (parent of Level1 (id=4) - Custom Quotes)
	oCMenu.makeMenu('14304',"40",'Contact Us','index.cfm?fuseaction=contactus.main','_self','','','','','','','right','','','','','')
		
// Level1 (id=112) - Sample Request (no parent)
oCMenu.makeMenu('1120','',"SAMPLE REQUEST",'index.cfm?fuseaction=samplerequest.sample','_self','140','','','','','','bottom','','','','','')
oCMenu.makeMenu('1120112',"1120",'Sample Request','index.cfm?fuseaction=samplerequest.sample','_self','','','','','','','right','','','','','')
	
// Level1 (id=159) - Techtips (no parent)
oCMenu.makeMenu('1590','',"TECHTIPS",'index.cfm?fuseaction=techtips.main','_self','90','','','','','','bottom','','','','','')
oCMenu.makeMenu('1590159',"1590",'Techtips','index.cfm?fuseaction=techtips.main','_self','','','','','','','right','','','','','')
	
	// Level2 (id=189) - Press Release - February, 14 (parent of Level1 (id=159) - Techtips)
	oCMenu.makeMenu('1890159',"1590",'Press Release - February, 14','index.cfm?fuseaction=pages.press2','_self','','','','','','','right','','','','','')
		
	// Level2 (id=94) - April 2005 Newsletter (parent of Level1 (id=159) - Techtips)
	oCMenu.makeMenu('940159',"1590",'April 2005 Newsletter','newsletter.html','_self','','','','','','','right','','','','','')
		
	// Level2 (id=206) - October 13, 2006 (parent of Level1 (id=159) - Techtips)
	oCMenu.makeMenu('2060159',"1590",'October 13, 2006','pages.press','_self','','','','','','','right','','','','','')
		
	// Level2 (id=108) - June 2005 - Newsletter (parent of Level1 (id=159) - Techtips)
	oCMenu.makeMenu('1080159',"1590",'June 2005 - Newsletter','newsletter0505','_self','','','','','','','right','','','','','')
		
	// Level2 (id=117) - August 2005 - Newsletter (parent of Level1 (id=159) - Techtips)
	oCMenu.makeMenu('1170159',"1590",'August 2005 - Newsletter','augnews.html','_self','','','','','','','right','','','','','')
		
	// Level2 (id=175) - December 05 Newsletter (parent of Level1 (id=159) - Techtips)
	oCMenu.makeMenu('1750159',"1590",'December 05 Newsletter','decnews.html','_self','','','','','','','right','','','','','')
		
	// Level2 (id=126) - Helpful Resources (parent of Level1 (id=159) - Techtips)
	oCMenu.makeMenu('1260159',"1590",'Helpful Resources','links.html','_self','','','','','','','right','','','','','')
		
	// Level2 (id=180) - Press Release - December 05 (parent of Level1 (id=159) - Techtips)
	oCMenu.makeMenu('1800159',"1590",'Press Release - December 05','pressrelease.html','_self','','','','','','','right','','','','','')
		

//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(1950)
  oCMenu.m["1950"].b.moveIt(pos[0],pos[1])
  
  pos = findPos(20)
  oCMenu.m["20"].b.moveIt(pos[0],pos[1])
  
  pos = findPos(30)
  oCMenu.m["30"].b.moveIt(pos[0],pos[1])
  
  pos = findPos(40)
  oCMenu.m["40"].b.moveIt(pos[0],pos[1])
  
  pos = findPos(1120)
  oCMenu.m["1120"].b.moveIt(pos[0],pos[1])
  
  pos = findPos(1590)
  oCMenu.m["1590"].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()"
