var arrMenuItems = new Array()
arrMenuItems[0] = '<font size=1><a href="/firm/firm.asp" id=menuLink>Overview</a></font>'
arrMenuItems[1] = '<font size=1><a href="/firm/working.asp" id=menuLink>Working Here</a></font>'
arrMenuItems[2] = '<font size=1><a href="/firm/history.asp" id=menuLink>Firm History</a></font>'
arrMenuItems[3] = '<font size=1><a href="/firm/locations.asp" id=menuLink>Office Locations</a></font>'

var menuItemWidth = '125'
var menuItemHeight = '17'

var menuBackgroundColor = '#4C6D93'
var menuHighlightColor = '#1E564C'
var menuPadding = '1'


// Sends an e-mail when an error occurrs
function doError(errMessage,errURL,errLine) {
	return true;
}
window.onerror = doError

// the rotateMainGraphic() function uses constructs available only in NS4+ and IE4+
var strAppName = navigator.appName
var intAppVersion = parseInt(navigator.appVersion)
var blnRotateCompat = false
if (strAppName == "Netscape" || strAppName == "Microsoft Internet Explorer")
	if (intAppVersion >= 4)
		blnRotateCompat = true

function WM_netscapeCssFix() {
  /*
    Source: Webmonkey Code Library
    (http://www.hotwired.com/webmonkey/javascript/code_library/)

    Author: Taylor
    Author Email: taylor@wired.com
    Author URL: http://www.taylor.org/
    */

  // This part was inspired by Matthew_Baird@wayfarer.com
  // It gets around another unfortunate bug whereby Netscape 
  // fires a resize event when the scrollbars pop up. This 
  // checks to make sure that the window's available size 
  // has actually changed.
  if (document.WM.WM_netscapeCssFix.initWindowWidth != window.innerWidth || document.WM.WM_netscapeCssFix.initWindowHeight != window.innerHeight) {
    document.location = document.location;
  }
}

function WM_netscapeCssFixCheckIn() {
  // This function checks to make sure the version of Netscape 
  // in use contains the bug; if so, it records the window's 
  // width and height and sets all resize events to be handled 
  // by the WM_netscapeCssFix() function.
  if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)) {
    if (typeof document.WM == 'undefined'){
      document.WM = new Object;
    }
    if (typeof document.WM.WM_scaleFont == 'undefined') {
      document.WM.WM_netscapeCssFix = new Object;
      document.WM.WM_netscapeCssFix.initWindowWidth = window.innerWidth;
      document.WM.WM_netscapeCssFix.initWindowHeight = window.innerHeight;
    }
    window.onresize = WM_netscapeCssFix;
  }
}

WM_netscapeCssFixCheckIn()


// Netscape 3.0 compatibility (image swapping)
                        compat = false;
                        if( parseInt( navigator.appVersion ) >= 3 ) {
                                compat = true; 
                        }
        
                // cache images 
                        if( compat )
									{
								l_home= new Image();
                                l_home.src = "/img/l_home.gif";
                                lo_home= new Image();
                                lo_home.src = "/img/lo_home.gif";	
								
								l_firm= new Image();
                                l_firm.src = "/img/l_firm.gif";
                                lo_firm= new Image();
                                lo_firm.src = "/img/lo_firm.gif";

								l_attorney= new Image();
                                l_attorney.src = "/img/l_attorney.gif";
                                lo_attorney= new Image();
                                lo_attorney.src = "/img/lo_attorney.gif";

								l_practice= new Image();
                                l_practice.src = "/img/l_practice.gif";
                                lo_practice= new Image();
                                lo_practice.src = "/img/lo_practice.gif";

								l_advisory= new Image();
                                l_advisory.src = "/img/l_advisory.gif";
                                lo_advisory= new Image();
                                lo_advisory.src = "/img/lo_advisory.gif";

								l_contact= new Image();
                                l_contact.src = "/img/l_contact.gif";
                                lo_contact= new Image();
                                lo_contact.src = "/img/lo_contact.gif";
								
								l_manhattan= new Image();
                                l_manhattan.src = "/img/offices/l_manhattan.gif";
                                lo_manhattan= new Image();
                                lo_manhattan.src = "/img/offices/lo_manhattan.gif";
								
								l_brooklyn= new Image();
                                l_brooklyn.src = "/img/offices/l_brooklyn.gif";
                                lo_brooklyn= new Image();
                                lo_brooklyn.src = "/img/offices/lo_brooklyn.gif";
								
								l_longisland= new Image();
                                l_longisland.src = "/img/offices/l_longisland.gif";
                                lo_longisland= new Image();
                                lo_longisland.src = "/img/offices/lo_longisland.gif";
								
								l_nj= new Image();
                                l_nj.src = "/img/offices/l_nj.gif";
                                lo_nj= new Image();
                                lo_nj.src = "/img/offices/lo_nj.gif";
								
																
								l_dc= new Image();
                                l_dc.src = "/img/offices/l_dc.gif";
                                lo_dc= new Image();
                                lo_dc.src = "/img/offices/lo_dc.gif";
                                
                                //Image swaps for side nav bar
                                a1= new Image();
                                a1.src = "/img/1a.jpg";
                                a2= new Image();
                                a2.src = "/img/2a.jpg";
                                a3= new Image();
                                a3.src = "/img/3a.jpg";
                                a4= new Image();
                                a4.src = "/img/4a.jpg";		
                                a5= new Image();
                                a5.src = "/img/5a.jpg";													
							    }
               // swap cached images
                        function swap(x, y) {
                                if( compat ) {
                                        document.images[x].src=eval(y+'.src');
                                }
                        } 
   
						
						
