//Extra code to find position:
function findPos(){
  if(bw.ns4){   //Netscape 4
    x = document.layers.prodMenu.pageX
    y = document.layers.prodMenu.pageY
  }else{ //other browsers
    x=13; y=3; var el,temp
    el = bw.ie4?document.all["prodMenu"]:document.getElementById("prodMenu");
    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
oCMenu2=new makeCM("oCMenu2") //Making the menu object. Argument: menuname

//Menu properties   
oCMenu2.pxBetween=2
//Using the cm_page object to place the menu ----
oCMenu2.fromLeft=pos[0]
oCMenu2.fromTop=pos[1]
//We also need to "re place" the menu on resize. So:
oCMenu2.onresize="pos = findPos(); oCMenu2.fromLeft=pos[0]; oCMenu2.fromTop=pos[1]"

oCMenu2.rows=0
oCMenu2.menuPlacement=0
                                                             
oCMenu2.offlineRoot="" 
oCMenu2.onlineRoot="" 
oCMenu2.resizeCheck=1 
oCMenu2.wait=1000 
oCMenu2.fillImg="images/cm_fill.gif"
oCMenu2.zIndex=0

//Background bar properties
oCMenu2.useBar=1
oCMenu2.barWidth="menu"
oCMenu2.barHeight="menu" 
oCMenu2.barClass="clBar"
oCMenu2.barX="menu"
oCMenu2.barY="menu"
oCMenu2.barBorderX=0
oCMenu2.barBorderY=0
oCMenu2.barBorderClass=""

//Level properties - ALL properties have to be spesified in level 0
oCMenu2.level[0]=new cm_makeLevel() //Add this for each new level
oCMenu2.level[0].width=105
oCMenu2.level[0].height=16 
oCMenu2.level[0].regClass="clLevel0"
oCMenu2.level[0].overClass="clLevel0over"
oCMenu2.level[0].borderX=1
oCMenu2.level[0].borderY=1
oCMenu2.level[0].borderClass="clLevel0border"
oCMenu2.level[0].offsetX=0
oCMenu2.level[0].offsetY=0
oCMenu2.level[0].rows=0
oCMenu2.level[0].arrow=0
oCMenu2.level[0].arrowWidth=0
oCMenu2.level[0].arrowHeight=0
oCMenu2.level[0].align="right"


//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
oCMenu2.level[1]=new cm_makeLevel() //Add this for each new level (adding one to the number)
oCMenu2.level[1].width=130
oCMenu2.level[1].height=18
oCMenu2.level[1].regClass="clLevel1"
oCMenu2.level[1].overClass="clLevel1over"
oCMenu2.level[1].borderX=1
oCMenu2.level[1].borderY=1
oCMenu2.level[1].align="right" 
oCMenu2.level[1].offsetX=-(oCMenu2.level[0].width-2)/2+20
oCMenu2.level[1].offsetY=0
oCMenu2.level[1].borderClass="clLevel1border"


//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
oCMenu2.level[2]=new cm_makeLevel() //Add this for each new level (adding one to the number)
oCMenu2.level[2].width=150
oCMenu2.level[2].height=20
oCMenu2.level[2].offsetX=0
oCMenu2.level[2].offsetY=0
oCMenu2.level[2].regClass="clLevel2"
oCMenu2.level[2].overClass="clLevel2over"
oCMenu2.level[2].borderClass="clLevel2border"


/******************************************
Menu item creation:
myCoolMenu.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout) 
*************************************/
oCMenu2.makeMenu('top20','','InstantVoice','/instantVoice.htm','')
  	oCMenu2.makeMenu('sub200','top20','InstantVoice','/instantVoice.htm')
  	oCMenu2.makeMenu('sub201','top20','InstantVoice PBX','/instantVoicePBX.htm')
	oCMenu2.makeMenu('sub202','top20','InstantVoice UM','/instantVoiceUM.htm')
	oCMenu2.makeMenu('sub203','top20','InstantVoice IVR','/instantVoiceIVR.htm')
	oCMenu2.makeMenu('sub204','top20','InstantVoice IP','/instantVoiceIP.htm')
	oCMenu2.makeMenu('sub205','top20','InstantVoice Billing','/instantVoiceBilling.htm')
	oCMenu2.makeMenu('sub206','top20','InstantVoice Connect','/instantVoiceConnect.htm')
	oCMenu2.makeMenu('sub207','top20','InstantVoice Recorder','/instantVoiceRecorder.htm')
	
oCMenu2.makeMenu('top21','','InstantFax','/instantFax.htm')
	
oCMenu2.makeMenu('top22','','InstantCall','/instantCall.htm')
		
oCMenu2.makeMenu('top23','','Instant IP Centrex','/instantIPCentrex.htm')

oCMenu2.makeMenu('top24','','Projetos Especiais','/projetosEspeciais.htm')

oCMenu2.makeMenu('top25','','Downloads','/downloads.htm')
	oCMenu2.makeMenu('sub250','top25','Produtos e Aplicacoes','/prod.htm')
	oCMenu2.makeMenu('sub251','top25','Artigos T&eacute;cnicos','/tec.htm')
	oCMenu2.makeMenu('sub252','top25','Manuais e Descritivos', '/doc.htm')
	oCMenu2.makeMenu('sub253','top25','Biblioteca tecnica', '/biblioteca.htm')

//Leave this line - it constructs the menu
oCMenu2.construct()
