/*Browsercheck object - we have to move this into the page to prevent an error in NS4*/
function cm_bwcheck(){
	//In theory we should use object detection, but this script needs work-arounds for almost every browser...
	this.ver=navigator.appVersion;
	this.agent=navigator.userAgent.toLowerCase();
	this.dom=document.getElementById?1:0;
	this.ns4=(!this.dom && document.layers)?1:0;
	this.op=window.opera;
	this.moz=(this.agent.indexOf("gecko")>-1 || window.sidebar);
	this.ie=this.agent.indexOf("msie")>-1 && !this.op;
	if(this.op){
		this.op5=(this.agent.indexOf("opera 5")>-1 || this.agent.indexOf("opera/5")>-1);
		this.op6=(this.agent.indexOf("opera 6")>-1 || this.agent.indexOf("opera/6")>-1);
		this.op7=this.dom&&!this.op5&&!this.op6; //So all higher opera versions will use it
	}else if(this.moz) {this.ns6 = 1;}
	else if(this.ie){
		this.ie4 = !this.dom && document.all;
  	this.ie5 = (this.agent.indexOf("msie 5")>-1);
  	this.ie55 = (this.ie5 && this.agent.indexOf("msie 5.5")>-1);
  	this.ie6 = this.dom && !this.ie4 && !this.ie5 && ! this.ie55;
	}
	this.mac=(this.agent.indexOf("mac")>-1);
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.op5 || this.op6 || this.op7);
    this.usedom= this.ns6||this.op7; //Use dom creation
    this.reuse = this.op7||this.usedom; //Reuse layers
    this.px=this.dom&&!this.op5?"px":"";
	return this;
}
var bw=new cm_bwcheck();
/***
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

//Netscape 4 - bug fix -
//maybe -stupid NS4 - objects are not handled correctly when
//the object creator is in a linked file
if(bw.ns4) { if(!oCMenu["makeMenu"] || !bw["ns4"]) { self.location.reload(); }}

//Frame properties
oCMenu.frames = 1;

//Menu properties
oCMenu.pxBetween=0;
oCMenu.fromLeft=0;
oCMenu.fromTop=0;
oCMenu.rows=0;
oCMenu.menuPlacement="left";

oCMenu.offlineRoot="file://///aimvalley-pdc/bizdev/common/External_web/";
oCMenu.onlineRoot="/";
oCMenu.resizeCheck=1;
oCMenu.wait=500;
oCMenu.fillImg="images/cm_fill.gif";
oCMenu.zIndex=1000;

//Background bar properties
oCMenu.useBar=0;
oCMenu.barWidth="100%";
oCMenu.barHeight="menu";
oCMenu.barClass="clBar";
oCMenu.barX=0;
oCMenu.barY=94;
oCMenu.barBorderX=0;
oCMenu.barBorderY=0;
oCMenu.barBorderClass="";

//Level properties - ALL properties have to be specified in level 0
oCMenu.level[0]=new cm_makeLevel(); //Add this for each new level
oCMenu.level[0].width=98;
oCMenu.level[0].height=22;
oCMenu.level[0].regClass="clLevel0";
oCMenu.level[0].overClass="clLevel0over";
oCMenu.level[0].borderX=1;
oCMenu.level[0].borderY=1;
oCMenu.level[0].borderClass="clLevel0border";
oCMenu.level[0].offsetX=0;
oCMenu.level[0].offsetY=0;
oCMenu.level[0].rows=0;
oCMenu.level[0].arrow=0;
oCMenu.level[0].arrowWidth=0;
oCMenu.level[0].arrowHeight=0;
oCMenu.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
oCMenu.level[1]=new cm_makeLevel(); //Add this for each new level (adding one to the number)
oCMenu.level[1].width=110;
oCMenu.level[1].height=20;
oCMenu.level[1].regClass="clLevel1";
oCMenu.level[1].overClass="clLevel1over";
oCMenu.level[1].borderX=1;
oCMenu.level[1].borderY=1;
oCMenu.level[1].align="right";
oCMenu.level[1].offsetX=0;
oCMenu.level[1].offsetY=0;
oCMenu.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
oCMenu.level[2]=new cm_makeLevel(); //Add this for each new level (adding one to the number)
oCMenu.level[2].width=100;
oCMenu.level[2].height=20;
oCMenu.level[2].offsetX=0;
oCMenu.level[2].offsetY=0;
oCMenu.level[2].regClass="clLevel2";
oCMenu.level[2].overClass="clLevel2over";
oCMenu.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)
*************************************/

