/*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.ie||this.op7||this.usedom //Reuse layers
  this.px=this.dom&&!this.op5?"px":""
	return this
}
var bw=new cm_bwcheck()

//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
oCMenu.pxBetween=1
oCMenu.fromLeft=10
oCMenu.fromTop=155
oCMenu.rows=0
oCMenu.useBar=1
oCMenu.barWidth="menu"
oCMenu.barHeight="menu" 
oCMenu.barClass="clBar"
oCMenu.barX="menu"
oCMenu.barY="menu"
oCMenu.barBorderX=0
oCMenu.barBorderY=0
oCMenu.barBorderClass=""
oCMenu.menuPlacement='left'
oCMenu.onlineRoot="" 
oCMenu.resizeCheck=0
oCMenu.wait=300
oCMenu.fillImg="images/cm_fill.gif"
oCMenu.zIndex=0

oCMenu.level[0]=new cm_makeLevel() //Add this for each new level
oCMenu.level[0].width=160
oCMenu.level[0].height=20 
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].align="right"

oCMenu.level[1]=new cm_makeLevel() 
oCMenu.level[1].width=160
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].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('Home','','<img src="images/ball.gif" width="10" height="9">&nbsp;Home','index2.asp', 'frmMain', '', '', '', '', '', '' , '', '', '', '', 'window.status="Thackray Forensics Home"', 'window.status=""')
oCMenu.makeMenu('IR','','<img src="images/ball.gif" width="10" height="9">&nbsp;Incident Response','incident.asp', 'frmMain', '', '', '', '', '', '' , '', '', '', '', 'window.status="Thackray Forensics Incident Response"', 'window.status=""')
oCMenu.makeMenu('Services','','<img src="images/ball.gif" width="10" height="9">&nbsp;Services','services.asp', 'frmMain', '', '', '', '', '', '' , '', '', '', '', 'window.status="Thackray Forensics Services"', 'window.status=""')
oCMenu.makeMenu('sub10','Services','Computer/Electronic Investigative Support','services.asp#CompInvest','frmMain','','28', '', '', '', '' , '', '', '', '','window.status="Thackray Forensics Services"', 'window.status=""')
oCMenu.makeMenu('sub11','Services','Litigation Support','services.asp#Litigation','frmMain','','15', '', '', '', '' , '', '', '', '','window.status="Thackray Forensics Services"', 'window.status=""')
oCMenu.makeMenu('sub12','Services','Intellectual Property Support','services.asp#InterProp','frmMain','','15', '', '', '', '' , '', '', '', '','window.status="Thackray Forensics Services"', 'window.status=""')
oCMenu.makeMenu('sub13','Services','Forensic Document Management System','services.asp#FDMS','frmMain','','28', '', '', '', '' , '', '', '', '','window.status="Thackray Forensics Services"', 'window.status=""')
oCMenu.makeMenu('sub14','Services','Computer Forensic Training','training.asp','frmMain','','15', '', '', '', '' , '', '', '', '','window.status="Thackray Forensics Services"', 'window.status=""')
oCMenu.makeMenu('sub15','Services','Disaster Data Recovery','services.asp#DisasterRecov','frmMain','','15', '', '', '', '' , '', '', '', '','window.status="Thackray Forensics Services"', 'window.status=""')
oCMenu.makeMenu('sub16','Services','Password & Encryption Decoding','services.asp#EncDec','frmMain','','28', '', '', '', '' , '', '', '', '','window.status="Thackray Forensics Services"', 'window.status=""')
oCMenu.makeMenu('sub17','Services','System Sterilisation','services.asp#SysSterile','frmMain','','15', '', '', '', '' , '', '', '', '','window.status="Thackray Forensics Services"', 'window.status=""')
oCMenu.makeMenu('Products','','<img src="images/ball.gif" width="10" height="9">&nbsp;Products','products.asp', 'frmMain', '', '', '', '', '', '' , '', '', '', '', 'window.status="Thackray Forensics Products"', 'window.status=""')
oCMenu.makeMenu('News','','<img src="images/ball.gif" width="10" height="9">&nbsp;News','news.asp', 'frmMain', '', '', '', '', '', '' , '', '', '', '', 'window.status="Thackray Forensics News"', 'window.status=""')
oCMenu.makeMenu('Training','','<img src="images/ball.gif" width="10" height="9">&nbsp;Training','training.asp', 'frmMain', '', '', '', '', '', '' , '', '', '', '', 'window.status="Thackray Forensics Training"', 'window.status=""')
oCMenu.makeMenu('Projects','','<img src="images/ball.gif" width="10" height="9">&nbsp;Projects','projects.asp', 'frmMain', '', '', '', '', '', '' , '', '', '', '', 'window.status="Thackray Forensics Projects"', 'window.status=""')
oCMenu.makeMenu('Contact','','<img src="images/ball.gif" width="10" height="9">&nbsp;Contact','contact.asp', 'frmMain', '', '', '', '', '', '' , '', '', '', '', 'window.status="Thackray Forensics Contact"', 'window.status=""')
oCMenu.makeMenu('sub18','Contact','Email','mailto:services@thackray-forensics.co.nz','frmMain','','15', '', '', '', '' , '', '', '', '','window.status="Thackray Forensics Contact"', 'window.status=""')
oCMenu.makeMenu('sub19','Contact','Contact Form','contact.asp#contactform','frmMain','','15', '', '', '', '' , '', '', '', '','window.status="Thackray Forensics Contact"', 'window.status=""')
oCMenu.makeMenu('sub20','Contact','SMS','javascript: OpenSMSWindow();','frmMain','','15', '', '', '', '' , '', '', '', '','window.status="Thackray Forensics Contact"', 'window.status=""')
oCMenu.makeMenu('sub21','Contact','Snail Mail','contact.asp','frmMain','','15', '', '', '', '' , '', '', '', '','window.status="Thackray Forensics Contact"', 'window.status=""')



//Leave this line - it constructs the menu
oCMenu.construct()		
/*OPTIONAL LINE:
Because some browsers (especially our old friend NS4)
have problems with this initial frame load you might
want to add a line similar to this (replace MyFrameName
with the name of you frame):

top.frmMain.location.reload()

This will ensure that the menu is loaded when 
the first page is loaded in the main frame.

This also helps the resize problems in Opera and NS4
*/
top.frmMain.location.reload() 