/*
for (initialization; condition; increment)
Many programmers continue this habit when writing JavaScript, 
but in general, semicolons are optional! 
However, semicolons are required if you want to put 
more than one statement on a single line. 

*/
var F= false;
//Main function
function InitailSlideDownMenu()
{
//Internal functions
	function RenderSlideDownMenu(Menu)
	{
		Menu.style.display = "none";
		Menu.SlidingBody = document.createElement("div");
		Menu.SlidingBody.style.clear ="both";
		//Menu.SlidingBody.style.border="solid 1px red"
		Menu.SlidingBody.style.position="absolute";
		Menu.SlidingBody.style.overflow="hidden";
		Menu.timer = new Object();

		var etagname =  Menu.getElementsByTagName("DT");
		var MenuTabBody = document.createElement("DIV");

		MenuTabBody.className = "SlideDown";
		MenuTabBody.Tabs = new Array();


		for(var i=0;i<etagname.length;i++)
		{
			var Tab = document.createElement("SPAN");
			Tab.className = "Tab";   
			Tab.innerHTML = "<LABEL>" + etagname[i].innerHTML +"</LABEL>";
				
			var Attributes = new Array("tabon","taboff","menuon","menuoff","menuover");
			for(var a=0;a<Attributes .length;a++)
				{
					if( Menu.getAttribute(Attributes[a])  ==null )
						{Menu.setAttribute(Attributes[a],"null")};
						eval("Menu." +Attributes[a].toUpperCase()+"= PM( Menu.getAttribute('"+Attributes[a]+"')) ");
				}
			Tab.style.backgroundImage = "url(" +  Menu.TABOFF.src + ")";
				
			Tab.onselectstart = function(){event.returnValue = false; return false;}
			Tab.onmouseover = TabMouseover;
			Tab.onmouseout = DetectMouseout;
				
			Tab.domouseout = TabMouseout;
			MenuTabBody.appendChild(Tab);
			RenderTabMenu(etagname[i],Tab);
			MenuTabBody.Tabs [MenuTabBody.Tabs.length] = Tab;
		}
			
		if(Menu.parentElement==null)
			{Menu.parentElement = Menu.parentNode};
		Menu.parentElement.insertBefore(MenuTabBody,Menu);  
		MenuTabBody.appendChild(Menu.SlidingBody);
		var W =0;
		for(var i=0;i<MenuTabBody.Tabs.length;i++)
			{W+=MenuTabBody.Tabs[i].offsetWidth};
		
		MenuTabBody.style.width = W+200;
//sub functions==========================================
			function RenderTabMenu(O,T)
			{
				var flaw=0;
				var TB = O;
				while( O )
				{ 
					O = O.nextSibling;
					if(O.tagName && O.tagName.toUpperCase() =="DD"){break;}
					flaw++;
					if(flaw>1){alert("<DD> not found");return;}
				}
				
				var OPS = O.getElementsByTagName("A");
				T.TabMenu = document.createElement("SPAN");
				T.TabMenu.className = "SlideDownTabMenu";
				T.TabMenu.style.display="none";
				T.TabMenu.Show = ShowTabMenu;
				T.TabMenu.Hide = HideTabMenu;
				T.TabMenu.Tab = T;
				
				var flag =true;
				for(var i=0;i< OPS.length;i++)
				{ 
					
					
				var mi = document.createElement("div");
				mi.className ="MenuItem";
					
					if(TB.getAttribute("default") =="true" &&  Menu.DefaultTab ==null)
					{   
						Menu.DefaultTab = T;
						if(Menu.TABON.error){ T.style.backgroundColor = "#eeeeee";}			
						T.style.backgroundImage = "url(" +  Menu.TABON.src + ")";	 
						
					}

				if((OPS[i].getAttribute("selected")=="true") && (flag==true))
				{ 
					flag =false;		  
					Menu.SelectedItem = mi  ;
					mi.style.backgroundImage = "url(" +  Menu.MENUON.src + ")";	 
				}
				else
				{ 
					mi.style.backgroundImage = "url(" +  Menu.MENUOFF.src + ")";	 };
					mi.url =  OPS[i].getAttribute("href");      
					mi.innerHTML = "<LABEL>" +  OPS[i].innerHTML + "</LABEL>";	
					mi.onmouseover = MenuItemMouseover;
					mi.onmouseout = DetectMouseout;
					mi.onclick = function(){location.href = this.url;};
					T.TabMenu.appendChild(mi);
				}
				Menu.SlidingBody.appendChild(T.TabMenu)
			}

			function DetectMouseout()
			{
				function CloseAllMenu()
				{  
					Menu.LastTab.domouseout();
					Menu.LastTab.TabMenu.Hide();		
					Menu.SlidingBody.style.height="0px";
					if( Menu.LastItem && Menu.LastItem.style)
					{
						if( Menu.MENUOFF.error)
						{ 
							Menu.LastItem.style.backgroundColor = "#dedede";
						}
						Menu.LastItem.style.backgroundImage = "url(" +  Menu.MENUOFF.src + ")";
					}
				}
				if( !isNaN(Menu.timer))
				{	
					clearTimeout(Menu.timer);
				};
				Menu.timer = setTimeout(CloseAllMenu,500);
			}

				

			function ShowTabMenu()
			{
			if( !isNaN(Menu.timer))
			{
				clearTimeout(Menu.timer);
			};
			this.style.display="";   
			this.style.left =  "0px";
			Menu.SlidingBody.style.top = this.Tab.offsetHeight;
			Menu.SlidingBody.style.width =  MenuTabBody.offsetWidth+300;
			Menu.SlidingBody.style.height = this.offsetHeight +5;
			Menu.SlidingBody.style.width = this.offsetWidth +5;
			Menu.SlidingBody.style.left =  this.Tab.offsetLeft +"px";

			if(this.opened==null)
			{
				this.opened = true;
				var EL = this;
				EL.timer =new Object();
				EL.style.top = -EL.offsetHeight;

				function SlideOut()
				{
					clearTimeout( EL.timer)
					if( parseInt( EL.style.top) <0 && EL.offsetHeight !=0)
					{ 
						clearTimeout( EL.timer)
						/*
						if( parseInt( EL.style.top) <0 && EL.offsetHeight !=0)
						{
							var alpha = 100 +   Math.floor ((parseInt(EL.style.top)/EL.offsetHeight)*100);
							EL.style.filter = "alpha(opacity=" + alpha +")";
						}		
						*/
							
						EL.style.top = Math.ceil( (0 - parseInt(EL.style.top) )/5 )+  parseInt(EL.style.top) ;
						EL.timer = setTimeout(SlideOut,10); 
					}
			else{EL.timer ==null ; 
				//EL.style.filter ="";
			}
		}
					EL.timer = setTimeout(SlideOut,0); 
			}
			}

			function HideTabMenu()
			{
			this.style.display="none";
			this.opened = null;
			}

			function PM(src)// PreloadImage
			{
				if(Menu.preloadImage ==null) {Menu.preloadImage  = new Object() };
				if(Menu.preloadImage[src]==null){
				Menu.preloadImage[src] = new Image();
				Menu.preloadImage[src].onerror = function(){this.error=true;}
				Menu.preloadImage[src].src = src; 
				
				}
				return Menu.preloadImage[src];
			}
				

			function TabMouseover()
			{
				if( !isNaN(Menu.timer)){clearTimeout(Menu.timer);};
				if(Menu.LastTab !=null && Menu.LastTab !=this )
				{
				Menu.LastTab.domouseout ();
				Menu.LastTab.TabMenu.Hide();
				Menu.LastTab.style.textDecoration="underline";
				if( Menu.MENUOFF.error){Menu.LastTab.style.backgroundColor = "white";}		
					
				}
				
				if(  Menu.TABON.error){this.style.backgroundColor = "#eeeeee";}		
				this.style.backgroundImage = "url(" +  Menu.TABON.src + ")";
				this.style.textDecoration="none";
				this.TabMenu.Show();
				Menu.LastTab = this;
			}

			function TabMouseout()
			{
				if(Menu.DefaultTab !=this)
				{ this.style.backgroundImage = "url(" +  Menu.TABOFF.src + ")";}
			}

			function  MenuItemMouseover()
			{
				clearTimeout(Menu.timer);
				if(Menu.SelectedItem != this)
				{
					if(Menu.LastItem !=null && Menu.LastItem !=this )
					{ 
						if(Menu.MENUOFF.error){ Menu.LastItem.style.backgroundColor = "#dedede";}
						Menu.LastItem.style.backgroundImage = "url(" +  Menu.MENUOFF.src + ")";
					}
					if(Menu.MENUOVER.error){  this.style.backgroundColor = "#eeeeee";}		
					this.style.backgroundImage = "url(" +  Menu.MENUOVER.src + ")";
					Menu.LastItem =this;	
				}
			}
			}
				
			function RenderPoorBrowser(Menu)
			{ 
				//nothing	 
			}
			//initialize menus================================
			var Menus  ; 
				

			if(document.all){Menus = document.all.tags("DL")}
			else{ Menus = document.getElementsByTagName("DL");};
				
			for(var i=0;i<Menus.length;i++)
			{
				if(  Menus[i].getAttribute("menutype") && Menus[i].getAttribute("menutype").toLowerCase()=="slidedown" )
				{ 
						if(  (window.navigator.appVersion .toUpperCase().indexOf("MSIE 4.0") >=0) || (window.opera!=null) || (window.navigator.platform.toLowerCase().indexOf("mac") >=0) )
						{RenderPoorBrowser(Menus[i]);}
						else{ RenderSlideDownMenu(Menus[i]); }
		}
				  
	}
}


