<!--
// array for top main menu:
var arrTopMnu=new Array(
"images/mnu01_off.gif","images/mnu01_on.gif","home.shtml","Home",117,22,"hom",
"images/mnu02_off.gif","images/mnu02_on.gif","philosophy_effectivecreativity.shtml","Philosophy",117,22,"phi",
"images/mnu03_off.gif","images/mnu03_on.gif","experience_clients.shtml","Experience",117,22,"exp",
"images/mnu04_off.gif","images/mnu04_on.gif","employment_Careers.shtml","Employment",117,22,"empl",
"images/mnu05_off.gif","images/mnu05_on.gif","contact.asp","Contact Us",116,22,"con"
)
var step1=7


var menuact="";

// building the top main menu:
var arrTop_on = new Array;
var arrTop_off = new Array;
var j=0
var strTop=""
for (var i=0; i<arrTopMnu.length; i+=step1) {
	j=parseInt(i/step1)
	
	arrTop_on[j]=arrTopMnu[i+1]
	arrTop_off[j]=arrTopMnu[i]
	
	if (pageID==arrTopMnu[i+6]) strTop+='<IMG src="'+arrTopMnu[i+1]+'" width="'+arrTopMnu[i+4]+'" height="'+arrTopMnu[i+5]+'" border=0 alt="'+arrTopMnu[i+3]+'" title="'+arrTopMnu[i+3]+'" name="imgTop'+j+'">'
	else strTop+='<A href="'+arrTopMnu[i+2]+'" onmouseover="Swap('+j+',\'on\',\'imgTop\'); dropdownmenu(this, event, menu'+(j+1)+', \''+arrTopMnu[i+4]+'px\', '+j+');" onmouseout="Swap('+j+',\'off\',\'imgTop\'); delayhidemenu();"><IMG src="'+arrTopMnu[i]+'" width="'+arrTopMnu[i+4]+'" height="'+arrTopMnu[i+5]+'" border=0 alt="'+arrTopMnu[i+3]+'" title="'+arrTopMnu[i+3]+'" name="imgTop'+j+'"></A>'
}
//preloading top main menu images:
var imgTop_on = new Array;
var imgTop_off = new Array;
Preload("arrTop","imgTop",0);



// START: submenus
var menu1=new Array(
'<A href="home_background.shtml" class="topsubmenu">Background</A>',
'<A href="home_keymilestones.shtml" class="topsubmenu">Key Milestones</A>'
);
 
var menu2=new Array(
'<A href="philosophy_effectivecreativity.shtml" class="topsubmenu">Effective &nbsp;&nbsp;&nbsp;Creativity</A>',
'<A href="philosophy_addingvalue.shtml" class="topsubmenu">Adding Value</A>',
'<A href="philosophy_acompleteservice.shtml" class="topsubmenu">A Complete &nbsp;&nbsp;&nbsp;Service</A>'
);

var menu3=new Array(
'<A href="experience_clients.shtml" class="topsubmenu">Clients</A>',
'<A href="ac_london.shtml" class="topsubmenu">Case Histories</A>',
'<A href="testimonials.shtml" class="topsubmenu">Testimonials</A>'
);

var menu4=new Array(
'<A href="employment_Careers.shtml" class="topsubmenu">Careers</A>',
'<A href="employment_Opportunities.shtml" class="topsubmenu">Opportunities</A>',
'<A href="employment_Light_Relief.shtml" class="topsubmenu">Light Relief</A>'
);

var menu5=new Array(
'<A href="contact.asp" class="topsubmenu">Address</A>',
'<A href="contact_directions.shtml" class="topsubmenu">Directions</A>'
);
// END: submenus


var menuwidth='116' //default menu width
var menutop='125' //default menu top position
var menubgcolor='#E4E6E7'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?
 
 
 
/////No further editting needed

function WriteTopMenu(){
	document.write(strTop);
}

function WriteDivTopMenu(){
	if (ie4||ns6)
		document.write('<div id="dropmenudiv" style="position:absolute; top:0px;left:0px; visibility:hidden; width:'+menuwidth+'px; background-color:'+menubgcolor+'" 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=-500
	if (menuwidth!=""){
		dropmenuobj.widthobj=dropmenuobj.style
		dropmenuobj.widthobj.width=menuwidth
	}
	if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
		obj.visibility=visible
	else if (e.type=="click")
		obj.visibility=hidden
}
 
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 windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
		dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
		if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
			edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
	}
	return edgeoffset
}
 
function populatemenu(what){
	var arr=what; //current array for submenu
	var str=""
	if (arr.length>0) {
		str+='<table cellspacing="0" cellpadding="0" border="0"><tr><td class=SubmenuBorder>'
		str+='<table width="'+menuwidth+'" cellspacing="1" cellpadding="5" border="0">'
		for (i=0;i<arr.length;i++){
			str+='<tr><td valign="middle" class=Submenu><img src="images/spacer.gif" width="10" height="1">'+arr[i]+'</td></tr>'
		}
		str+='</table></td></tr></table>'
	}
	if (ie4||ns6) dropmenuobj.innerHTML=str; //what.join("")
}
 

function dropdownmenu(obj, e, menucontents, menuwidth, act){
	menuact=act;
	if (window.event)
		event.cancelBubble=true
	else if (e.stopPropagation)
		e.stopPropagation()
	clearhidemenu()
	dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
	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=menutop;
		//dropmenuobj.style.top=dropmenuobj.y-19-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){
	Swap(menuact,'off','imgTop');
	if (ie4&&!dropmenuobj.contains(e.toElement))
		delayhidemenu()
	else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
		delayhidemenu()
}
 
function hidemenu(e){
	if (typeof dropmenuobj!="undefined"){
		if (ie4||ns6) dropmenuobj.style.visibility="hidden"
	}
}
 
function delayhidemenu(){
	if (ie4||ns6) delayhide=setTimeout("hidemenu()",disappeardelay)
}
 
function clearhidemenu(){
	Swap(menuact,'on','imgTop');
	if (typeof delayhide!="undefined") clearTimeout(delayhide)
}
 
if (hidemenu_onclick=="yes") document.onclick=hidemenu
//-->
