/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for Client menu 1
var menu1=new Array()
menu1[0]='<a href="/clients/introduction.html"><span>&raquo;</span> Introduction</a>'
menu1[1]='<a href="/businesschallenges/home.html"><span>&raquo;</span> Business Challenges</a>'
menu1[2]='<a href="/expertise/introduction.html"><span>&raquo;</span> M Squared Consultant Expertise</a>'
menu1[3]='<a href="/industries/home.html"><span>&raquo;</span> Industries</a>'
menu1[4]='<a href="/clients/process.html"><span>&raquo;</span> Our Process</a>'
menu1[5]='<a href="/clientprofile/ourclients.html"><span>&raquo;</span> Our Clients</a>'
menu1[6]='<a href="/consultantprofile/ourconsultants.html"><span>&raquo;</span> Our Consultants</a>'
menu1[7]='<a href="/clients/answers.html"><span>&raquo;</span> FAQ</a>'
menu1[8]='<a href="/capabilities.html"><span>&raquo;</span> Our Capabilities</a>'

//Contents for Consultants
var menu2=new Array()
menu2[0]='<a href="/consultants/introduction.html"><span>&raquo;</span> Introduction</a>'
menu2[1]='<a href="/consultants/join.html"><span>&raquo;</span> Join M Squared</a>'
menu2[2]='<a href="/consultants/partnership.html"><span>&raquo;</span> Our Partnership</a>'
menu2[3]='<a href="/businesschallenges/home.html"><span>&raquo;</span> Business Challenges</a>'
menu2[4]='<a href="/expertise/introduction.html"><span>&raquo;</span> M Squared Consultant Expertise</a>'
menu2[5]='<a href="/industries/home.html"><span>&raquo;</span> Industries</a>'
menu2[6]='<a href="/clientprofile/ourclients.html"><span>&raquo;</span> Our Clients</a>'
menu2[7]='<a href="/consultantprofile/ourconsultants.html"><span>&raquo;</span> Our Consultants</a>'
menu2[8]='<a href="/consultants/answers.html"><span>&raquo;</span> FAQ</a>'
menu2[9]='<a href="/news/briefings.html"><span>&raquo;</span> Consultant Briefings</a>'
menu2[10]='<a href="/capabilities.html"><span>&raquo;</span> Our Capabilities</a>'
menu2[11]='<a href="https://consultants.msquared.com/cfdocs/msquared/consultantlogin.cfm" target="_blank"><span>&raquo;</span> Consultant Login</a>'


//Contents About Menu
var menu3=new Array()
menu3[0]='<a href="/about/home.html"><span>&raquo;</span> About</a>'
menu3[1]='<a href="/about/history.html"><span>&raquo;</span> History</a>'
menu3[2]='<a href="/about/factsheet.html"><span>&raquo;</span> Fact Sheet</a>'
menu3[3]='<a href="/about/management.html"><span>&raquo;</span> Management</a>'
menu3[4]='<a href="/about/careers.html"><span>&raquo;</span> Careers</a>'
menu3[5]='<a href="/about/affiliates.html"><span>&raquo;</span> Affiliates</a>'
menu3[6]='<a href="/about/social.html"><span>&raquo;</span> Social Responsibility</a>'
menu3[7]='<a href="/about/privacy.html"><span>&raquo;</span> Privacy Policy</a>'
//menu3[8]='<a href="/about/feedback.html"><span>&raquo;</span> Feedback</a>'

//Contents for News Menu
var menu4=new Array()
menu4[0]='<a href="/news/introduction.html"><span>&raquo;</span> Introduction</a>'
//menu4[1]='<a href="/news/appearances.html"><span>&raquo;</span> Public Appearances</a>'
menu4[1]='<a href="/news/briefings.html"><span>&raquo;</span> Consultant Briefings</a>'
menu4[2]='<a href="/news/media.html"><span>&raquo;</span> Media Coverage</a>'
menu4[3]='<a href="/news/new_releases.html"><span>&raquo;</span> News Releases</a>'
menu4[4]='<a href="/news/articles.html"><span>&raquo;</span> Articles/Information</a>'
menu4[5]='<a href="/cnewsletter/introduction.html"><span>&raquo;</span> Insights&nbsp;Newsletter</a>'
menu4[6]='<a href="/blog/"><span>&raquo;</span> M Squared Blog</a>'
menu4[7]='<a href="/news/upcomingevents.html/"><span>&raquo;</span> Upcoming Events</a>'

var menuwidth='201px' //default menu width
var disappeardelay=0  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="no" //hide menu when user clicks within menu?
var menuborder='none' //menu border
var menupadding="12px" //menu padding
/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all
var dropmenuobj;
var dropmenuparagraph;

if (ie4||ns6)
document.write('<div id="dropmenudiv" class="hack" style="float:left;visibility:hidden;width:'+menuwidth+';padding-bottom:'+menupadding+';" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
	if (ie4||ns6)
	dropmenuobj.style.left=dropmenuobj.style.top="-500px"
	if (menuwidth!=""){
	dropmenuobj.widthobj=dropmenuobj.style
	dropmenuobj.widthobj.width=menuwidth
	}
	
	if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover"){
	obj.visibility=visible;
	if (dropmenuparagraph) dropmenuparagraph.style.visibility='hidden';
	}
	else if (e.type=="click"){
	obj.visibility=hidden;
	if (dropmenuparagraph) dropmenuparagraph.style.visibility='visible';
	}
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv;

if (dropmenuparagraph) dropmenuparagraph.style.visibility='visible';

dropmenuparagraph = obj;
while (dropmenuparagraph && dropmenuparagraph.tagName != 'P') {
	dropmenuparagraph = dropmenuparagraph.nextSibling;
}

populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
//delayhidemenu()
hidemenu();
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
hidemenu();
//delayhidemenu()
}

function hidemenu(e){
	if (ie4||ns6) {
		if (dropmenuobj) dropmenuobj.style.visibility="hidden";
		if (dropmenuparagraph) dropmenuparagraph.style.visibility="visible";
	}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

// Steve added this function to scroll window to top in client iframe area
function scrollToTop() {
	window.scrollTo(0,0);
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

