window.onerror = catcherror
window.onresize = startMenus
	
if( !imageRoot || imageRoot == null ) {
	var imageRoot = "" ;
}
	
function catcherror() {
	return true
}


var blnIsLoaded = false
var blnIsHome = false
var blnIsMac = false
var strPlatform = window.navigator.platform.toLowerCase()

if (strPlatform.indexOf("mac") > -1)
{ blnIsMac = true; }

var strLastMenu = ""

function showMenu(strMenu) {
		var objLayer
	
		hideMenu(strLastMenu)

		if (document.all) {
			objLayer = document.all[strMenu]
		}
		else if (document.getElementById) {
			objLayer = document.getElementById(strMenu)
		}
		else if (document.layers) {
			objLayer = getLayer(strMenu)
		}
		if(objLayer != null)
    {
        // show
        if (document.all) {
          //objLayer.style.visibility = "visible";
          objLayer.style.display = "block";
        }
        else if (document.getElementById) {
          objLayer.style.display = "block"
        }
        else if (document.layers) {
          if (parseFloat(navigator.appVersion) >= 4.08) {
            // move to position relative to image
            objImage = getImage("l_" + strMenu.substring(3, strMenu.length))
            intTop = getImagePageTop(objImage)
            intLeft = getImagePageLeft(objImage)
            objLayer.top = intTop + objImage.height
            objLayer.left = intLeft - 1
            
            // show
            objLayer.display = "block"
          }
        }
    } 
		strLastMenu = strMenu	
}



function hideMenu(strMenu) {
	//if (blnIsLoaded) {

		var objLayer
		var isIn = false
		var i = 0
		var blnIsFromFlash = false
		
		if (strMenu == "hideFromFlash")
			blnIsFromFlash = true

		if (strMenu == "" || blnIsFromFlash)
			strMenu = strLastMenu
		//alert(strMenu);
    	//objLayer = document.getElementById(strMenu)
		if (document.all) {
			objLayer = document.all[strMenu]
		}
		else if (document.getElementById) {
			objLayer = document.getElementById(strMenu)
		}
		else if (document.layers) {
			objLayer = getLayer(strMenu)
		}
		
    if(objLayer != null)
    {
		// hide
		if (document.all) {
		
			if (!blnIsFromFlash) {
			    
			    isIn= false;
			    if(window.event)
			    {
				    while (!isIn && i < document.all[strMenu].all.length) {
					    if (window.event.toElement == document.all[strMenu].all[i])
						    isIn = true
					    i++
				    }
				}
				if (!isIn) {
					//document.all[strMenu].style.visibility = "hidden"
					document.all[strMenu].style.display = "none";
				}
			}
			else {
				//document.all[strMenu].style.visibility = "hidden"
				document.all[strMenu].style.display = "none";
			}
		}
		else if (document.getElementById) {
			//objLayer.style.visibility = "hidden"
			objLayer.style.display = "none";
		}
		else if (document.layers) {
			if (parseFloat(navigator.appVersion) >= 4.08) {
				//objLayer.visibility = "hide"
				objLayer.display = "none";
			}
		}
	}
}


function showMenuZ(strMenu) {

//alert("Maureen wants to make out with Nick");
	//if (blnIsLoaded) {

		var objLayer

		//hideMenu(strLastMenu)

		if (document.all) {
			objLayer = document.all[strMenu]
		}
		else if (document.getElementById) {
			objLayer = document.getElementById(strMenu)
		}
		else if (document.layers) {
			objLayer = getLayer(strMenu)
		}
		if(objLayer != null)
    {
        // show
        if (document.all) {
          //objLayer.style.visibility = "visible";
          objLayer.style.display = "block";
        }
        else if (document.getElementById) {
          objLayer.style.display = "block"
        }
        else if (document.layers) {
          if (parseFloat(navigator.appVersion) >= 4.08) {
            // move to position relative to image
            objImage = getImage("l_" + strMenu.substring(3, strMenu.length))
            intTop = getImagePageTop(objImage)
            intLeft = getImagePageLeft(objImage)
            objLayer.top = intTop + objImage.height
            objLayer.left = intLeft - 1
            
            // show
            objLayer.display = "block"
          }
        }
    } 
		//strLastMenu = strMenu	
}