oCMenu.makeMenu('top1','','Company','home.htm','body');
  oCMenu.makeMenu('sub10','top1','Structure','compstructure.htm','body');
    oCMenu.makeMenu('sub101','sub10','AimSys','comps.htm#Aimsys','body');
    oCMenu.makeMenu('sub102','sub10','AimBridges','comps.htm#AimBridges','body');
    oCMenu.makeMenu('sub103','sub10','AimCom','comps.htm#AimCom','body');
    oCMenu.makeMenu('sub104','sub10','AimVest','comps.htm#AimVest','body');
    oCMenu.makeMenu('sub105','sub10','Emnico Services','comps.htm#Emnico','body');    
    oCMenu.makeMenu('sub106','sub10','Investors','comps.htm#Investors','body');
  oCMenu.makeMenu('sub11','top1','Organization','organization.htm','body');

oCMenu.makeMenu('top3','','Services','services.htm','body');
  oCMenu.makeMenu('top31','top3','Development','dev.htm','body');
  oCMenu.makeMenu('top32','top3','Expertise','expertise.htm','body');
  oCMenu.makeMenu('top33','top3','Packet Processing','products/packet.htm','body');

oCMenu.makeMenu('top4','','Solutions','products.htm','body');
  oCMenu.makeMenu('sub40','top4','Optical Access','products/oad.htm','body');
    oCMenu.makeMenu('sub401','sub40','BX21','products/BX21_pb.htm','body');
    oCMenu.makeMenu('sub402','sub40','BX25','products/BX25_pb.htm','body');
    oCMenu.makeMenu('sub403','sub40','BX28','products/BX28_pb.htm','body');
  oCMenu.makeMenu('sub41','top4','TDMoP','products/tdmop.htm','body');
    oCMenu.makeMenu('sub411','sub41','AC2150','products/AC2150.htm','body');
    oCMenu.makeMenu('sub412','sub41','AC2380','products/AC2380.htm','body');
    oCMenu.makeMenu('sub413','sub41','White Paper','http://www.altera.com/literature/wp/wp-01049-reducing-cost-of-wireless-backhauling-through-circuit-emulation.pdf','_blank');
  oCMenu.makeMenu('sub42','top4','BX1000','products/BX1000_pb.htm','body');
  oCMenu.makeMenu('sub43','top4','MaxiMux','products/maximux.htm','body');  
  oCMenu.makeMenu('sub44','top4','ETHOS','products/ethos_pb.htm','body');
  oCMenu.makeMenu('sub45','top4','Matterhorn','products/matt_pb.htm','body');
  oCMenu.makeMenu('sub46','top4','Rosa','products/rosa_pb.htm','body');  
  oCMenu.makeMenu('sub47','top4','SFP-155E™','products/SFP_pb.htm','body');

oCMenu.makeMenu('top10','','Open Source','os.htm','body');

oCMenu.makeMenu('top5','','Partners','partners.htm','body');
  oCMenu.makeMenu('sub50','top5','Fujitsu','Fujitsu.htm','body');
  oCMenu.makeMenu('sub51','top5','ITT-Cannon','ITT.htm','body');
  oCMenu.makeMenu('sub52','top5','ADC-KRONE','ADC-KRONE.htm','body');
  oCMenu.makeMenu('sub53','top5','Altera','Altera.htm','body');
  oCMenu.makeMenu('sub54','top5','Neways','Neways.htm','body');

oCMenu.makeMenu('top6','','News','news/current.htm','body');
  oCMenu.makeMenu('sub60','top6','Recent','news/current.htm','body');
  oCMenu.makeMenu('sub61','top6','Archive','news/archive.htm','body');
  
oCMenu.makeMenu('top7','','Work@AimValley','working.htm','body');

oCMenu.makeMenu('top8','','Contact','contact.htm','body');
  oCMenu.makeMenu('sub80','top8','Route','route.htm','body');

oCMenu.makeMenu('top9','','Search','../cgi-bin/fetch.pl','body');


//Leave this line - it constructs the menu

oCMenu.construct();
parent.body.location.reload();
