var hBar = new ItemStyle(115, 0, '', 0, 0, '', '', '', '', '', '', null, null, 'hand', 'hand');
var subM = new ItemStyle(23, 0, '', 0, 3, '#E5E4DB', '#000000', 'lowText', 'highText', 'itemBorder', 'itemBorder', null, null, 'hand', 'default');

var pMenu = new PopupMenu('pMenu');
with (pMenu)
{
startMenu('root', false, 'window.page.elmPos("tnav").x', 'window.page.elmPos("tnav").y', 23, hBar, '', false);

if (isSection('who_we_are')) {
	with(addItem('<img src="/images/who_on.gif" width=115 height=23 border=0 alt="Who We Are" class="screenshow">', 'mWho', 'sm:')) onclick='window.location.href="/who_we_are/"';
} else {
	with(addItem('SWAP:<img src="/images/who_off.gif" width=115 height=23 border=0 alt="Who We Are" class="screenshow">^<img src="/images/who_on.gif" width=115 height=23 border=0 alt="Who We Are" class="screenshow">', 'mWho', 'sm:')) onclick='window.location.href="/who_we_are/"';
}

if (isSection('what_we_do')) {
	with(addItem('<img src="/images/what_on.gif" width=115 height=23 border=0 alt="What We Do" class="screenshow">', 'mWhat', 'sm:')) onclick='window.location.href="/what_we_do/"';
} else {
	with(addItem('SWAP:<img src="/images/what_off.gif" width=115 height=23 border=0 alt="What We Do" class="screenshow">^<img src="/images/what_on.gif" width=115 height=23 border=0 alt="What We Do" class="screenshow">', 'mWhat', 'sm:')) onclick='window.location.href="/what_we_do/"';
}

if (isSection('our_lawyers')) {
	with(addItem('<img src="/images/lawyers_on.gif" width=115 height=23 border=0 alt="Our Lawyers" class="screenshow">', 'mLawyers', 'sm:')) onclick='window.location.href="/our_lawyers/john_soby.asp"';
} else {
	with(addItem('SWAP:<img src="/images/lawyers_off.gif" width=115 height=23 border=0 alt="Our Lawyers" class="screenshow">^<img src="/images/lawyers_on.gif" width=115 height=23 border=0 alt="Our Lawyers" class="screenshow">', 'mLawyers', 'sm:')) onclick='window.location.href="/our_lawyers/john_soby.asp"';
}

if (isSection('careers')) {
	with(addItem('<img src="/images/careers_on.gif" width=115 height=23 border=0 alt="Careers" class="screenshow">', 'mCareers', 'sm:')) onclick='window.location.href="/contact_us/careers.asp"';
} else {
	with(addItem('SWAP:<img src="/images/careers_off.gif" width=115 height=23 border=0 alt="Careers" class="screenshow">^<img src="/images/careers_on.gif" width=115 height=23 border=0 alt="Careers" class="screenshow">', 'mCareers', 'sm:')) onclick='window.location.href="/contact_us/careers.asp"';
}

if (isSection('contact_us')) {
	with(addItem('<img src="/images/contact_on.gif" width=115 height=23 border=0 alt="Contact Us" class="screenshow">', 'mContact', 'sm:')) onclick='window.location.href="/contact_us/"';
} else {
	with(addItem('SWAP:<img src="/images/contact_off.gif" width=115 height=23 border=0 alt="Contact Us" class="screenshow">^<img src="/images/contact_on.gif" width=115 height=23 border=0 alt="Contact Us" class="screenshow">', 'mContact', 'sm:')) onclick='window.location.href="/contact_us/"';
}


startMenu('mWhat', true, 0, 23, 120, subM, '', false);
addItem('Family Law', '/what_we_do/index.asp', '');
addItem('ADR', '/what_we_do/ADR/index.asp', '');
addItem('Negotiation', '/what_we_do/ADR/negotiation.asp', '');
addItem('Litigation', '/what_we_do/ADR/litigation.asp', '');
addItem('Arbitration', '/what_we_do/ADR/arbitration.asp', '');
addItem('Mediation', '/what_we_do/ADR/mediation.asp', '');
addItem('Collaboration', '/what_we_do/ADR/collaboration.asp', '');
addItem('Legal Fees', '/what_we_do/legal_fees.asp', '');

startMenu('mLawyers', true, 0, 23, 200, subM, '', false);
addItem('John C. Soby Q.C.', '/our_lawyers/john_soby.asp', '');
addItem('Robert V.T. Boyden Q.C.', '/our_lawyers/robert_boyden.asp', '');
addItem('Elaine L. Lenz Q.C.', '/our_lawyers/elaine_lenz.asp', '');
addItem('Edward McCann', '/our_lawyers/edward_mccann.asp', '');
addItem('Tamasine I. Davies', '/our_lawyers/tamasine_davies.asp', '');
addItem('Rani W. Wong', '/our_lawyers/rani_wong.asp', '');
addItem('Christopher T. Tahn', '/our_lawyers/christopher_tahn.asp', '');
addItem('Gary D. Ellis', '/our_lawyers/gary_ellis.asp', '');
addItem('Leigh Sherry', '/our_lawyers/leigh_sherry.asp', '');
//addItem('Lawyer Name', '/our_lawyers/lawyer_name.asp', '');

//startMenu('mCareers', true, 0, 23, 130, subM, '', false);
//addItem('Careers', '/contact_us/careers.asp', '');

startMenu('mContact', true, 0, 23, 130, subM, '', false);
addItem('Parking/Hours', '/contact_us/', '');
addItem('Office Administration', '/contact_us/admin.asp', '');
}

page.elmPos=function(e,p)
{
 var x=0,y=0,w=p?p:this.win;
 e=e?(e.substr?(isNS4?w.document.anchors[e]:getRef(e,w)):e):p;
 if(isNS4){if(e&&(e!=p)){x=e.x;y=e.y};if(p){x+=p.pageX;y+=p.pageY}}
 else if (e && e.focus && e.href && this.MS && /Mac/.test(navigator.platform))
 {
  e.onfocus = new Function('with(event){self.tmpX=clientX-offsetX;' +
   'self.tmpY=clientY-offsetY}');
  e.focus();x=tmpX;y=tmpY;e.blur()
 }
 else while(e){x+=e.offsetLeft;y+=e.offsetTop;e=e.offsetParent}

 return{x:x,y:y};
}

function isSection(section)
{
	var isSection = null;
	if(document.location.pathname.indexOf("/" + section + "/") == 0)
	{
		isSection = true;
	}
	else
	{
		isSection = false;
	}
	return isSection;
}
