//Start of variables for correcting url//

var sCurrentPage;
var sSubLocation;
var sSubFolderPath;
var rootdir;
var imgdir;

//End of variables for correcting url//

//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

//Menu properties   
oCMenu.pxBetween=0
//Using the cm_page object to place the menu ----
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=0
oCMenu.menuPlacement=0                                                             
oCMenu.offlineRoot="" 
oCMenu.onlineRoot="" 
oCMenu.resizeCheck=1 
oCMenu.wait=1000 
oCMenu.fillImg="infographics.gif"
oCMenu.zIndex=0

//Background bar properties
oCMenu.useBar=0
oCMenu.barWidth="menu"
oCMenu.barHeight="menu" 
oCMenu.barClass="clBar"
oCMenu.barX=0
oCMenu.barY=0
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=200
oCMenu.level[0].height=33
oCMenu.level[0].regClass="clLevel0"
oCMenu.level[0].overClass="clLevel0over"
oCMenu.level[0].borderX=0
oCMenu.level[0].borderY=0
oCMenu.level[0].borderClass="clLevel0border"
oCMenu.level[0].offsetX=200
oCMenu.level[0].offsetY=1
oCMenu.level[0].rows=0
oCMenu.level[0].arrow=0
oCMenu.level[0].arrowWidth=12
oCMenu.level[0].arrowHeight=12
oCMenu.level[0].align="middle"
//oCMenu.level[0].arrow=getLocation() + 'images/nav/pointer_white2.gif'

//dynamic effect (controllable for each level)
//oCMenu.level[0].clippx=2
//oCMenu.level[0].cliptim=2
//special animation filters (IE5.5+ only, controllable for each level)
//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Fade(duration=0.5)" 

//Other special animation filters (IE5.5+ only, controllable for each level)
//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Wheel(duration=0.5,spokes=5)"
//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Barn(duration=0.5,orientation=horizontal)"
//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Blinds(duration=0.5,bands=5)"
//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.CheckerBoard(duration=0.5)"
oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Fade(duration=0.5)"
//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.GradientWipe(duration=0.5,wipeStyle=0)"
//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Iris(duration=0.5,irisStyle=STAR)"
//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Iris(duration=0.5,irisStyle=CIRCLE)"
//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Pixelate(duration=0.5,maxSquare=40)"
//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Wheel(duration=0.5,spokes=5)"
//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.RandomDissolve(duration=0.5)"
//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Spiral(duration=0.5)"
//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Stretch(duration=0.5,stretchStyle=push)"
//oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Strips(duration=0.5,motion=rightdown)"


//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=oCMenu.level[0].width-4
oCMenu.level[1].width=200
oCMenu.level[1].height=18
oCMenu.level[1].regClass="clLevel1"
oCMenu.level[1].overClass="clLevel1over"
oCMenu.level[1].borderX=0
oCMenu.level[1].borderY=0
oCMenu.level[1].align="right" 
oCMenu.level[1].offsetX=0
oCMenu.level[1].offsetY=0
oCMenu.level[1].borderClass="clLevel1border"
//oCMenu.level[1].arrow=getLocation() + 'images/nav/p_m_n.gif'
//dynamic effect
//oCMenu.level[1].clippx=2
//oCMenu.level[1].cliptim=2
//special animation filters
oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Fade(duration=0.5)"


//EXAMPLE SUB LEVEL[2] PROPERTIES - You have to specify 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=200
oCMenu.level[2].height=18
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','','SOLUTIONS',getLocation() + 'solutions/index.htm')
	oCMenu.makeMenu('sub10','top1','INDEX',getLocation() + 'solutions/index.htm')
	oCMenu.makeMenu('sub11','top1','BUSINESS APPLICATIONS',getLocation() + 'solutions/applications/index.htm')
		oCMenu.makeMenu('sub110','sub11','INDEX',getLocation() + 'solutions/applications/index.htm')
		oCMenu.makeMenu('sub111','sub11','FLOSUITE',getLocation() + 'solutions/bpm/index.htm')
		oCMenu.makeMenu('sub112','sub11','FIREWATCH',getLocation() + 'solutions/competency/index.htm')
	oCMenu.makeMenu('sub12','top1','BESPOKE DEVELOPMENT',getLocation() + 'solutions/development/index.htm')
	oCMenu.makeMenu('sub13','top1','CUSTOMER LIST',getLocation() + 'solutions/customers/index.htm')
	oCMenu.makeMenu('sub14','top1','TESTIMONIALS',getLocation() + 'solutions/customers/testimonials.htm')
	