if(window.attachEvent)
	{window.attachEvent("onload", InitailSlideDownMenu);}
else if(window.addEventListener)
	{window.addEventListener("load" ,InitailSlideDownMenu,true);}
else if(window.onload ==null)
	{window.onload = InitailSlideDownMenu;}

			var strText="";
			var intText=strText.length;
			var intSpeed=50;
			var intWidth=100;
			var intPos=1-intWidth;

		function scroll()
			{
			intPos++;
			var strScroll="";
			if (intPos==intText)
			{
			 intPos=1-intWidth;
			}
			if (intPos<0)
			{
			 for (var i=1; i<=Math.abs(intPos); i++)
			 {
			   strScroll=strScroll+" ";
			 }
			 strScroll=strScroll+strText.substring(0, intWidth-i+1);
			}
			else
			{
			strScroll=strScroll+strText.substring(intPos,intWidth+intPos);
			}
			window.status = strScroll;
			setTimeout("scroll()", intSpeed);
			}
		function maxWindow()
			{
				if (document.all)
				{
					top.window.resizeTo(screen.availWidth,screen.availHeight);
				}
				else if (document.layers||document.getElementById)
				{
				if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth)
				{
					top.window.outerHeight = screen.availHeight;
					top.window.outerWidth = screen.availWidth;
				}
				}
			}

		function doOver()
			{
			// Destination is the window - update status
				if (this.dest==window)
				{
					window.status = this.overValue
					return true
				}
				else if ((this.dest.type!=null) && ((this.dest.type=="text")
				|| (this.dest.type=="textarea")))
				this.dest.value = this.overValue
				else if (this.dest.src!=null)
				this.dest.src = this.overValue
				return true
			}

		function doOut()
			{
			  if (this.dest==window)
				window.status=""
			  else if (this.dest.type!=null)
				this.dest.value=this.dest.defaultValue
			  else if (this.dest.src)
				this.dest.src = this.dest.osrc
			}

		function OverEffect(src,dest,overValue)
			{
				src.onmouseover = doOver
				src.onmouseout = doOut
				src.dest = dest
				src.overValue= overValue
				if (dest.src!=null)
				{
					dest.osrc = dest.src
					var i = new Image()
					i.src = src.overValue
				}
			}

		function InitOverEffect(src,dest,overValue)
			{
			  OverEffect(src,dest,overValue)
			  return src.onmouseover()
			}
		function winSpawn(newURL)
			{
				win = window.open("", "_blank","height=580,width=780,left=0,top=0,resizable:yes,directories:no");
				win.location.href = newURL;
			}