function startMenus() {
	// set that the document is loaded
	blnIsLoaded = true

	// position menu hiders for netscape 4
	if (document.layers) {
		if (parseFloat(navigator.appVersion) >= 4.08) {
			var objImage = getImage('l_lawfirm')
			var intTop = getImagePageTop(objImage)
			var intLeft = getImagePageLeft(objImage)
			
			document.leftHide.left = intLeft - 10
			document.leftHide.top = intTop
			
			document.topHide.left = intLeft - 10
			document.topHide.top = intTop - 10
			
			document.rightHide.left = intLeft + 240
			document.rightHide.top = intTop
		}
	}
	if (document.getElementById && navigator.appName == "Netscape") {
		document.onclick = handler
	}
}
function handler(e) {
	var objElement
	var blnIsIn = false
	
	objElement = e.target
	
	while(objElement.parentNode && !blnIsIn) {
		if (objElement.id != null && objElement.id != "" && objElement.id.substring(0, 3) == "div")
			blnIsIn = true
		objElement = objElement.parentNode
	}
	
	if (blnIsIn != true)
		hideMenu('')
}



/* Function that swaps images. */

function change(id, newSrc) {
    var theImage = FWFindImage(document, id, 0);
    if (theImage) {
        theImage.src = newSrc;
    }
}

/* Functions that track and set toggle group button states. */

function FWFindImage(doc, name, j) {
    var theImage = false;
    if (doc.images) {
        theImage = doc.images[name];
    }
    if (theImage) {
        return theImage;
    }
    if (doc.layers) {
        for (j = 0; j < doc.layers.length; j++) {
            theImage = FWFindImage(doc.layers[j].document, name, 0);
            if (theImage) {
                return (theImage);
            }
        }
    }
    return (false);
}






/******************************************************************************
* dhtmllib.js                                                                 *
*                                                                             *
* Copyright 1999 by Mike Hall.                                                *
* Web address: http://www.brainjar.com                                        *
* Last update: February 26, 2000.                                             *
*                                                                             *
* Provides basic functions for DHTML positioned elements which will work on   *
* both Netscape Communicator and Internet Explorer browsers (version 4.0 and  *
* up).                                                                        *
******************************************************************************/

// Determine browser.

var isMinNS4 = (navigator.appName.indexOf("Netscape") >= 0 &&
                parseFloat(navigator.appVersion) >= 4) ? 1 : 0;
var isMinIE4 = (document.all) ? 1 : 0;
var isMinIE5 = (isMinIE4 && navigator.appVersion.indexOf("5.") >= 0) ? 1 : 0;


//-----------------------------------------------------------------------------
// Layer utilities.
//-----------------------------------------------------------------------------

function getLayer(name) {

  if (document.layers)
    return findLayer(name, document);
  if (isMinIE4)
    return eval('document.all.' + name);
  return null;
}

function findLayer(name, doc) {

  var i, layer;

  for (i = 0; i < doc.layers.length; i++) {
    layer = doc.layers[i];
    if (layer.name == name)
      return layer;
    if (layer.document.layers.length > 0)
      if ((layer = findLayer(name, layer.document)) != null)
        return layer;
  }
  return null;
}

//-----------------------------------------------------------------------------
// Image utilities.
//-----------------------------------------------------------------------------

function getImage(name) {

  if (document.layers) {
    return findImage(name, document);
  }
  if (isMinIE4)
    return eval('document.all.' + name);
  return null;
}

function findImage(name, doc) {

  var i, img;

  for (i = 0; i < doc.images.length; i++)
    if (doc.images[i].name == name)
      return doc.images[i];
  for (i = 0; i < doc.layers.length; i++)
    if ((img = findImage(name, doc.layers[i].document)) != null) {
      img.container = doc.layers[i];
      return img;
    }
  return null;
}

function getImagePageLeft(img) {

  var x, obj;

  if (document.layers) {
    if (img.container != null)
      return img.container.pageX + img.x;
    else
      return img.x;
  }
  if (isMinIE4) {
    x = 0;
    obj = img;
    while (obj.offsetParent != null) {
      x += obj.offsetLeft;
      obj = obj.offsetParent;
    }
    x += obj.offsetLeft;
    return x;
  }
  return -1;
}

function getImagePageTop(img) {

  var y, obj;

  if (document.layers) {
    if (img.container != null)
      return img.container.pageY + img.y;
    else
      return img.y;
  }
  if (isMinIE4) {
    y = 0;
    obj = img;
    while (obj.offsetParent != null) {
      y += obj.offsetTop;
      obj = obj.offsetParent;
    }
    y += obj.offsetTop;
    return y;
  }
  return -1;
}