oCMenu.makeMenu('top2','','CASE STUDIES',getLocation() + 'casestudies/index.htm')
	oCMenu.makeMenu('sub21','top2','INDEX',getLocation() + 'casestudies/index.htm')
	oCMenu.makeMenu('sub22','top2','BPM & CASE MANAGEMENT',getLocation() + 'casestudies/bpm/index.htm')
		oCMenu.makeMenu('sub220','sub22','INDEX',getLocation() + 'casestudies/bpm/index.htm')
		oCMenu.makeMenu('sub221','sub22','McCANN FITZGERALD',getLocation() + 'casestudies/professional/McCann_FitzGerald.htm')
		oCMenu.makeMenu('sub224','sub22','ENERGY SUPPLIER',getLocation() + 'casestudies/professional/knowledge_management.htm')
		oCMenu.makeMenu('sub225','sub22','TODS MURRAY',getLocation() + 'casestudies/professional/tods_murray.htm')
		oCMenu.makeMenu('sub226','sub22','TURCAN CONNELL',getLocation() + 'casestudies/professional/turcan_connell.htm')
		oCMenu.makeMenu('sub227','sub22','UK RETAILER',getLocation() + 'casestudies/retail/retailuk.htm')
		oCMenu.makeMenu('sub228','sub22','GLOBAL FINANCIAL SERVICES',getLocation() + 'casestudies/finance/financial_services.htm')
		oCMenu.makeMenu('sub229','sub22','EMERGENCY SERVICES',getLocation() + 'casestudies/public/localgov.htm')
	oCMenu.makeMenu('sub23','top2','HR & ASSET MANAGEMENT',getLocation() + 'casestudies/hrm/index.htm')
		oCMenu.makeMenu('sub230','sub23','INDEX',getLocation() + 'casestudies/hrm/index.htm')
		oCMenu.makeMenu('sub231','sub23','WEST SUSSEX FIRE & RESCUE SERVICE',getLocation() + 'casestudies/public/westsussex_fire.htm')
		oCMenu.makeMenu('sub232','sub23','ROYAL BERKSHIRE FIRE & RESCUE SERVICE',getLocation() + 'casestudies/public/berkshire_fire.htm')
		oCMenu.makeMenu('sub233','sub23','NORFOLK FIRE & RESCUE SERVICE',getLocation() + 'casestudies/public/norfolk_fire.htm')
		
	oCMenu.makeMenu('sub24','top2','BESPOKE DEVELOPMENT',getLocation() + 'casestudies/bespoke/index.htm')
		oCMenu.makeMenu('sub240','sub24','INDEX',getLocation() + 'casestudies/bespoke/index.htm')
		oCMenu.makeMenu('sub241','sub24','SCOTTISH BORDERS COUNCIL',getLocation() + 'casestudies/public/scotborder_council.htm')
		oCMenu.makeMenu('sub242','sub24','EAST LOTHIAN COUNCIL',getLocation() + 'casestudies/public/east_lothian_council.htm')
		oCMenu.makeMenu('sub243','sub24','SCOTTISH POWER',getLocation() + 'casestudies/utilities/scottishpower.htm')
		oCMenu.makeMenu('sub244','sub24','NORTH SEA EXPLORATORY CO.',getLocation() + 'casestudies/utilities/northsea_exploratory.htm')
		oCMenu.makeMenu('sub245','sub24','UK MORTGAGE PROVIDER',getLocation() + 'casestudies/finance/mortgage_provider.htm')
		oCMenu.makeMenu('sub246','sub24','NORFOLK FIRE & RESCUE SERVICE',getLocation() + 'casestudies/public/norfolk_fire_share.htm')
		oCMenu.makeMenu('sub247','sub24','INTERNATIONAL ENERGY SUPPLIER',getLocation() + 'casestudies/professional/knowledge_management.htm')

oCMenu.makeMenu('top3','','COMPANY',getLocation() + 'company/index.htm')
	oCMenu.makeMenu('sub31','top3','INDEX',getLocation() + 'company/index.htm')
	oCMenu.makeMenu('sub32','top3','OVERVIEW',getLocation() + 'company/overview.htm')
	oCMenu.makeMenu('sub33','top3','LOCATION',getLocation() + 'company/locations.htm')
	oCMenu.makeMenu('sub34','top3','CONTACT',getLocation() + 'company/contact.htm')
	oCMenu.makeMenu('sub35','top3','ENQUIRY FORM',getLocation() + 'enquire/index.htm')
	oCMenu.makeMenu('sub36','top3','PARTNERS',getLocation() + 'company/partners.htm')
	oCMenu.makeMenu('sub37','top3','CAREERS',getLocation() + 'company/careers.htm')

//Start of code related to path name 
function getLocation()
{
	sLocation = location.pathname;
	
	if (sLocation.indexOf("infographics6") > 0) 
	{
		return "/infographics6/";
	}
	else 
	{
		return  "/";
	}
}

//End of code related to path name//


//Leave this line - it constructs the menu
oCMenu.construct()	
