﻿
var currentWindowHeight=0;var currentWindowWidth=0;var separatorPosition=0;var separatorPositionNew=0;var separatorPressed=false;var thirdseparatorPressed=false;var closeClicked=false;var contentHeightOffset=-105;var contentSeparatorTopOffset=35;var secondaryContentTopOffset=60;var secondaryContentHeightOffset=-130;var thirdcontentSeparatorTopOffset=35;var thirdContentTopOffset=60;var thirdContentHeightOffset=-130;function getRelatedElement(reference,name)
{if(reference.id)
{var matches=reference.id.match(/([a-zA-Z0-9]+_)+/);if(matches){var aspid=matches[0];var result=document.getElementById(aspid+name);if(result)return result;}}
if(reference.parentNode)return getRelatedElement(reference.parentNode,name);return null;}
function selectValue(select){return select.options[select.selectedIndex].value;}
function getScrollTop(section){if(navigator.userAgent.match(/Safari/i)){return self.pageYOffset;}else{return document.getElementById(section).scrollTop;}}
function getWindowHeight(){var windowHeight=window.innerHeight;if(!windowHeight)windowHeight=document.documentElement.clientHeight;if(!windowHeight)windowHeight=document.body.clientHeight;return windowHeight;}
function getWindowWidth(){var windowWidth=window.innerWidth;if(!windowWidth)windowWidth=document.documentElement.clientWidth;if(!windowWidth)windowWidth=document.body.clientWidth;return windowWidth;}
function adjustScroll(){if((currentWindowHeight!=getWindowHeight())||(currentWindowWidth!=getWindowWidth())||closeClicked)
{var content=document.getElementById("content");var secondarycontent=document.getElementById("secondarycontent");var contentseparator=document.getElementById("contentseparator");var thirdcontent=document.getElementById("thirdcontent");var thirdseparator=document.getElementById("thirdseparator");var leftbar=document.getElementById("leftbar");var footer=document.getElementById("footer");var topbar=document.getElementById("topbar");var menubar=document.getElementById("menubar");currentWindowHeight=getWindowHeight();currentWindowWidth=getWindowWidth();content.style.width=(getWindowWidth()-content.offsetLeft-44)+"px"
if((secondarycontent&&secondarycontent.style.display=="block")||(thirdcontent&&thirdcontent.style.display=="block"))
{if((secondarycontent&&secondarycontent.style.display=="block")&&(thirdcontent&&thirdcontent.style.display=="block"))
{thirdcontent.style.width=content.style.width;thirdcontent.style.top=((getWindowHeight()-(getWindowHeight()/2))+secondaryContentTopOffset+130)+"px";thirdcontent.style.height=((getWindowHeight()/2)+secondaryContentHeightOffset-130)+"px";thirdseparator.style.top=((getWindowHeight()-(getWindowHeight()/2))+contentSeparatorTopOffset+130)+"px";secondarycontent.style.height=((getWindowHeight()/2)+secondaryContentHeightOffset-thirdcontent.offsetHeight-25)+"px";secondarycontent.style.top=((getWindowHeight()-(getWindowHeight()/2))+secondaryContentTopOffset)+"px";contentseparator.style.top=((getWindowHeight()-(getWindowHeight()/2))+contentSeparatorTopOffset)+"px";}
else if(secondarycontent&&secondarycontent.style.display=="block")
{contentHeightOffset=-105;contentSeparatorTopOffset=35;secondaryContentTopOffset=60;secondaryContentHeightOffset=-130;secondarycontent.style.width=content.style.width;content.style.height=((getWindowHeight()/2)+contentHeightOffset)+"px";secondarycontent.style.top=((getWindowHeight()-(getWindowHeight()/2))+secondaryContentTopOffset)+"px";secondarycontent.style.height=((getWindowHeight()/2)+secondaryContentHeightOffset)+"px";contentseparator.style.top=((getWindowHeight()-(getWindowHeight()/2))+contentSeparatorTopOffset)+"px";if(currenthit)
{window.location.hash="hit"+currenthit;}}
else if(thirdcontent&&thirdcontent.style.display=="block")
{contentHeightOffset=-105;thirdcontentSeparatorTopOffset=35;thirdContentTopOffset=60;thirdContentHeightOffset=-130;thirdcontent.style.width=content.style.width;content.style.height=((getWindowHeight()/2)+contentHeightOffset)+"px";thirdcontent.style.top=((getWindowHeight()-(getWindowHeight()/2))+thirdContentTopOffset)+"px";thirdcontent.style.height=((getWindowHeight()/2)+thirdContentHeightOffset)+"px";thirdseparator.style.top=((getWindowHeight()-(getWindowHeight()/2))+thirdcontentSeparatorTopOffset)+"px";}
else
{content.style.height=(getWindowHeight()-167)+"px";}}
else
{content.style.height=(getWindowHeight()-167)+"px";}
leftbar.style.height=(getWindowHeight()-144)+"px";topbar.style.width=(getWindowWidth()-62)+"px"
if(menubar)menubar.style.width=(getWindowWidth()-226)+"px"
footer.style.top=(getWindowHeight()-26)+"px";closeClicked=false;}
setTimeout("adjustScroll();",500);}
function resizeDivs(mouse)
{if(separatorPressed)
{var content=document.getElementById("content");var secondarycontent=document.getElementById("secondarycontent");var contentseparator=document.getElementById("contentseparator");var thirdcontent=document.getElementById("thirdcontent");separatorPositionNew=mouse.clientY;content.style.width=(getWindowWidth()-content.offsetLeft-44)+"px"
var movePerPixels=parseInt(separatorPositionNew-separatorPosition);if((contentHeightOffset+movePerPixels<-40)&&(contentHeightOffset+movePerPixels>-275)&&(secondarycontent.offsetHeight-movePerPixels>45))
{contentHeightOffset+=movePerPixels;secondaryContentTopOffset+=movePerPixels;secondaryContentHeightOffset-=movePerPixels;contentSeparatorTopOffset+=movePerPixels;content.style.height=((getWindowHeight()/2)+contentHeightOffset)+"px";secondarycontent.style.top=((getWindowHeight()-(getWindowHeight()/2))+secondaryContentTopOffset)+"px";contentseparator.style.top=((getWindowHeight()-(getWindowHeight()/2))+contentSeparatorTopOffset)+"px";if(thirdcontent&&thirdcontent.style.display=="block")
{secondarycontent.style.height=((getWindowHeight()/2)+secondaryContentHeightOffset-thirdcontent.offsetHeight-25)+"px";}
else
{secondarycontent.style.height=((getWindowHeight()/2)+secondaryContentHeightOffset)+"px";}
separatorPosition=mouse.clientY;}}
if(thirdseparatorPressed)
{var content=document.getElementById("content");var secondarycontent=document.getElementById("secondarycontent");var thirdcontent=document.getElementById("thirdcontent");var thirdseparator=document.getElementById("thirdseparator");var content=document.getElementById("content");separatorPositionNew=mouse.clientY;var movePerPixels=parseInt(separatorPositionNew-separatorPosition);if(secondarycontent&&secondarycontent.style.display=="block")
{if((secondarycontent.offsetTop<thirdcontent.offsetTop-70+movePerPixels)&&(thirdcontent.offsetHeight-movePerPixels>50))
{thirdContentTopOffset+=movePerPixels;thirdContentHeightOffset-=movePerPixels;thirdcontentSeparatorTopOffset+=movePerPixels;secondarycontent.style.width=content.style.width;thirdcontent.style.width=content.style.width;thirdcontent.style.top=((getWindowHeight()-(getWindowHeight()/2))+thirdContentTopOffset+130)+"px";thirdcontent.style.height=((getWindowHeight()/2)+thirdContentHeightOffset-130)+"px";thirdseparator.style.top=((getWindowHeight()-(getWindowHeight()/2))+thirdcontentSeparatorTopOffset+130)+"px";secondarycontent.style.height=((getWindowHeight()/2)-thirdContentHeightOffset-content.offsetHeight-150)+"px";separatorPosition=mouse.clientY;}}
else
{if((thirdContentHeightOffset+movePerPixels<30)&&(thirdContentHeightOffset+movePerPixels>-175))
{contentHeightOffset+=movePerPixels;thirdContentHeightOffset-=movePerPixels;thirdContentTopOffset+=movePerPixels;thirdcontentSeparatorTopOffset+=movePerPixels;content.style.height=((getWindowHeight()/2)+contentHeightOffset)+"px";thirdcontent.style.top=((getWindowHeight()-(getWindowHeight()/2))+thirdContentTopOffset)+"px";thirdcontent.style.height=((getWindowHeight()/2)+thirdContentHeightOffset)+"px";thirdseparator.style.top=((getWindowHeight()-(getWindowHeight()/2))+thirdcontentSeparatorTopOffset)+"px";separatorPosition=mouse.clientY;}}}}
function getSeparatorPosition(mouse)
{separatorPressed=true;separatorPosition=mouse.clientY;}
function getthirdSeparatorPosition(mouse)
{thirdseparatorPressed=true;separatorPosition=mouse.clientY;}
function closeSecondaryContent()
{document.getElementById("secondarycontent").innerHTML="";document.getElementById("secondarycontent").style.display="none";document.getElementById("contentseparator").style.display="none";document.getElementById("spanHitNavR").style.display="none";document.getElementById("spanHitNavL").style.display="none";closeClicked=true;contentSeparatorTopOffset=35;secondaryContentTopOffset=60;secondaryContentHeightOffset=-130;thirdcontentSeparatorTopOffset=35;thirdContentTopOffset=60;thirdContentHeightOffset=-130;contentHeightOffset=0}
function closeThirdContent()
{document.getElementById("thirdcontent").innerHTML="";document.getElementById("thirdcontent").style.display="none";document.getElementById("thirdseparator").style.display="none";closeClicked=true;contentSeparatorTopOffset=35;secondaryContentTopOffset=60;secondaryContentHeightOffset=-130;thirdcontentSeparatorTopOffset=35;thirdContentTopOffset=60;thirdContentHeightOffset=-130;contentHeightOffset=0}
function createHttpRequest()
{var httpRequest;if(window.XMLHttpRequest)
{httpRequest=new XMLHttpRequest();if(httpRequest.overrideMimeType)
{httpRequest.overrideMimeType('text/xml');}}
else if(window.ActiveXObject)
{try
{httpRequest=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e)
{try
{httpRequest=new ActiveXObject("Microsoft.XMLHTTP");}
catch(e){}}}
return httpRequest;}
function printDiv(id)
{var content=document.getElementById(id).innerHTML;var printwindow=window.open('','printwin','left=100,top=100,width=500,height=400,scrollbars=yes');printwindow.document.write('<html>\n<head>\n');printwindow.document.write('<title>Print Page</title>\n');printwindow.document.write('<link rel="stylesheet" type="text/css" href="/includes/print.css" />\n');printwindow.document.write('<script type="text/javascript" language="javascript">\n');printwindow.document.write('function print_win(){\n');printwindow.document.write('    window.print();\n');printwindow.document.write('    window.close();\n');printwindow.document.write('}\n');printwindow.document.write('function showpopup(a,text){}\n');printwindow.document.write('function hidepopup(a,text){}\n');printwindow.document.write('<\/script>\n');printwindow.document.write('</head>\n');printwindow.document.write('<body class="content" onload="print_win()">\n');printwindow.document.write(content);printwindow.document.write('</body>\n');printwindow.document.write('</html>\n');printwindow.document.close();}
function showUserLink(url)
{window.open(url,'','location=yes,menubar=yes,resizable=yes,scrollbars=yes,status=yes,titlebar=yes,toolbar=yes');return false;}
function showNotesLink(url)
{window.open(url,'notes','resizable=yes,scrollbars=yes,status=yes,width=500,height=400');return false;}
function initPage(){adjustScroll();if(window.location.hash&&document.getElementById(window.location.hash.replace("#",""))){document.getElementById(window.location.hash.replace("#","")).scrollIntoView();if(window.location.hash.match(/^#?hit[0-9]+$/)){goToHitNumber(window.location.hash.match(/^#?hit([0-9]+)/)[1]);}}
if(window.hits){var hit=window.location.hash.match(/^#?(.*)/)[1].toLowerCase();for(var i=0;i<hits.length;i++){if(hits[i].toLowerCase().indexOf(hit)>=0){goToHitNumber(i+1);break;}}}}
function onQuickSearchKey(e){var key=e.keyCode||e.which;if(key==13){setTimeout(quicksearchpostbackstring,0);}}
function HTMLDecode(string){var div=document.createElement("div");div.innerHTML=string;if(div.firstChild)return div.firstChild.nodeValue;else return"";}
function showStatutePopup(a){var statutePopup=document.getElementById("statutePopup");var top=0;var left=0;var item=a;while(item){top+=item.offsetTop;left+=item.offsetLeft;item=item.offsetParent;}
statutePopup.style.left=(left-140)+"px";statutePopup.style.width=(a.offsetWidth+180-10)+"px";statutePopup.style.top=(top-64)+"px";var highlight;var current;if(document.getElementById("strLong"))current=document.getElementById("strLong").value;if(!current)current=decodeURIComponent(window.location.search.match(/cite=([^&]*)/)[1]).replace("+"," ");current=current.replace(/(^[ §]+|[ §]+$)/,"");for(var i=0;i<statutePopupLookup.length;i++){if(HTMLDecode(statutePopupLookup[i][0]).replace(/(^[ §]+|[ §]+$)/,"")==current){statutePopupLookup[i][1].className="current";highlight=statutePopupLookup[i][1];}else{if(statutePopupLookup[i][1].className=="current")statutePopupLookup[i][1].className="";}}
statutePopup.style.display="block";if(highlight){statutePopup.scrollTop=highlight.offsetTop+highlight.offsetHeight/2-statutePopup.offsetHeight/2;}}
var hidingStatutePopup=true;function onStatutePopupMouseOut(statutePopup){hidingStatutePopup=true;setTimeout("hideStatutePopup();",1000);}
function onStatutePopupMouseOver(statutePopup){hidingStatutePopup=false;}
function hideStatutePopup(){if(hidingStatutePopup){var statutePopup=document.getElementById("statutePopup");statutePopup.style.display="none";}}
var lastMenu;var hidingMenu;function showMenu(link,menuName){var menuDiv=document.getElementById(menuName);var top=0;var left=0;var item=link;while(item){top+=item.offsetTop;left+=item.offsetLeft;item=item.offsetParent;}
menuDiv.style.top=(top+link.offsetHeight+5)+"px";menuDiv.style.left=(left+10)+"px";menuDiv.style.display="block";if(lastMenu&&lastMenu!=menuDiv){hidingMenu=true;doHideMenu();}
lastMenu=menuDiv;hidingMenu=false;}
function hideMenu(menu){hidingMenu=true;setTimeout("doHideMenu();",1000);}
function doHideMenu(){if(hidingMenu){lastMenu.style.display="none";}}
if(window.createPopup&&document.compatMode&&document.compatMode=="CSS1Compat")
{document.onreadystatechange=onresize=function fixIE6AbsPos()
{if(!document.body)return;if(document.body.style.margin!="0px")
document.body.style.margin=0;onresize=null;document.body.style.height=0;setTimeout(function(){document.body.style.height=document.documentElement.scrollHeight+'px';},1);setTimeout(function(){onresize=fixIE6AbsPos;},100);}}
var popup;var lasthit=null;var currenthit=null;var documentnumber=0;var documentnumbertotal=null;var anchors=new Array();function getTop(node){var result=node.offsetTop;while(node.offsetParent){node=node.offsetParent;result+=node.offsetTop;}
return result;}
function getLeft(node){var result=node.offsetLeft;while(node.offsetParent){node=node.offsetParent;result+=node.offsetLeft;}
return result;}
function showpopup(a,text){var element=a;while(element.parentNode.id!='secondarycontent'&&element.parentNode.id!='content')
{element=element.parentNode;}
if(!popup)popup=document.getElementById("popup");popup.innerHTML=text;popup.style.display="block";var left=getLeft(a);if(left+popup.offsetWidth>getWindowWidth()-10){left=getWindowWidth()-popup.offsetWidth-10;}
var top=getTop(a)+20-getScrollTop(element.parentNode.id);if(top+popup.offsetHeight>getWindowHeight()-45){top=getTop(a)-popup.offsetHeight-getScrollTop(element.parentNode.id)-35;}
popup.style.left=left+"px";popup.style.top=top+"px";}
function hidepopup(a){popup.style.display="none";}
function togglereference(){var reference=document.getElementById("reference");var referencepm=document.getElementById("referencepm");if(reference.style.display=="none"){reference.style.display="block";referencepm.src="/images/grnarrwsmminus.gif";}else{reference.style.display="none";referencepm.src="/images/grnarrwsmplus.gif";}
currentWindowHeight=0;}
function gotosection(jumplink){jumplink=jumplink.toLowerCase();var w=window.opener?window.opener:window;if(w.location.search.toLowerCase().indexOf(jumplink.match(/^([^\.]+\.){3}/)[0])>=0&&w.location.href.toLowerCase().indexOf("summary.aspx")>=0){w.opensection("contents",jumplink);w.location.hash=jumplink;}else{w.location="/summary.aspx?jumplink="+escape(jumplink)+"#"+jumplink;}
if(w!=window)w.blur();w.focus();}
function gotoScope(jumplink)
{document.getElementById("spanSeparatorNav").style.display="none";var URL="scopeajax.aspx?jumplink="+escape(jumplink);var httpRequest=createHttpRequest();if(!httpRequest)
{document.getElementById('secondarycontent').innerHTML="Error: Unable to create an XMLHTTP instance";}
httpRequest.open('GET',URL,false);httpRequest.send('');document.getElementById('secondarycontent').innerHTML=httpRequest.responseText;updateContentSeparatorTitle();document.getElementById('secondarycontent').style.display="block";document.getElementById('contentseparator').style.display="block";currentWindowHeight=0;}
function goToStatuteFromPopup(e)
{if(!e)
{e=window.event;}
var el=(e.srcElement)?e.srcElement:(e.target)?e.target:null;goToStatute(el.getAttribute("state"),el.getAttribute("cite"),0,e);document.getElementById("statutePopup").style.display="none";}
function goToStatute(state,cite,newdocumentnumber,event)
{document.getElementById("spanSeparatorNav").style.display="inline";documentnumber=newdocumentnumber;var element=(window.event!=undefined)?window.event.srcElement:event.target;while(element&&element.parentNode&&element.parentNode.id!='secondarycontent'&&element.parentNode.id!='content')
{element=element.parentNode;}
if(element&&element.parentNode&&element.parentNode.id=='secondarycontent')
{var i=0,searchtext="";var querystring=unescape(location.search).split("&");while(querystring[i]&&searchtext=="")
{if(querystring[i].search("searchtext")==0||querystring[i].search("searchtext")==1)
{searchtext=querystring[i].split("=")[1];}
i++;}
var URL="statuteajax.aspx?state="+escape(state)+"&cite="+escape(cite)+"&searchtext="+escape(searchtext)+"&direction=";var httpRequest=createHttpRequest();if(!httpRequest)
{document.getElementById('thirdseparator').innerHTML="Error: Unable to create an XMLHTTP instance";}
httpRequest.open('GET',URL,false);httpRequest.send('');document.getElementById('thirdcontent').innerHTML=httpRequest.responseText;document.getElementById('thirdcontent').style.display="block";document.getElementById('thirdseparator').style.display="block";document.getElementById('thirdcontentseparatortitle').innerHTML=cite;currentWindowHeight=0;anchors=[];var statutePopup=document.getElementById("statutePopup");if(statutePopup){statutePopupLookup=new Array();statutePopup.innerHTML="";httpRequest=createHttpRequest();var URL="statutelistajax.aspx?state="+state;httpRequest.open('GET',URL,false);httpRequest.send('');var blocks=httpRequest.responseText.split("|");for(var i=0;i<blocks.length-1;i+=2){var cite=blocks[i];var title=blocks[i+1];var link=document.createElement("a");link.innerHTML=cite+" "+title;link.href="#";link.setAttribute("state",blocks[blocks.length-1]);link.setAttribute("cite",HTMLDecode(cite));link.onclick=goToStatuteFromPopup;statutePopup.appendChild(link);statutePopupLookup.push(new Array(cite,link));}}
return false;}
else if(window.location.href.match(/statute\.aspx/))
{var w=window.opener?window.opener:window;w.location="statute.aspx?state="+encodeURIComponent(state)+"&cite="+encodeURIComponent(cite);if(w!=window)w.blur();w.focus();}
else
{var i=0,searchtext="";var querystring=unescape(location.search).split("&");while(querystring[i]&&searchtext=="")
{if(querystring[i].search("searchtext")==0||querystring[i].search("searchtext")==1)
{searchtext=querystring[i].split("=")[1];}
i++;}
var URL="statuteajax.aspx?state="+escape(state)+"&cite="+escape(cite)+"&searchtext="+escape(searchtext)+"&direction=";var httpRequest=createHttpRequest();if(!httpRequest)
{document.getElementById('secondarycontent').innerHTML="Error: Unable to create an XMLHTTP instance";}
httpRequest.open('GET',URL,false);httpRequest.send('');document.getElementById('secondarycontent').innerHTML=httpRequest.responseText;document.getElementById('secondarycontent').style.display="block";document.getElementById('contentseparator').style.display="block";updateContentSeparatorTitle();window.location.hash="hit1";currenthit=1;if(document.getElementById("strHits").value>0)
{goToHitNumber(1);document.getElementById("spanHitNavR").style.display="inline";document.getElementById("spanHitNavL").style.display="inline";document.getElementById("imgSplitRR").style.display="inline";document.getElementById("imgSplitLL").style.display="inline";document.getElementById("spantagPrint").style.display="inline";}
else
{document.getElementById("imgSplitRR").alt="Previous Statute";document.getElementById("imgSplitLL").alt="Next Statute";}
currentWindowHeight=0;anchors=[];var statutePopup=document.getElementById("statutePopup");if(statutePopup){statutePopupLookup=new Array();statutePopup.innerHTML="";httpRequest=createHttpRequest();var URL="statutelistajax.aspx?state="+state;httpRequest.open('GET',URL,false);httpRequest.send('');var blocks=httpRequest.responseText.split("|");for(var i=0;i<blocks.length-1;i+=2){var cite=blocks[i];var title=blocks[i+1];var link=document.createElement("a");link.innerHTML=cite+" "+title;link.href="#";link.setAttribute("state",blocks[blocks.length-1]);link.setAttribute("cite",HTMLDecode(cite));link.onclick=goToStatuteFromPopup;statutePopup.appendChild(link);statutePopupLookup.push(new Array(cite,link));}}}
return false;}
function gotosummary(jumplink,searchindex,newdocumentnumber,event)
{document.getElementById("spanSeparatorNav").style.display="inline";documentnumber=newdocumentnumber;var searchtext=unescape(location.search).split("&")[0].split("=")[1];var URL="summaryajax.aspx?jumplink="+jumplink+"&searchtext="+searchtext;var httpRequest=createHttpRequest();if(!httpRequest)
{document.getElementById('secondarycontent').innerHTML="Error: Unable to create an XMLHTTP instance";}
httpRequest.open('GET',URL,false);httpRequest.send('');document.getElementById('secondarycontent').innerHTML=httpRequest.responseText;document.getElementById('secondarycontent').style.display="block";document.getElementById('contentseparator').style.display="block";document.getElementById("spanHitNavR").style.display="inline";document.getElementById("spanHitNavL").style.display="inline";document.getElementById("imgSplitRR").style.display="inline";document.getElementById("imgSplitLL").style.display="inline";document.getElementById("spantagPrint").style.display="inline";if(document.getElementById('strFirstHit'))
{currenthit=document.getElementById('strFirstHit').value;if(isNaN(currenthit))
{currenthit=0;}
else
{goToHitNumber(currenthit);}
updateContentSeparatorTitle();window.location.hash="hit"+currenthit;}
currentWindowHeight=0;anchors=[];return false;}
function goToAlerts(alertid,date,state,product,alertdates,newdocumentnumber,event)
{documentnumber=newdocumentnumber;document.getElementById('secondarycontent').style.display="block";document.getElementById('contentseparator').style.display="block";document.getElementById("spanHitNavR").style.display="none";document.getElementById("spanHitNavL").style.display="none";document.getElementById("imgSplitRR").style.display="inline";document.getElementById("imgSplitLL").style.display="inline";document.getElementById("spantagPrint").style.display="none";document.getElementById("contentseparatortitle").innerText='Alert '+date+' '+state;documentnumber=newdocumentnumber;var i=0,searchtext="";var querystring=unescape(location.search).split("&");while(querystring[i]&&searchtext=="")
{if(querystring[i].search("searchtext")==0||querystring[i].search("searchtext")==1)
{searchtext=querystring[i].split("=")[1];}
i++;}
currentWindowHeight=0;var httpRequest=createHttpRequest();if(!httpRequest)
{document.getElementById('secondarycontent').innerHTML="Error: Unable to create an XMLHTTP instance";}
httpRequest.open('GET',"searchalerts.aspx?alertid="+alertid+"&date="+date+"&state="+state+"&product="+product+"&searchtext="+searchtext+"&alertdates="+alertdates,false);httpRequest.send('');var result=httpRequest.responseText;result=result.replace(/<[/]{0,1}(form|Form)[^><]*>/g,"");document.getElementById('secondarycontent').innerHTML=result;window.location.hash="hit"
return false;}
function goToHitNumber(newhit)
{if(document.getElementById("hitspan"+newhit)){document.getElementById("hitspan"+newhit).className="highlightover";document.getElementById("hitprev"+newhit).src="/images/prover.gif";document.getElementById("hitnext"+newhit).src="/images/nxover.gif";lasthit=newhit;}}
function goToHit(which)
{if(window.location.hash.match(/hit(\d)+/))
{currenthit=window.location.hash.match(/(\d*)$/)[1];}
else
{var section=document.getElementById("contents_sec_"+window.location.hash.replace("#","").toLowerCase());if(section)
{var hitas=section.getElementsByTagName("A");if(hitas)
{for(var i=0;i<hitas.length;i++)
{if(hitas[i].name.match(/hit(\d)+/))
{currenthit=hitas[i].name.match(/(\d*)$/)[1];break;}}}}}
if(currenthit=="")currenthit=1;if(which=="prev")currenthit--;else currenthit++;if(document.getElementById("hit"+currenthit))
{if(lasthit)
{document.getElementById("hitspan"+lasthit).className="highlight";document.getElementById("hitprev"+lasthit).src="/images/pr.gif";document.getElementById("hitnext"+lasthit).src="/images/nx.gif";}
goToHitNumber(currenthit);window.location.hash="hit"+currenthit;var sec=document.getElementById("hit"+currenthit);while(sec&&(!sec.id||!sec.id.match(/^contents_sec_/)))
{sec=sec.parentNode;}
if(sec)
{var newlink=sec.id.match(/^contents_sec_([^\.]+\.){3}(.*)$/)[2];var beginning=newlink.match(/^([^\.]+\.){1,2}/);if(beginning)beginning=beginning[0];else beginning="";var ending=newlink.match(/^([^\.]\.){2}(.*)/);if(ending)ending=ending[0];else ending="";newlink=beginning.toUpperCase()+ending;}
updateContentSeparatorTitle();}
else
{if(which=="prev")
{alert("This is the first hit in the current result.");}
else
{alert("This is the last hit in the current result.");}}}
function goToDocument(direction)
{if(document.getElementById('ctl00_ContentPlaceHolder_hdnCount')!=null)
{documentnumbertotal=parseInt(document.getElementById('ctl00_ContentPlaceHolder_hdnCount').value);}
if(documentnumbertotal)
{goToSearchResult(direction);}
else
{var URL="statuteajax.aspx?state="+escape(document.getElementById("strCurrentState").value)+"&cite="+escape(document.getElementById("strLong").value)+"&searchtext=qwerty&direction="+direction;var httpRequest=createHttpRequest();if(!httpRequest)
{document.getElementById('secondarycontent').innerHTML="Error: Unable to create an XMLHTTP instance";}
httpRequest.open('GET',URL,false);httpRequest.send('');document.getElementById('secondarycontent').innerHTML=httpRequest.responseText;document.getElementById('secondarycontent').scrollTop=0;updateContentSeparatorTitle();}}
function goToSearchResult(direction)
{var newdocumentnumber;if(direction=='prev')
{newdocumentnumber=documentnumber-1;}
else
{newdocumentnumber=documentnumber+1;}
if(newdocumentnumber<1)
{alert("This is the first result.");}
else if(newdocumentnumber>documentnumbertotal)
{alert("This is the last result.");}
else
{var link=document.getElementById("trDoc"+newdocumentnumber).getElementsByTagName("A")[0];if(link)
{currenthit=1;if(link.dispatchEvent)
{if(link.href.indexOf('.pdf')!=-1)
{window.open(link.href);return false;}
else
{var evt=document.createEvent("MouseEvents");evt.initMouseEvent("click",true,true,window,0,0,0,0,0,false,false,false,false,0,null);link.dispatchEvent(evt);}}
else if(link.fireEvent)
{if(link.href.indexOf('.pdf')!=-1)
{window.open(link.href);return false;}
else
{link.fireEvent("onclick");return false;}}}}}
function updateContentSeparatorTitle()
{if(document.getElementById("strLong"))
{document.getElementById('contentseparatortitle').innerHTML=document.getElementById("strLong").value;}
else
{document.getElementById('contentseparatortitle').innerHTML="Scope";}
if(document.getElementById("strHits").value>0)
{document.getElementById('contentseparatortitle').innerHTML+=" | Hit ";if(lasthit==null)
{document.getElementById('contentseparatortitle').innerHTML+="1";}
else
{document.getElementById('contentseparatortitle').innerHTML+=lasthit;}
document.getElementById('contentseparatortitle').innerHTML+=" of "+document.getElementById("strHits").value+" in "+documentnumber;}
updateSplitBarSummary()}
function updateTopBarSummary()
{var title=document.getElementById(summarytitle);var filter="";if(title.innerHTML.search("Filter:")>-1)
{filter=title.innerHTML.substr(title.innerHTML.indexOf("Filter:"),title.innerHTML.length-1);title.innerHTML=title.innerHTML.substr(0,title.innerHTML.indexOf("Filter:"));}
var titleparts=title.innerHTML.split(":");var section=getSummarySection("content");var sectionparts=section.split(".");section="";for(var i=3;i<sectionparts.length;i++)
{if(i==3||i==4){section+=sectionparts[i].toUpperCase()+".";}else{section+=sectionparts[i]+".";}}
section=section.substr(0,section.length-1);title.innerHTML=titleparts[0]+": "+section+" "+filter;}
function updateSplitBarSummary()
{var title=document.getElementById("contentseparatortitle");var titlestring=title.innerHTML;titlestring=titlestring.replace(/ | Filter: .*/,"");var titleparts=titlestring.split("|");var titlesubparts=titleparts[0].split(":");var section=getSummarySection("secondarycontent");var sectionparts=section.split(".");section="";for(var i=3;i<sectionparts.length;i++)
{if(i==3||i==4){section+=sectionparts[i].toUpperCase()+".";}else{section+=sectionparts[i]+".";}}
section=section.substr(0,section.length-1);if(section!="")
{title.innerHTML=titlesubparts[0]+": "+section;if(titleparts[1])
{title.innerHTML=title.innerHTML+"|"+titleparts[1];}}
if(document.getElementById("strFilter")&&document.getElementById("strFilter").value!=""){title.innerHTML=title.innerHTML+" | "+document.getElementById("strFilter").value;}}
function getSummarySection(pane)
{var anchorstemp=new Array();var anchorindex;if(anchors.length==0)
{anchorstemp=document.getElementById(pane).getElementsByTagName("a");for(var i=0;i<anchorstemp.length;i++)
{if(anchorstemp[i].name&&!anchorstemp[i].name.match(/hit(\d)+/)&&anchorVisible(anchorstemp[i]))
{anchors.push(anchorstemp[i]);anchors[anchors.length-1].position=crumbGetY(anchors[anchors.length-1]);}}}
anchorindex=getBinaryAnchorIndex(pane);if(anchorindex)
return anchors[anchorindex].name;else
return"";}
function getBinaryAnchorIndex(pane)
{var top=-1,bottom=anchors.length,mid;var anchory;var contenttopy=getScrollTop(pane);var contentbottomy=contenttopy+document.getElementById(pane).offsetHeight;while(bottom-top>1)
{mid=(top+bottom)>>>1;anchory=anchors[mid].position+5;if(anchory>contentbottomy)
bottom=mid;else if(anchory<contenttopy)
top=mid;else
{while((anchory<contentbottomy)&&(anchory>contenttopy))
{mid--;if(mid>-1)
{anchory=anchors[mid].position+5;}
else
{anchory=-10;}}
return mid+1;}}
if(mid>-1)
return mid;else
return false;}
function crumbGetY(node){var y=node.offsetTop;var parent=node.offsetParent;if(parent)
{while((parent.id!="content")&&(parent.id!="secondarycontent"))
{if(!parent.attributes["offsetTopCached"]){parent.setAttribute("offsetTopCached",parent.offsetTop);}
y+=parseInt(parent.attributes["offsetTopCached"].value,10);if(parent.currentStyle&&parent.currentStyle.borderTopWidth&&!isNaN(parseInt(parent.currentStyle.borderTopWidth))){y+=parseInt(parent.currentStyle.borderTopWidth);}
parent=parent.offsetParent;}}
else
{var i=0;}
return y;}
function anchorVisible(node)
{while(node.parentNode)
{if((node.parentNode.className)&&(node.parentNode.className.search("contentsHidden")>-1))
{return false;}
node=node.parentNode;}
return true;}
function getAlertDetails(changeEventId,displayTitle)
{document.getElementById("spanSeparatorNav").style.display="none";var URL="alertDetailAjax.aspx?changeEventId="+changeEventId;var httpRequest=createHttpRequest();if(!httpRequest)
{document.getElementById('secondarycontent').innerHTML="Error: Unable to create an XMLHTTP instance";}
httpRequest.open('GET',URL,false);httpRequest.send('');document.getElementById('contentseparatortitle').innerHTML=displayTitle;document.getElementById('secondarycontent').innerHTML=httpRequest.responseText;document.getElementById("spantagPrint").style.display="none";document.getElementById('secondarycontent').style.display="block";document.getElementById('contentseparator').style.display="block";document.getElementById("spanHitNavR").style.display="none";document.getElementById("spanHitNavL").style.display="none";currentWindowHeight=0;anchors=[];return false;}