function writeMenus() {
	if (document.all) {
		document.write('<div id=outerMenu onMouseOut="hideMenu()" style="position:absolute; width:' + menuItemWidth + 'px; visibility:hidden; background-color:' + menuBackgroundColor + ';">')
		document.write('<table cellpadding=' + menuPadding + ' cellspacing=0 width=100%>')
		for (var i = 0; i < arrMenuItems.length; i++) {
			document.write('<tr><td onMouseOver="hiMenu(this)" onMouseOut="loMenu(this)">')
			document.write('<img src=/img/spacer.gif width=3 height=1>')
			document.write(arrMenuItems[i])
			document.write('</td></tr>')
		}
		document.write('</table>')
		document.write('</div>')
		
		document.write('<div id=imageSwitch style="position:absolute;width:66px;height:16px;visibility:hidden">')
		document.write('<a href="/firm/firm.asp">')
		document.write('<img src="/img/lo_firm.gif" width=125 height=21 alt="Our Firm" border="0">')
		document.write('</a>')
		document.write('</div>')
	}
	if (document.layers) {
		document.write('<layer name=outerMenu onMouseOut="hideMenu()"  width=' + menuItemWidth + ' visibility="hide">')
		document.write('<table width=100% cellpadding=2 cellspacing=0 bgColor=#' + menuBackgroundColor + '><tr><td>')
		for (var i = 0; i < arrMenuItems.length; i++) {
			document.write(arrMenuItems[i] + '<br>')
		}
		document.write('</td></tr></table>')
		document.write('</layer>')
		
		document.write('<layer name=imageSwitch width=66 height=16 visibility=hide>')
		document.write('<a href="/firm/firm.asp">')
		document.write('<img src="/img/lo_firm.gif" width=66 height=16 alt="Our Firm" border="0">')
		document.write('</a>')
		document.write('</layer>')
	}
}


function showMenuNS(e) {
	if (document.layers) {
		// move the menu
		document.outerMenu.left=e.pageX-e.layerX -1
		document.outerMenu.top=e.pageY-e.layerY+20
		// show the menu
		document.outerMenu.visibility = "show"
		
		// highlight the image
		document.imageSwitch.left = e.pageX-e.layerX
		document.imageSwitch.top = e.pageY-e.layerY
		document.imageSwitch.zIndex = 100
		document.imageSwitch.visibility = "show"
		
	}
}


function showMenuIE() {
	if (document.all) {
		// move the menu
		outerMenu.style.left=document.body.scrollLeft+event.clientX-event.offsetX -2
		outerMenu.style.top=document.body.scrollTop+event.clientY-event.offsetY+19
		// show the menu
		document.all.outerMenu.style.visibility = "visible"
		
		// highlight the image
		//document.images["firm"].src = lo_firm.src
		document.all.imageSwitch.style.left = document.body.scrollLeft+event.clientX-event.offsetX - 2
		document.all.imageSwitch.style.top = document.body.scrollTop+event.clientY-event.offsetY - 2
		document.all.imageSwitch.style.zIndex = 100
		document.all.imageSwitch.style.visibility = "visible"
	}
}


function hideMenu(strImgRef) {

	var isIn = false
	var i = 0

	if (document.all) {
		while (!isIn && i < outerMenu.all.length) {
			if (window.event.toElement == outerMenu.all[i])
				isIn = true
			i++
		}
		if (!isIn) {
			document.all.outerMenu.style.visibility = "hidden"
			// lowlight the image
			//document.images["firm"].src = eval(strImgRef + ".src")
			document.all.imageSwitch.style.visibility = "hidden"
		}
	}
	if (document.layers) {
		document.outerMenu.visibility = "hide"
		document.imageSwitch.visibility = "hide"
	}
}


function hiMenu(element) {

	if (document.all) 
		element.style.backgroundColor = menuHighlightColor
	if (document.layers) {
	}
}


function loMenu(element) {

	var isIn = false
	var i = 0

	if (document.all) {
		while (!isIn && i < element.all.length) {
			if (window.event.toElement == element.all[i])
				isIn = true
			i++
		}
		if (!isIn)
			element.style.backgroundColor = menuBackgroundColor
	}
	if (document.layers) {
	}
}


function writeMenuContextOpen() {
	if (document.all)
		document.write('<span id=menuContext style="position:relative; width:626px;">')
}


function writeMenuContextClose() {
	if (document.all)
		document.write('</span>')
}