<!--
var openMenu, svrDate, locDate, evtSDate, evtEDate;
function init() {
	openMenu = '';
	var cookies = document.cookie.split('; ');
	for (i = 0; i < cookies.length; i++) {
		var cookie = cookies[i].split('=');
		if (cookie[0] == 'openMenu') {
			if (cookie[1] == null) {
				openMenu = '';
			} else {
				openMenu = cookie[1];
			}
		}
	}
	if (openMenu != '') {
		openMenu = openMenu.split(',');
		for (i = 0; i < openMenu.length; i++) {
			document.getElementById(openMenu[i]).style.display = "";
                }
	} else {
		openMenu = Array('');
	}
}
function term() {
	document.cookie = "openMenu=" + openMenu.toString();
}
function addThing(menuid) {
	var add = true;
	if (openMenu[0] == '') {
		openMenu[0] = menuid;
	} else {
		for (i = 0; i < openMenu.length; i++) {
			if (openMenu[i] == menuid) {
				add = false;
			}
		}
		if (add) {
			openMenu[openMenu.length] = menuid;
		}
	}
}
function delThing(menuid) {
	var j = 0;
	var tempMenu = new Array();
	for (i = 0; i < openMenu.length; i++) {
		if (openMenu[i] != menuid) {
			tempMenu[j++] = openMenu[i];
		}
	}
	openMenu = tempMenu;
}
function DoBotMenu() {
  var redir = document.linkForm.link[document.linkForm.link.selectedIndex].value;
  if (redir != "-1") {
    document.location.href = redir;
  }
}
function DisplayMenu(Params){
  if (document.getElementById(Params).style.display == "") {
    document.getElementById(Params).style.display = "none";
    delThing(Params);
  } else {
    document.getElementById(Params).style.display = "";
    addThing(Params);
  }
}
function bookmark(){
  ie=(document.all) ? 1:0
  if(ie){ window.external.AddFavorite(location.href,document.title) }
}
function hint(params){
  if (params == null) {
    document.getElementById("hinttext").innerHTML = "";
  }else{
    document.getElementById("hinttext").innerHTML = "" + params;
  }
  window.status = params;
}
// Set the cookie
expireDate = new Date
expireDate.setMonth(expireDate.getMonth()+6)
function setCookie(params) {
		document.cookie = "qnav="+params+";expires=" + expireDate.toGMTString()
	}
