/**************************************************** ** functions.js - Main javascript function library ** ****************************************************/ /***************************************** NAVIGATION MENU *****************************************/ var sub; var subtree = new Array(); var x = 0; var openOnLeft = false; var maxNavWidth; var offsetHeight = 0; var offsetWidth = 0; function opensubmenu(item, divid) { var frame; if(maxNavWidth == undefined) { // set init values maxNavWidth = getTag("nav").clientWidth; //alert(maxNavWidth); } var navPos = findPos(getTag("nav"), "header"); //alert("navPos.x="+navPos.x+", navPos.y="+navPos.y); if(item.parentNode.parentNode.className=='submenu') { // if item is part of a submenu, and not the top tier while(sub != item.parentNode.parentNode) { // if we mouse over item not in last opened div, we will close last if(sub) { /////////// only if the object existed sub.style.visibility='hidden'; getTag('hideframe'+x).style.visibility='hidden'; x--; sub=subtree[x]; } }//////////////////////////////////// end close last div if mouseover diff object if(getTag(divid)) { // open new submenu if it exhists |getElementById(subtree[x].id+'sub'+located)| sub = getTag(divid); if(sub) { /////////////// only if it exists x++; //alert("subtree[x-1].style.marginLeft=" + parseInt(subtree[x-1].style.marginLeft) + " + " + subtree[x-1].clientWidth + "\n" + (parseInt(subtree[x-1].style.marginLeft) - sub.clientWidth) + "px"); frame = getTag('hideframe'+x); if(!openOnLeft) { // right side var temp = (parseInt(subtree[x-1].style.marginLeft) + subtree[x-1].clientWidth + offsetWidth); if((temp + sub.clientWidth) > (navPos.x + maxNavWidth)) { // too wide openOnLeft = true; } else { sub.style.marginLeft = temp + "px"; frame.style.marginLeft = temp + "px"; } } if(openOnLeft) { // left side sub.style.marginLeft = (parseInt(subtree[x-1].style.marginLeft) - (sub.clientWidth + offsetWidth)) + "px"; frame.style.marginLeft = (parseInt(subtree[x-1].style.marginLeft) - (sub.clientWidth + offsetWidth)) + "px"; } sub.style.marginTop = (parseInt(subtree[x-1].style.marginTop) + item.offsetTop) + "px"; frame.style.marginTop = (parseInt(subtree[x-1].style.marginTop) + item.offsetTop) + "px"; sub.style.visibility = 'visible'; frame.style.visibility = 'visible'; frame.style.height = sub.clientHeight; frame.style.width = sub.clientWidth; } }/////////////////////// end new submenu ///////////////// }//////////////////////end if part of a submenu /////////////////////// else { ///////////////////////// if item is the top tier, we want to open first drop down frame = getTag('hideframe0'); if(sub != undefined) { // if this is not the first time we open a dropdown for(var y = x; y >= 0; y--) { // close all other drop downs subtree[y].style.visibility='hidden'; getTag('hideframe'+y).style.visibility='hidden'; } clearhidemenu(); } ///////////////////////////////////////////////////////////////////// if(getTag(divid)) { sub = getTag(divid); var pos = findPos(item, "nav"); var subWidth = sub.clientWidth; pos.x += navPos.x; pos.y += navPos.y; sub.style.marginLeft = pos.x + "px"; frame.style.marginLeft = pos.x + "px"; sub.style.marginTop = (pos.y + item.clientHeight) + offsetHeight + "px"; frame.style.marginTop = (pos.y + item.clientHeight) + offsetHeight + "px"; if((pos.x + subWidth) > (navPos.x + maxNavWidth)) { // hug right side sub.style.marginLeft = (navPos.x + maxNavWidth - subWidth) + "px"; frame.style.marginLeft = (navPos.x + maxNavWidth - subWidth) + "px"; openOnLeft = true; } else { openOnLeft = false; } x = 0; sub.style.visibility = 'visible'; frame.style.visibility = 'visible'; frame.style.height = sub.clientHeight; frame.style.width = sub.clientWidth; item.onmouseout=delayhidemenu; } } /////////////////////// end of top tier dropdown area if(sub) { subtree[x] = sub; sub.onmouseover=clearhidemenu; sub.onmouseout=delayhidemenu; } } function delayhidemenu() { var strx = ''; for(var y = x; y >= 0; y--) { strx += "subtree["+y+"].style.visibility='hidden',"; strx += "getTag('hideframe"+y+"').style.visibility='hidden',"; } strx = strx.substring(0,strx.length-1); strx = "" + strx + ""; delayhide=setTimeout(strx,500); } function clearhidemenu() { if(typeof delayhide!="undefined") { clearTimeout(delayhide); } } /* Return x/y offset of an object up to a limit container */ function findPos(ctrl, limitId) { var pos = {x:0, y:0}; if(ctrl.offsetParent) { while(ctrl && ctrl.id != limitId) { pos.x += ctrl.offsetLeft; pos.y += ctrl.offsetTop; ctrl = ctrl.offsetParent; } } else if(ctrl.x && ctrl.y) { pos.x += ctrl.x; pos.y += ctrl.y; } return pos; } function imgro(item) { var imgpath = item.src; var x = imgpath.replace('.gif','_ro.gif'); item.src = x; } function imgundo(item) { var imgpath = item.src; var x = imgpath.replace('_ro.gif','.gif'); item.src = x; } function cpSearch( urlPrefix, query, scope ) { if( !query ) query = getTag( "cpSearchField" ).value; if( query ) window.location = urlPrefix + "Home/Search?search=" + query + ( scope ? "&scope=" + scope : "" ); } /* Page options builder and search tips popup */ (function($) { /* Page options builder */ $.fn.buildPageOptions = function() { return this.each(function () { $(this).find("a[poType=html]").click(function() { window.open($(this).attr("href"), 'Print', 'width=725,height=475,directories=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,top=20,left=20'); return false; }); }); } })(jQuery); /* Disclaimer */ var MAILTO_CONFIRMATION = "Confidential/Privileged Information\n\n" + "While we would like to hear from you, you should be aware that any of the information you submit to us via this website will not be treated as confidential or privileged as a lawyer/client communication unless we have previously sent you an engagement letter. You are not a client of the Firm until you receive such an engagement letter. Please click the \"OK\" button if you understand and accept the forgoing statement and wish to proceed." function mailTo( email ) { if( confirm( MAILTO_CONFIRMATION ) ) window.parent.location = "mailto:" + email; } /* Search paging functions */ (function($) { $.cpPaging = { testMode: false, loadPageContent : function(newPage, group, groupUID) { var div = $("#searchresult-group-" + group); //div.innerHTML = "
![]() |