function changeto(highlightcolor, textcolor){
	source=event.srcElement
	if (source.tagName=="TR"|| source.tagName=="TABLE")
		return
		
	while(source.tagName!="TD")
		source=source.parentElement
		
	if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore") {
		source.style.backgroundColor=highlightcolor
		source.all["navA"].style.color = textcolor
	}
}

function changeback(originalcolor, textcolor){
	if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
		return
	if (event.toElement!=source && source.tagName=="TD") {
		source.style.backgroundColor=originalcolor
		source.all["navA"].style.color = textcolor
	}
}

function saveBookmark(CultureRoot){
	if(typeof(window['guid']) != "undefined" && typeof(window['type']) != "undefined")
		location.href = CultureRoot + "/SaveBookmark.aspx?guid=" + guid + "&type=" + type;
	else
		location.href = CultureRoot + "/SaveBookmark.aspx?link=" + escape(location.href) + "&title=" + escape(document.title);
}


var f;
function resizeField(dir, theField){
  
	f = theField;
    if (dir == 'max') {
        var charLen = 6.5;
        var wLen = 0;
        for(var i=0; i < theField.options.length; i++) {
            if (theField.options[i].text.length > wLen) {
                wLen = theField.options[i].text.length
            }
        }
        
        if(wLen > 70) 
			wLen = 70;        
			
		//theField.style.position = 'relative';        
        theField.style.width  = theField.getAttribute("width");
        
        var prevwidth;
        if(theField.getAttribute("width") == null)
			prevwidth = parseInt(theField.currentStyle.width);
		else
			prevwidth = theField.getAttribute("width");
        
		var newwidth = wLen*charLen;

        theField.style.position = 'absolute';
		
		if(prevwidth < newwidth){
       		theField.style.width = newwidth;       		
		}
		
		//theField.style.posRight = newwidth - prevwidth;
		theField.style.posRight = 0;
		
		
		
    } else {
        theField.style.position = 'relative';
        theField.style.width  = theField.getAttribute("width");
        theField.style.posRight = 0;
    }
}



function fnTrapKD(btnID, event){
btn = findObj(btnID);
 if (document.all){
  if (event.keyCode == 13){
   event.returnValue=false;
   event.cancel = true;
   window.setTimeout('btn.click()', 50);
  }
 }
 else if (document.getElementById){
  if (event.which == 13){
   event.returnValue=false;
   event.cancel = true;
   btn.focus();
   window.setTimeout('btn.click()', 50);
  }
 }
 else if(document.layers){
  if(event.which == 13){
   event.returnValue=false;
   event.cancel = true;
   btn.focus();
   window.setTimeout('btn.click()', 50);
  }
 }
}

function findObj(n, d) { 
	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=findObj(n,d.layers[i].document);
	if(!x && d.getElementById) 
		x=d.getElementById(n); 
	return x;
}


//==========================




/***********************************************
* dropdown CSS Menu script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var enableanchorlink=0 //Enable or disable the anchor link when clicked on? (1=e, 0=d)
var hidemenu_onclick=1 //hide menu when user clicks within menu? (1=yes, 0=no)

/////No further editting needed

var ie5=document.all
var ns6=document.getElementById&&!document.all

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){
if (ie5||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=0
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=ie5 && !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 topedge=ie5 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie5 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function showmenuObj(obj, e, dropmenuID){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
if (typeof dropmenuobj!="undefined") //hide previous menu
dropmenuobj.style.visibility="hidden"
clearhidemenu()
if (ie5||ns6){
obj.onmouseout=delayhidemenu
dropmenuobj=document.getElementById(dropmenuID)
if (hidemenu_onclick) dropmenuobj.onclick=function(){dropmenuobj.style.visibility='hidden'}
dropmenuobj.onmouseover=clearhidemenu
dropmenuobj.onmouseout=ie5? function(){ dynamichide(event)} : function(event){ dynamichide(event)}
showhide(dropmenuobj.style, e, "visible", "hidden")
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top= dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}
return clickreturnvalue()
}

function clickreturnvalue(){
if ((ie5||ns6) && !enableanchorlink) 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){
if (ie5&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function delayhidemenu(){
delayhide=setTimeout("dropmenuobj.style.visibility='hidden'",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}	

function MM_preloadImages() 
{ //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

// FUNCTIONS
function
lo(imgName) {
imgon = eval(imgName + "on.src");
document [imgName].src = imgon;
}
function
l(imgName) {
imgoff = eval(imgName + "off.src");
document [imgName].src = imgoff;
}
// END HIDING FROM OLDER BROWSERS -->