function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}
function tmt_DivOnTop(theDiv){
	var t = 0;var z = (document.layers) ? ".zIndex" : ".style.zIndex";
	var fun = (document.getElementById) ? "document.getElementById" : "MM_findObj";
	var arr = (document.layers) ? document.layers : (document.all) ? document.all.tags("DIV") : document.getElementsByTagName("DIV");
	for(var i=0;i<arr.length;i++){var oz = eval("arr["+i+"]"+z);if(oz > t){t = oz;}}
	var obj = eval(fun+"(theDiv)");if(obj)eval(fun+"('"+theDiv+"')"+z+"=parseInt("+t+")+1");
	setCookie(theDiv)
}
var isIE4 = false;
	function CheckBrowser()
	{ if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.charAt(0) >= 4) { isIE4 = true; }}
	function mOvr(src,clrOver)
	{ if (!src.contains(event.fromElement)) { src.style.cursor = 'hand'; src.bgColor = clrOver; src.children.tags('A')[0].style.color = '#ffffff';}}
	function mOut(src,clrIn)
	{ if (!src.contains(event.toElement)) { src.style.cursor = 'default'; src.bgColor = clrIn;  src.children.tags('A')[0].style.color = '#ffffff';}}
	function mClk(src)
	{ if(event.srcElement.tagName=='TD'){src.children.tags('A')[0].click();} }
	function CreateWindow (file, name)
	{
	window.open(file, name,'toolbar=no, status=no, scrollbars=yes, location=no, menubar=no, resizable=no, directories=no, width=480, height=480, top=1, left=1');
	}


	function outliner () {
		oMe = window.event.srcElement
		//get child element
		var child = document.all[event.srcElement.getAttribute("child",false)];
		//if child element exists, expand or collapse it.
		if (null != child)
			child.className = child.className == "collapsed" ? "expanded" : "collapsed";
		}
	
	function changepic() {
		uMe = window.event.srcElement;
		var check = uMe.src.toLowerCase();
		if (check.lastIndexOf("reportplus.gif") != -1){
			uMe.src = "/images/reportMinus.gif"	}
		else			{
			uMe.src = "/images/reportPlus.gif"	}
		}
	function changefolder() {
		uMe = window.event.srcElement;
		var check = uMe.src.toLowerCase();
		if (check.lastIndexOf("folder-close.gif") != -1){
			uMe.src = "/images/folder-open.gif"	}
		else			{
			uMe.src = "/images/folder-close.gif"	}
		}
		
	// Spur's Image Swap Code	
	//function MM_preloadImages() { //v2.0	//	if (document.images) {	//		var imgFiles = MM_preloadImages.arguments;	//		if (document.preloadArray==null) document.preloadArray = new Array();	//		var i = document.preloadArray.length;	//		with (document) for (var j=0; j<imgFiles.length; j++) if (imgFiles[j].charAt(0)!="#"){	//		preloadArray[i] = new Image;	//		preloadArray[i++].src = imgFiles[j];	//	} }	//	}	//	function MM_swapImgRestore() { //v2.0	//	if (document.MM_swapImgData != null)	//		for (var i=0; i<(document.MM_swapImgData.length-1); i+=2)	//		document.MM_swapImgData[i].src = document.MM_swapImgData[i+1];	//	}	//	function MM_swapImage() { //v2.0	//	var i,j=0,objStr,obj,swapArray=new Array,oldArray=document.MM_swapImgData;	//	for (i=0; i < (MM_swapImage.arguments.length-2); i+=3) {	//		objStr = MM_swapImage.arguments[(navigator.appName == 'Netscape')?i:i+1];	//		if ((objStr.indexOf('document.layers[')==0 && document.layers==null) ||	//			(objStr.indexOf('document.all[')   ==0 && document.all   ==null))	//		objStr = 'document'+objStr.substring(objStr.lastIndexOf('.'),objStr.length);	//		obj = eval(objStr);	//		if (obj != null) {	//		swapArray[j++] = obj;	//		swapArray[j++] = (oldArray==null || oldArray[j-1]!=obj)?obj.src:oldArray[j];	//		obj.src = MM_swapImage.arguments[i+2];	//	} }	//	document.MM_swapImgData = swapArray; //used for restore	//	}
