window.onerror = catcherror
window.onresize = startMenus

function catcherror() {
	return true
}

function  SendMail(n,d){
	document.location.href='mailto:' + n + '@' + d;
}

function PrintMail(n,d,m,s){
	if(m == ""){
		m = n + '@' + d;
	}	
	document.write("<a id='" + s + "' href=\"JavaScript:SendMail('" + n + "','" + d + "'); \" onMouseOver=\"self.status='" + m + "'; return true;\" onMouseOut=\"self.status=''; return true;\">" + m + "</a>");
	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 = "about"

function showMenu(strMenu) {
	if (blnIsLoaded && !blnIsMac) {

		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)
		}
	
		// show
		if (document.all) {
			objLayer.style.visibility = "visible";
		}
		else if (document.getElementById) {
			objLayer.style.visibility = "visible"
		}
		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.visibility = "show"
			}
		}
	
		strLastMenu = strMenu
	}
}



function hideMenu(strMenu) {

	if (blnIsLoaded && !blnIsMac) {

		var objLayer
		var isIn = false
		var i = 0
		var blnIsFromFlash = false
		
		if (strMenu == "hideFromFlash")
			blnIsFromFlash = true
	
		if (strMenu == "" || blnIsFromFlash)
			strMenu = strLastMenu
	
		if (document.all) {
			objLayer = document.all[strMenu]
		}
		else if (document.getElementById) {
			objLayer = document.getElementById(strMenu)
		}
		else if (document.layers) {
			objLayer = getLayer(strMenu)
		}
	
		// hide
		if (document.all) {
			if (!blnIsFromFlash) {
				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"
				}
			}
			else {
				document.all[strMenu].style.visibility = "hidden"
			}
		}
		else if (document.getElementById) {
			objLayer.style.visibility = "hidden"
		}
		else if (document.layers) {
			if (parseFloat(navigator.appVersion) >= 4.08) {
				objLayer.visibility = "hide"
			}
		}
	}
}



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('')
}

if (document.images) {
l_home = new Image(); l_home.src = "/img/nav/l_home.gif";
lo_home = new Image(); lo_home.src = "/img/nav/lo_home.gif";
l_lawfirm = new Image(); l_lawfirm.src = "/img/nav/l_lawfirm.gif";
lo_lawfirm = new Image(); lo_lawfirm.src = "/img/nav/lo_lawfirm.gif";
l_vendors = new Image(); l_vendors.src = "/img/nav/l_vendors.gif";
lo_vendors = new Image(); lo_vendors.src = "/img/nav/lo_vendors.gif";
l_connections = new Image(); l_connections.src = "/img/nav/l_connections.gif";
lo_connections = new Image(); lo_connections.src = "/img/nav/lo_connections.gif";
l_comm = new Image(); l_comm.src = "/img/nav/l_comm.gif";
lo_comm = new Image(); lo_comm.src = "/img/nav/lo_comm.gif";
l_prodev = new Image(); l_prodev.src = "/img/nav/l_prodev.gif";
lo_prodev = new Image(); lo_prodev.src = "/img/nav/lo_prodev.gif";
}

/* 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
	}
}

