window.onerror = catcherror
window.onresize = startMenus
	
if( !imageRoot || imageRoot == null ) {
	var imageRoot = "" ;
}
	
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 = ""

function showMenu(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 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) {
				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 + "/MyLowenstein/SaveBookmark.aspx?guid=" + guid + "&type=" + type;
	else
		location.href = CultureRoot + "/MyLowenstein/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;
}



