//Browser Sniffing
//	var agt = navigator.userAgent.toLowerCase();
//	var is_major = parseInt(navigator.appVersion);
//	var is_minor = parseFloat(navigator.appVersion);

//Link and Home Rollover
function hOn(imgName){
	if (document.images){
		document[imgName].src = eval(imgName + "On.src");
	}
}

function hOff(imgName){
	if (document.images){
		document[imgName].src = eval(imgName + "Off.src");
	}
}

	
//Menu Vars
	var sectionmenu = new Array();
	var sectionovers = new Array();
	var sectionstatus = new Array();
		
//initialize the menu objects
	function init(){
//	alert("init");
		/*
		if(navigator.appName == "Netscape"){
			if (mnucolor == 'tan'){
				sectionmenu[1] = window.document.section1menu;
				sectionovers[1] = window.document.section1over;

				sectionmenu[2] = window.document.section2menu;
				sectionovers[2] = window.document.section2over;

				sectionmenu[3] = window.document.section3menu;
				sectionovers[3] = window.document.section3over;

				sectionmenu[4] = window.document.section4menu;
				sectionovers[4] = window.document.section4over;
			} else if (mnucolor == 'blue'){
				//About Us
				sectionmenu[1] = window.document.section1menu;
				sectionovers[1] = window.document.section1over;

				//Practice Groups
				sectionmenu[2] = window.document.section2menu;
				sectionovers[2] = window.document.section2over;

				//Attorneys
				sectionmenu[3] = window.document.section3menu;
				sectionovers[3] = window.document.section3over;

				//Announcements and Publications
				sectionmenu[4] = window.document.section4menu;
				sectionovers[4] = window.document.section4over;
			} //if blue
		}
		else{
		*/
			if (mnucolor == 'tan'){
				sectionmenu[1] = document.all.section1menu.style;			
				sectionovers[1] = document.all.section1over.style;

				sectionmenu[2] = document.all.section2menu.style;			
				sectionovers[2] = document.all.section2over.style;

				sectionmenu[3] = document.all.section3menu.style;			
				sectionovers[3] = document.all.section3over.style;

				sectionmenu[4] = document.all.section4menu.style;			
				sectionovers[4] = document.all.section4over.style;
			} else if (mnucolor == 'blue'){
				sectionmenu[1] = document.all.section1menu.style;			
				sectionovers[1] = document.all.section1over.style;

				sectionmenu[2] = document.all.section2menu.style;			
				sectionovers[2] = document.all.section2over.style;

				sectionmenu[3] = document.all.section3menu.style;			
				sectionovers[3] = document.all.section3over.style;

				sectionmenu[4] = document.all.section4menu.style;			
				sectionovers[4] = document.all.section4over.style;
			} //if mnucolor
		//}
		sectionstatus[1] = 'closed';
		sectionstatus[2] = 'closed';
		sectionstatus[3] = 'closed';
		sectionstatus[4] = 'closed';
	}//init

	// Sets the selected menu to visible
	function show(menunumber){
//alert('show: START');
		if(parseInt(navigator.appVersion) < 4){}
		else{
			if (sectionovers.length){
			  if(sectionovers[menunumber]){
						sectionovers[menunumber].visibility = 'visible';
						sectionovers[menunumber].zIndex = '310';
			  }
		  	sectionmenu[menunumber].visibility = 'visible';
		  	sectionmenu[menunumber].zIndex = '10';
		  	sectionstatus[menunumber] = 'open';
		  }
		}
	}//show
	
	// Clears all menus
	function menuhide(){
//alert('menuhide...');		
		clearmenus();

	  if(parseInt(navigator.appVersion) > 3){
	     for(i=1; i<sectionmenu.length; i++){
	        if(sectionovers[i] && sectionstatus[i] == 'open'){
	          if(sectionovers[i]){
	            sectionovers[i].visibility = 'hidden';
	            sectionovers[i].zIndex = '30';
	          }

	          sectionmenu[i].visibility = 'hidden';
	          sectionmenu[i].zIndex = '10';
	          sectionstatus[i] = 'closed';
	        }
				}
		}

	}//menuhide
	
	//image cache
	if(document.images){
		var blank = new Image();
		blank.src = "../images/clear.gif";
		if (mnucolor == 'tan'){
			//Link and Home Rollover
			var linkOn = new Image();
			linkOn.src = "../images/topnav/topnav_links_over5.jpg";
			var linkOff = new Image();
			linkOff.src = "../images/topnav/topnav_links_up_05.jpg";
			var homeOn = new Image();
			homeOn.src = "../images/topnav/topnav_home_over6.jpg";
			var homeOff = new Image();
			homeOff.src = "../images/topnav/topnav_home_up_06.jpg";
			
			
			//section 1 Announcement and Publications
			var section1_0 = new Image();
			section1_0.src = "../images/topnav/topnavup_04.jpg";	
			var section1_1 = new Image(); 
			section1_1.src = "../images/topnav/topnavover_04.jpg";	
		
			//menuovers
			/*
			var sub_1_1 = new Image();
			sub_1_1.src = "../images/topnav/dropdowns/section3/3caslatn.gif";
			var sub_1_2 = new Image();
			sub_1_2.src = "../images/topnav/dropdowns/section3/3issuestn.gif";
			*/
			var sub_1_3 = new Image();
			sub_1_3.src = "../images/topnav/dropdowns/section3/3newsrtn.gif";
		
			//section 2 Attorneys
			var section2_0 = new Image();
			section2_0.src = "../images/topnav/topnavup_03.jpg";	
			var section2_1 = new Image(); 
			section2_1.src = "../images/topnav/topnavover_03.jpg";		
		
			//menuovers
			var sub_2_1 = new Image();
			sub_2_1.src = "../images/topnav/dropdowns/section2/2sharetn.gif";
			var sub_2_2 = new Image();
			sub_2_2.src = "../images/topnav/dropdowns/section2/2ofcoutn.gif";
			var sub_2_3 = new Image();
			sub_2_3.src = "../images/topnav/dropdowns/section2/2srasstn.gif";
			var sub_2_4 = new Image();
			sub_2_4.src = "../images/topnav/dropdowns/section2/2assotn.gif";
			var sub_2_5 = new Image();
			sub_2_5.src = "../images/topnav/dropdowns/section2/2paratn.gif"; 
			var sub_2_6 = new Image();
			sub_2_6.src = "../images/topnav/dropdowns/section2/2mgttn.gif"; 
		
			//section 3  Practice Groups
			var section3_0 = new Image();
			section3_0.src = "../images/topnav/topnavup_02.jpg";	
			var section3_1 = new Image(); 
			section3_1.src = "../images/topnav/topnavover_02.jpg";	
		
			//menuovers
			var sub_3_1 = new Image();
			sub_3_1.src = "../images/topnav/dropdowns/section1/1litpratn.gif";
			var sub_3_2_1 = new Image();
			sub_3_2_1.src = "../images/topnav/dropdowns/section1/1eoltn.gif";
			var sub_3_2 = new Image();
			sub_3_2.src = "../images/topnav/dropdowns/section1/1bustrtn.gif";
			var sub_3_3 = new Image();
			sub_3_3.src = "../images/topnav/dropdowns/section1/1prolitn.gif";
		
			//section 4 About Us
			var section4_0 = new Image();
			section4_0.src = "../images/topnav/topnavup_01.jpg";	
			var section4_1 = new Image(); 
			section4_1.src = "../images/topnav/topnavover_01.jpg";	
		
			//menuovers
			var sub_4_1 = new Image();
			sub_4_1.src = "../images/topnav/dropdowns/section4/4abouttn.gif";
			var sub_4_2 = new Image();
			sub_4_2.src = "../images/topnav/dropdowns/section4/4presmtn.gif";
			var sub_4_3 = new Image();
			sub_4_3.src = "../images/topnav/dropdowns/section4/4locattn.gif";
    	var sub_4_4 = new Image();
			sub_4_4.src = "../images/topnav/dropdowns/section4/4directn.gif";
			var sub_4_5 = new Image();
			sub_4_5.src = "../images/topnav/dropdowns/section4/4parkitn.gif";	
			var sub_4_6 = new Image();
			sub_4_6.src = "../images/topnav/dropdowns/section4/4careetn.gif";	

		} else if (mnucolor == 'blue'){
			//Link and Home Rollover
			
			var linkOff = new Image();
			linkOff.src = "../images/topnav/topnav_links_over5.jpg";
			var linkOn = new Image();
			linkOn.src = "../images/topnav/topnav_links_up_05.jpg";
			var homeOff = new Image();
			homeOff.src = "../images/topnav/topnav_home_over6.jpg";
			var homeOn = new Image();
			homeOn.src = "../images/topnav/topnav_home_up_06.jpg";

			//section 1 About Us 
			var section1_0 = new Image();
			section1_0.src = "../images/topnav/topnavover_01.jpg";	
			var section1_1 = new Image(); 
			section1_1.src = "../images/topnav/topnavup_01.jpg";	
		
			//menuovers
			var sub_1_1 = new Image();
			sub_1_1.src = "../images/topnav/dropdowns/section4/4aboutbl.gif";
			var sub_1_2 = new Image();
			sub_1_2.src = "../images/topnav/dropdowns/section4/4presmbl.gif";
			var sub_1_3 = new Image();
			sub_1_3.src = "../images/topnav/dropdowns/section4/4locatbl.gif";
			var sub_1_4 = new Image();
			sub_1_4.src = "../images/topnav/dropdowns/section4/4direcbl.gif";
			var sub_1_5 = new Image();
			sub_1_5.src = "../images/topnav/dropdowns/section4/4parkibl.gif";
			var sub_1_6 = new Image();
			sub_1_6.src = "../images/topnav/dropdowns/section4/4careebl.gif";
		
			//section 2  Practice Groups
			var section2_0 = new Image();
			section2_0.src = "../images/topnav/topnavover_02.jpg";	
			var section2_1 = new Image(); 
			section2_1.src = "../images/topnav/topnavup_02.jpg";	
		
			//menuovers
			var sub_2_1 = new Image();
			sub_2_1.src = "../images/topnav/dropdowns/section1/1litprabl.gif";
			var sub_2_2_1 = new Image();
			sub_2_2_1.src = "../images/topnav/dropdowns/section1/1eolbl.gif";
			var sub_2_2 = new Image();
			sub_2_2.src = "../images/topnav/dropdowns/section1/1bustrbl.gif";
			var sub_2_3 = new Image();
			sub_2_3.src = "../images/topnav/dropdowns/section1/1prolibl.gif";

			//section 3 Attorneys
			var section3_0 = new Image();
			section3_0.src = "../images/topnav/topnavover_03.jpg";	
			var section3_1 = new Image(); 
			section3_1.src = "../images/topnav/topnavup_03.jpg";	
		
			//menuovers
			var sub_3_1 = new Image();
			sub_3_1.src = "../images/topnav/dropdowns/section2/2sharebl.gif";
			var sub_3_2 = new Image();
			sub_3_2.src = "../images/topnav/dropdowns/section2/2ofcoubl.gif";
			var sub_3_3 = new Image();
			sub_3_3.src = "../images/topnav/dropdowns/section2/2srassbl.gif";
			var sub_3_4 = new Image();
			sub_3_4.src = "../images/topnav/dropdowns/section2/2assobl.gif";
			var sub_3_5 = new Image();
			sub_3_5.src = "../images/topnav/dropdowns/section2/2parabl.gif";
			var sub_3_6 = new Image();
			sub_3_6.src = "../images/topnav/dropdowns/section2/2mgtbl.gif";
		
			//section 4
			var section4_0 = new Image();
			section4_0.src = "../images/topnav/topnavover_04.jpg";	
			var section4_1 = new Image(); 
			section4_1.src = "../images/topnav/topnavup_04.jpg";	
		
			//menuovers
			/*
			var sub_4_1 = new Image();
			sub_4_1.src = "../images/topnav/dropdowns/section3/3caslabl.gif";
			var sub_4_2 = new Image();
			sub_4_2.src = "../images/topnav/dropdowns/section3/3issuesbl.gif";
			*/
			var sub_4_3 = new Image();
			sub_4_3.src = "../images/topnav/dropdowns/section3/3newsrbl.gif";
		}// if mnucolor
	}//image cache
	
	// Used to change the highlight on the top nav to the appropriate color
	function change(Name,Image,No,Msg) {


		return true;
	}//change		
	
	// Clears all top Nav highlights
	function clearmenus(){
		change('section1','section1_',0,0);
		change('section2','section2_',0,0);
		change('section3','section3_',0,0);
		change('section4','section4_',0,0);
	}

	// Turns the highlighted part of a menu to visible
	function imageover(imgname, divname){
//	alert('imageover');
		if(parseInt(navigator.appVersion) > 3){
			if(document.layers){ 
				eval("window.document." + divname + ".document['" + imgname + "'].src = " + imgname + ".src");
			}		
		  else eval("document['" + imgname + "'].src = " + imgname + ".src");
		}
		else{
		  if(navigator.appName == "Netscape"){
		    eval("document['imgmenu" + imgname + "'].src = menu" + imgname + ".src");
	      menustatus[imgname] = "open";
	    }
		}
	}

	// Turns off the highlighted part of a menu
	function imageoff(imgname, divname){
		if(parseInt(navigator.appVersion) > 3){
			if(document.layers){
				eval("window.document." + divname + ".document['" + imgname + "'].src = blank.src");
			}
			else eval("document['" + imgname + "'].src = blank.src");
	    }
	  else{
	    if(navigator.appName == "Netscape"){
		    eval("document['imgmenu" + imgname + "'].src = menu" + imgname + ".src");
	    }
	  }
	}//imageoff
	//menu hides
	function netscapehider(){
		menuhide(); 
	}

	function iehider(){
	  if(window.event.toElement && window.event.toElement.className != "menu") menuhide();
	}

		