// Spur's Image Swap Code

	var preloaded = false;
      var preloaded_images = new Array;

      function roll_over(img, new_img)
      {
        if (document.images && preloaded)
        {
          document.images[img].src = preloaded_images[new_img].src;
        }
      }

      function load_image(src, name)
      {
        var i = new Image();
        i.src = src;
        preloaded_images[name] = i;
      }

      function preload_images()
      {
        load_image('../images/main_nav_01.gif', 'meetus_non_hover');
        load_image('../images/mainNav_on_01.gif', 'meetus_hover');
        load_image('../images/mainNav_off_02.gif', 'practicearea_non_hover');
        load_image('../images/mainNav_on_02.gif', 'practicearea_hover');
        load_image('../images/mainNav_on_03.gif', 'attorney_hover');
        load_image('../images/mainNav_off_03.gif', 'attorney_non_hover');
        load_image('../images/mainNav_on_04.gif', 'news_hover');
        load_image('../images/mainNav_off_04.gif', 'news_non_hover');
        load_image('../images/main_nav_05.gif', 'legal_non_hover');
        load_image('../images/mainNav_on_05.gif', 'legal_hover');
        load_image('../images/main_nav_06.gif', 'career_non_hover');
        load_image('../images/mainNav_on_06.gif', 'career_hover');
        preloaded = true;
      }

function winSpawn(newURL)
				{
					win = window.open("", "_blank","height=880,width=550,left=0,top=0,resizable:yes,directories:no");
					win.location.href = newURL;
				}	
				
			function expand(s)
			{
				var td = s;
				var d = document.getElementsByTagName("div").item(0);
				td.className = "menuHover";
				d.className = "menuHover";
			}	
			
			function collapse(s)
			{
				var td = s;
				var d = document.getElementsByTagName("div").item(0);
				td.className = "menuNormal";
				d.className = "menuNormal";
			}
			
			
			
function DisplayMail(Server, Login, Display){   
    if ((Display.length == 0) || (Display.indexOf('@')+1)) {   
    document.write('<a href=' + '"mai' + 'lto:' + Login + '@' + Server + '">' + Login + '@' + Server + '<\/a>'); }   
    else  {   
    document.write('<a href=' + '"mai' + 'lto:' + Login + '@' + Server + '">' + Display + '<\/a>'); }   
}   				