function cpSearch( urlPrefix, query, scope ) { if( !query ) query = getTag( "cpSearchField" ).value; if( query ) window.location = urlPrefix + "Home/Search?search=" + query + ( scope ? "&scope=" + scope : "" ); } function openprintmenu() { document.getElementById('printmenu').style.visibility = 'visible'; } function closeprintmenu() { delayhideprint=setTimeout("document.getElementById('printmenu').style.visibility='hidden'",200); } function clearcloseprint() { if(typeof delayhideprint!="undefined") clearTimeout(delayhideprint); } var MAILTO_CONFIRMATION = "Notice\n\n" + "This e-mail is intended to establish contact with our firm, Brownstein Hyatt Farber Schreck, LLP. If you are not already a client of Brownstein Hyatt Farber Schreck, LLP., DO NOT send any information, confidential or not confidential, related to any particular matter via e-mail. Please contact me or any other Brownstein Hyatt Farber Schreck attorney via telephone regarding any possible representation. You will become a client of the firm after execution of a letter of engagement, after which information related to your matter may be exchanged." function mailTo( email ) { if( confirm( MAILTO_CONFIRMATION ) ) window.parent.location = "mailto:" + email; } function printPage() { var url = window.location.href; url += ( url.indexOf( "?" ) == -1 ? "?" : "&" ) + "printver=true"; window.open( url, 'Print', 'width=700,height=475,directories=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,top=20,left=20'); } function emailPage() { var url = window.location.href; if( confirm( MAILTO_CONFIRMATION ) ) window.location = "mailto:&body=" + escape( url ); } var ACTION_NOOP = 'userportal/refresh'; function load_right_col_header(urlPrefix) { if(document.getElementById('rightcolheader')) { var findcolb = document.getElementById('contentholder').getElementsByTagName('*'); for (var a = 0; a < findcolb.length; a++) { if(findcolb[a].className == 'narrow-col page-colB') { var divs = findcolb[a].getElementsByTagName('DIV'); for (var b = 0; b < divs.length; b++) { if(divs[b].style.display != "none" && (divs[b].getElementsByTagName('DIV')[0] ? divs[b].getElementsByTagName('DIV')[0].id != 'rightcolheader' : 'True')) { if(divs[b].id != 'rightcolheader') { if(document.getElementById('rightcolheader').innerHTML == 'Community Involvement') { document.getElementById('midarea').style.background = "#B0824D url('" + urlPrefix + "templates/site/images/midsectionbg_ci.jpg') bottom left no-repeat"; } if(document.getElementById('rightcolheader').innerHTML == 'Related Information') { document.getElementById('midarea').style.background = "#B0824D url('" + urlPrefix + "templates/site/images/midsectionbg_ri.jpg') bottom left no-repeat"; } } } } } } } } /* nav dropdown functions */ var sub; var subtree = new Array(); var x = 0; /*var left = 0;*/ function opensubmenu(item, divid) { var frame; /* var located = 0; var locate = item.parentNode.getElementsByTagName('LI'); for (var n = 0; n < locate.length; n++) ///////// find which li in the 'array' has called this { if(locate[n] == item) { located = n; } }*/ //////////////////////////////////////////////// end of find which li in the 'array' if(item.parentNode.parentNode.parentNode.parentNode.className !='headmenu') { // 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'; document.getElementById('hideframe'+x).style.visibility='hidden'; x--; sub=subtree[x]; } }//////////////////////////////////// end close last div if mouseover diff object if(document.getElementById(divid)) { // open new submenu if it exists |getElementById(subtree[x].id+'sub'+located)| sub = document.getElementById(divid); //x-1 |getElementById(subtree[x].id+'sub'+located)| if(sub) { /////////////// only if it exists x++; frame = document.getElementById('hideframe'+x) sub.style.left = subtree[0].offsetLeft+(140*x); frame.style.left = subtree[0].offsetLeft+(140*x); /*if (left == 1) { sub.style.left = subtree[0].offsetLeft-(140*x); frame.style.left = subtree[0].offsetLeft-(140*x); }*/ if(x > 1) { sub.style.top = subtree[x-1].offsetTop+item.offsetTop; frame.style.top = subtree[x-1].offsetTop+item.offsetTop; } else { sub.style.marginTop = item.offsetTop-1; frame.style.marginTop = item.offsetTop-1; } frame.style.width = sub.clientWidth; frame.style.height = sub.clientHeight; sub.style.visibility = 'visible'; frame.style.visibility = 'visible'; } }/////////////////////// end new submenu ///////////////// }//////////////////////end if part of a submenu /////////////////////// else { ///////////////////////// if item is the top tier, we want to open first drop down frame = document.getElementById('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'; document.getElementById('hideframe'+y).style.visibility='hidden'; } clearhidemenu(); } ///////////////////////////////////////////////////////////////////// if(document.getElementById(divid)) { sub = document.getElementById(divid); // | getElementById('submenu'+located) | sub.style.marginLeft = item.offsetLeft; frame.style.marginLeft = item.offsetLeft; sub.style.marginTop = -1; x = 0; sub.style.visibility = 'visible'; frame.style.visibility = 'visible'; frame.style.height = sub.clientHeight; frame.style.width = sub.clientWidth; frame.style.marginTop = -1; item.onmouseout=delayhidemenu; /*if (located > locate.length / 2) {left = 0;} else {left = 0;}*/ } } /////////////////////// end of top tier dropdown area //sub.style.left = item.offsetLeft+item.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.offsetLeft+item.parentNode.parentNode.parentNode.offsetLeft; if(sub) { subtree[x] = sub; sub.onmouseover=clearhidemenu; sub.onmouseout=delayhidemenu; } } function delayhidemenu() { var strx = ''; //delayhide=setTimeout("sub.style.visibility='hidden'",300); for(var y = x; y >= 0; y--) { strx += "subtree["+y+"].style.visibility='hidden',"; strx += "document.getElementById('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); } function imgro(item) { var imgpath = item.src; if(imgpath.match("_ro") == null) { var x = imgpath.replace('.png','_ro.png'); item.src = x; } } function imgundo(item) { var imgpath = item.src; if(imgpath.match("_ro") != null) { var x = imgpath.replace('_ro.png','.png'); item.src = x; } } function popup_login(e, msg) { if (confirm(msg)) { //e.preventDefault(); var id = "#dialog"; //Get the window height and width var winH = $(window).height(); var winW = $(window).width(); //Set the popup window to center $(id).css('top', winH/2-$(id).height()/2-20); $(id).css('left', winW/2-$(id).width()/2-20); //transition effect $(id).show(); //if close button is clicked $('.window .close').click(function (e) { //Cancel the link behavior e.preventDefault(); $('.window').hide(); }); } } /** * Create a cookie with the given name and value and other optional parameters. * * @example $.cookie('the_cookie', 'the_value'); * @desc Set the value of a cookie. * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true }); * @desc Create a cookie with all available options. * @example $.cookie('the_cookie', 'the_value'); * @desc Create a session cookie. * @example $.cookie('the_cookie', null); * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain * used when the cookie was set. * * @param String name The name of the cookie. * @param String value The value of the cookie. * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. * If set to null or omitted, the cookie will be a session cookie and will not be retained * when the the browser exits. * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will * require a secure protocol (like HTTPS). * @type undefined * * @name $.cookie * @cat Plugins/Cookie * @author Klaus Hartl/klaus.hartl@stilbuero.de */ /** * Get the value of a cookie with the given name. * * @example $.cookie('the_cookie'); * @desc Get the value of a cookie. * * @param String name The name of the cookie. * @return The value of the cookie. * @type String * * @name $.cookie * @cat Plugins/Cookie * @author Klaus Hartl/klaus.hartl@stilbuero.de */ jQuery.cookie = function(name, value, options) { if(typeof value != 'undefined') { // name and value given, set cookie options = options || {}; if(value === null) { value = ''; options.expires = -1; } var expires = ''; if(options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { var date; if(typeof options.expires == 'number') { date = new Date(); date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); } else { date = options.expires; } expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE } // CAUTION: Needed to parenthesize options.path and options.domain // in the following expressions, otherwise they evaluate to undefined // in the packed version for some reason... var path = options.path ? '; path=' + (options.path) : ''; var domain = options.domain ? '; domain=' + (options.domain) : ''; var secure = options.secure ? '; secure' : ''; document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); } else { // only name given, get cookie var cookieValue = null; if(document.cookie && document.cookie != '') { var cookies = document.cookie.split(';'); for(var i = 0; i < cookies.length; i++) { var cookie = jQuery.trim(cookies[i]); // Does this cookie string begin with the name we want? if(cookie.substring(0, name.length + 1) == (name + '=')) { cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); break; } } } return cookieValue; } }; /* Random content function */ (function($) { $.cpDynamicContent = { /* Random content */ drawRandContent : function(contentList, randOverride, hideIfEmpty, numToPick, separator, doEval) { /* Param default values */ var randNumOvr = ((!randOverride && randOverride !== 0) || isNaN(randOverride) ? null : parseInt(randOverride)); var randNum; if(hideIfEmpty != true) { hideIfEmpty = false; } numToPick = (!numToPick || isNaN(numToPick) ? 1 : parseInt(numToPick)); separator = (!separator ? "" : separator); doEval = (doEval === true); this.each(function () { var f_content = ""; if(contentList.length > 0) { // any content in list for(var i=0; i= contentList.length ? 0 : randNumOvr)); // determine random number f_content += (i > 0 ? separator : "") + contentList[randNum]; // chosen content if(numToPick > 1) { $.cpDynamicContent.remove(contentList, randNum); } } if(f_content == null || f_content == "") { // if empty content if(hideIfEmpty) { // hide $(this).css("display", "none"); } } else { if(doEval && f_content.substring(0, 6) == "flash:") { var fcSplit = f_content.substring(6).split(":endflash"); var fcParams = fcSplit[0].split("==W=="); var flashWrapper = document.createElement("DIV"); $(flashWrapper).css("height", fcParams[2]); $(this).append(flashWrapper); var flashContainer = document.createElement("DIV"); $(flashContainer).addClass("flashContainer"); $(flashWrapper).append(flashContainer); $(this).find(".flashContainer").flash({ "src":fcParams[0], "width":fcParams[1], "height":fcParams[2], "quality":"high", "wmode":"transparent", "classid":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" }); if(fcSplit.length > 1) { $(this).append(fcSplit[1]); } } else { $(this).html(f_content); // insert content html } } } }); return randNum; // returned for future use }, /* Rotating content */ drawRotatingContent : function(contentList, cookieName, hideIfEmpty, doEval) { var randOverride = 0; if(contentList.length > 1) { // need to rotate anything? cookieName = (!cookieName ? (this.get(0).id + "") : cookieName); randOverride = $.cookie(cookieName); // read cookie if(randOverride && randOverride != '') { randOverride++; } // if cookie set else { randOverride = null; } // choose random } doEval = (doEval === true); randOverride = this.drawRandContent(contentList, randOverride, hideIfEmpty, null, null, doEval); if(contentList.length > 1) { $.cookie(cookieName, randOverride, { path: '/' }); // store cookie } return randOverride; }, /* Remove array at index */ remove : function(contentList, from, to) { // Array Remove - By John Resig (MIT Licensed) var rest = contentList.slice((to || from) + 1 || contentList.length); contentList.length = from < 0 ? contentList.length + from : from; return contentList.push.apply(contentList, rest); } }; $.fn.drawRandContent = $.cpDynamicContent.drawRandContent; $.fn.drawRotatingContent = $.cpDynamicContent.drawRotatingContent; })(jQuery);