//*********************************************************************************//BEGIN GLOBAL VARIABLES//*********************************************************************************var winname;//*********************************************************************************//END GLOBAL VARIABLES//*********************************************************************************//*********************************************************************************//BEGIN home code.//*********************************************************************************function gohome () {	window.location.href = document.forms[0].WebURL.value;}//*********************************************************************************//END home code.//*********************************************************************************//*********************************************************************************//BEGIN check e-mail code.//*********************************************************************************function checkemail () {	var mailpath = document.forms[0].WebMailPath.value;		//alert(mailpath)		if ( mailpath == "" ) {		//need to add an error message creen here when we go live.		alert ( 'There is a problem accessing your mail file.  Please contact the Help Desk.' );		return false;	}		//window.parent.location = mailpath;	var newwin = window.open ( mailpath , "Email" )}//*********************************************************************************//END check e-mail code.//*********************************************************************************//*********************************************************************************//BEGIN new user registration code.//*********************************************************************************function newUserRegistration () {	var form = document.forms[0];	var regdbarray = form.RegistrationDb.value.split ( '\\' );	var regdbpath = regdbarray.join ( '/' );		if ( global_SSL == 'Yes' ) {		protocol = 'https://' ;	} else {		protocol = 'http://' ;	}		loadwindow ( protocol + global_Host + '/' + regdbpath + '/reg1?openform', 'SSLScroll' );}//*********************************************************************************//END new user registration code.//*********************************************************************************//*********************************************************************************//BEGIN web ask us load code.//*********************************************************************************function loadWebAskUs ( type ) {	var form = document.forms[0];	var host = form.WebURL.value;		if ( type.length > 0 ) {		window.opener.location = host + '/web/webaskus.nsf/askus?openform&requesttype=' + type	} else {		window.opener.location = host + '/web/webaskus.nsf/askus?openform'	}}//*********************************************************************************//END web ask us load code.//*********************************************************************************//*********************************************************************************//BEGIN logout code.  - ADDED 11/05/2008//*********************************************************************************function logout () {	var form = document.forms[0];	var weburl = form.WebURL.value;	var sitehomearray = form.SitehomeDb.value.split ( '\\' );	var sitehomepath = sitehomearray.join ( '/' );	var logouturl = weburl + sitehomepath + '/logout?openform';	window.location.href = logouturl;}//*********************************************************************************//END logout code.//*********************************************************************************//*********************************************************************************//BEGIN logout redirect code.  - MODIFIED 11/05/2008//*********************************************************************************function logoutRedirect () {	var form = document.forms[0];	var url = window.location.href;	var homepageurl = form.WebURL.value;	var thisdbarray = form.DBName.value.split ( '\\' );	var thisdbpath = thisdbarray.join ( '/' );	var logouturl = homepageurl + thisdbpath +  '?Logout&RedirectTo=' + homepageurl;	//window.location.href = logouturl;	window.location.replace(logouturl);}//*********************************************************************************//END logout code.//*********************************************************************************//*********************************************************************************//BEGIN hover link text code.//*********************************************************************************var leftOffset = 10;			// modify these values to ...var topOffset = 10;			// change the popup position.var skn;var ns4;var ns6;var ie4;function get_mouse ( e ) {	var x = ( ns4 || ns6 ) ? e.pageX : event.clientX + document.body.scrollLeft;	var y = ( ns4 || ns6 ) ? e.pageY : event.clientY + document.body.scrollTop;	skn.left = x + leftOffset;	skn.top = y + topOffset;	//window.status = "Left: " + skn.left + "    Top: " + skn.top;}function setupDiv () {	ns4 = document.layers;	ns6 = document.getElementById && !document.all;	ie4 = document.all;	if ( ns4 ) {		skn = document.dek;	} else if ( ns6 ) {		skn = document.getElementById ( "dek" ).style;	} else if ( ie4 ) {		skn = document.all.dek.style;	}	if ( ns4 ) {		document.captureEvents ( Event.MOUSEMOVE );	} else {		skn.visibility = "visible";		skn.display = "none";	}	document.onmousemove = get_mouse;}function popupLabel ( msg, bak ) {	setupDiv ();		var content = "<table width='240' cellpadding='3' cellspacing='0' border='1' bordercolor='white' bgcolor='" + bak + "'><tr><td align='left'><span class='hoverlabel'>" + msg + "</span></td></tr></table>";	if ( ns4 ) {		skn.document.write ( content );		skn.document.close ();		skn.visibility = "visible";	}		if ( ns6 ) { 		document.getElementById ( "dek" ).innerHTML = content;		skn.display = ''	}	if ( ie4 ) { 		document.all ( "dek" ).innerHTML = content;		skn.display = ''	}}function killLabel () {	if ( ns4 ) {		skn.visibility = "hidden";	} else if ( ns6 || ie4 ) {		skn.display = "none";	}}//*********************************************************************************//END hover link text code.//*********************************************************************************//*********************************************************************************//BEGIN ticker text generator//*********************************************************************************// WebTicker by Mioplanet// www.mioplanet.comfunction ticker_start() {	var tickerSupported = false;	TICKER_WIDTH = document.getElementById("TICKER").style.width;	var img = "<img src='/web/sitehome.nsf/spacer.gif' width='" + TICKER_WIDTH + "' height='0'>";	// IE	if (navigator.userAgent.indexOf("MSIE")!=-1 && navigator.userAgent.indexOf("Opera")==-1) {		document.getElementById("TICKER").innerHTML = "<DIV nowrap='nowrap' style='width:100%;'>" + img + "<SPAN style='" + TICKER_STYLE + "' ID='TICKER_BODY' width='100%'></SPAN>" + img + "</DIV>";		tickerSupported = true;	}		// Firefox	if (navigator.userAgent.indexOf("Firefox")!=-1 || navigator.userAgent.indexOf("Safari")!=-1 || navigator.userAgent.indexOf("MSIE 8")!=-1 ) {		document.getElementById("TICKER").innerHTML = "<TABLE cellspacing='0' cellpadding='0' width='100%'><TR><TD nowrap='nowrap'>" + img + "<SPAN style='" + TICKER_STYLE + "' ID='TICKER_BODY' width='100%'>&nbsp;</SPAN>" + img + "</TD></TR></TABLE>";		tickerSupported = true;	}	if (!tickerSupported) {		document.getElementById("TICKER").outerHTML = ""; 	} else {		document.getElementById("TICKER").scrollLeft = TICKER_RIGHTTOLEFT ? document.getElementById("TICKER").scrollWidth - document.getElementById("TICKER").offsetWidth : 0;		document.getElementById("TICKER_BODY").innerHTML = TICKER_CONTENT;		document.getElementById("TICKER").style.display="block";		TICKER_tick();	}}function TICKER_tick() {	if (!TICKER_PAUSED) {		document.getElementById("TICKER").scrollLeft += TICKER_SPEED * (TICKER_RIGHTTOLEFT ? -1 : 1);	}	if (TICKER_RIGHTTOLEFT && document.getElementById("TICKER").scrollLeft <= 0) {		document.getElementById("TICKER").scrollLeft = document.getElementById("TICKER").scrollWidth - document.getElementById("TICKER").offsetWidth;	}	if (!TICKER_RIGHTTOLEFT && document.getElementById("TICKER").scrollLeft >= document.getElementById("TICKER").scrollWidth - document.getElementById("TICKER").offsetWidth) {		document.getElementById("TICKER").scrollLeft = 0;	}	window.setTimeout("TICKER_tick()", 30);}//*********************************************************************************//END ticker text generator//*********************************************************************************//*********************************************************************************//BEGIN random picture generator.//*********************************************************************************var randImages = new Array();randImages[0] = new imageSet("/web/sitehome.nsf/lcpublic/274/$file/A1.gif", "/web/sitehome.nsf/lcpublic/274/$file/A2.gif", "/web/sitehome.nsf/lcpublic/274/$file/A3.gif", "/web/sitehome.nsf/lcpublic/274/$file/A4.gif");randImages[1] = new imageSet("/web/sitehome.nsf/lcpublic/274/$file/B1.gif", "/web/sitehome.nsf/lcpublic/274/$file/B2.gif", "/web/sitehome.nsf/lcpublic/274/$file/B3.gif", "/web/sitehome.nsf/lcpublic/274/$file/B4.gif");randImages[2] = new imageSet("/web/sitehome.nsf/lcpublic/274/$file/C1.gif", "/web/sitehome.nsf/lcpublic/274/$file/C2.gif", "/web/sitehome.nsf/lcpublic/274/$file/C3.gif", "/web/sitehome.nsf/lcpublic/274/$file/C4.gif");function imageSet(image1, image2, image3, image4) {	this.image1 = image1;	this.image2 = image2;	this.image3 = image3;	this.image4 = image4;}function setRandomImages() {	var randNum = Math.floor(Math.random()*randImages.length);	//document.write(randText[randNum]);	document.forms[0].randomImage1.src = randImages[randNum].image1;	document.forms[0].randomImage2.src = randImages[randNum].image2;	document.forms[0].randomImage3.src = randImages[randNum].image3;	document.forms[0].randomImage4.src = randImages[randNum].image4;	//setTimeout("setRandomImages()",10000);}//*********************************************************************************//BEGIN random picture generator.//*********************************************************************************//*********************************************************************************//BEGIN defined window code.//*********************************************************************************function definedWindow ( name, width, height, status, resizable, scrollbars, toolbar, menubar, location ) {	this.name = name;	this.width = width;	this.height = height;	this.status = status;	this.resizable = resizable;	this.scrollbars = scrollbars;	this.toolbar = toolbar;	this.menubar = menubar;	this.location = location;}// BEGIN PREDEFINED WINDOWS //var predefinedWindows = new Array ();predefinedWindows[0] = new definedWindow ( "SSL", "771", "512", "no", "no", "no", "no", "no", "no" );predefinedWindows[1] = new definedWindow ( "SSLScroll", "771", "512", "no", "no", "yes", "no", "no", "no" );predefinedWindows[2] = new definedWindow ( "Help", "771", "512", "no", "no", "yes", "no", "no", "no" );predefinedWindows[3] = new definedWindow ( "Print", "771", "512", "yes", "yes", "yes", "yes", "yes", "yes" );predefinedWindows[4] = new definedWindow ( "External", "800", "600", "yes", "yes", "yes", "yes", "yes", "yes" );predefinedWindows[5] = new definedWindow ( "PDF", "771", "512", "no", "no", "yes", "yes", "yes", "yes" );predefinedWindows[6] = new definedWindow ( "EMPOWER", "771", "512", "no", "yes", "yes", "no", "no", "no" );predefinedWindows[7] = new definedWindow ( "Bookmark", "325", "125", "no", "no", "no", "no", "no", "no" );predefinedWindows[8] = new definedWindow ( "Synonyms", "400", "290", "no", "no", "yes", "no", "no", "no" );predefinedWindows[9] = new definedWindow ( "Email", "800", "600", "yes", "yes", "yes", "no", "no", "no" );predefinedWindows[10] = new definedWindow ( "LEG", "660", "460", "no", "no", "yes", "yes", "yes", "no" );predefinedWindows[11] = new definedWindow ( "SSLChrome", "771", "512", "no", "yes", "yes", "yes", "no", "no" );// END PREDEFINED WINDOWS ////*********************************************************************************//END defined window code.//*********************************************************************************//*********************************************************************************//BEGIN open window code.//*********************************************************************************function loadwindow ( popURL, name, width, height, status, resizable, scrollbars, toolbar, menubar, location ) {	var x = 0;	var y = 0;	for ( var i = 0; i < predefinedWindows.length; i++ ) {		if ( predefinedWindows[i].name == name ) {			width = predefinedWindows[i].width;			height = predefinedWindows[i].height;			status = predefinedWindows[i].status;			resizable = predefinedWindows[i].resizable;			scrollbars = predefinedWindows[i].scrollbars;			toolbar = predefinedWindows[i].toolbar;			menubar = predefinedWindows[i].menubar;			location = predefinedWindows[i].location;		}	}	if ( screen ) {		x = ( screen.availWidth - width ) / 2;		y = ( screen.availHeight - height ) / 2;	}	if ( width != null || height != null ) {		winname = window.open ( popURL, name, "width=" + width + ",height=" + height + ",screenX=" + x + ",screenY=" + y + ",left=" + x + ",top=" + y + ",status=" + status + ",resizable=" + resizable + ",scrollbars=" + scrollbars + ",toolbar=" + toolbar + ",menubar=" + menubar + ",location=" + location );	} else {		winname = window.open ( popURL, name, "width=" + width + ",height=" + height + ",status=" + status + ",resizable=" + resizable + ",scrollbars=" + scrollbars + ",toolbar=" + toolbar + ",menubar=" + menubar + ",location=" + location );	}		winname.focus();}//*********************************************************************************//END open window code.//*********************************************************************************//*********************************************************************************//BEGIN synonyms code.//*********************************************************************************function funcSynonyms () {	bkdoc = "/taxonomy.nsf/synonyms?openview&count=1000";	loadwindow ( bkdoc, 'Synonyms' );}//*********************************************************************************//END synonyms code.//*********************************************************************************//*********************************************************************************//BEGIN open synonyms code.//*********************************************************************************function funcOpenSynonym ( v ) {	opener.location.href = v;	window.close ();}//*********************************************************************************//END open synonyms code.//*********************************************************************************//*********************************************************************************//BEGIN bookmark code.//*********************************************************************************function bookmarklink () {	var form = document.forms[0];	var pathinfo = form.Path_Info.value.toLowerCase ();	var userprofarray = form.UserProfDb.value.split ( '\\' );	var userprofpath = userprofarray.join ( '/' );	var tmptitle = "";	var tmppath = "";	if ( form.DocumentName ) {		tmptitle = escape ( form.DocumentName.value );			} else if ( form.MasterTitle ) {		tmptitle = escape ( form.MasterTitle.value );	} else if ( form.BillID ) {		tmptitle = escape ( form.WebDisplayTitle.value );	} else if ( form.WebDisplayPubName ) {		tmptitle = escape ( form.WebDisplayPubName.value );	} else {		tmptitle = escape ( form.DspTitle.value );	}	pathinfo = pathinfo.substring ( 0 , pathinfo.indexOf ( ".nsf/" ) );		if ( form.DocumentName ) {		tmppath = pathinfo + ".nsf/lookupwebcontent/" + form.DocumentID.value;			} else if ( form.HotListMemo ) {		tmppath = pathinfo + ".nsf/hlmv/Final?opendocument";	} else if ( form.AnalysisDocAuthors ) {		tmppath = pathinfo + ".nsf/analysisbybillid/" + form.BillID.value;	} else if ( form.BillID ) {		tmppath = pathinfo + ".nsf/billsbyid/" + form.BillID.value;	} else if ( form.WebDisplayPubName ) {		tmppath = pathinfo + ".nsf/lookupwebcontent/" + form.ParentID.value;	} else {		tmppath = form.Path_Info.value;	}	var bkdoc = "/" + userprofpath + "/bookmark?OpenForm&dpath=" + tmppath + "&deftitle=" + tmptitle;	loadwindow ( bkdoc , "Bookmark" );}//*********************************************************************************//END bookmark code.//*********************************************************************************//*********************************************************************************//BEGIN open bookmark code.//*********************************************************************************function funcOpenBookmark ( v ) {	var vlength = v.length;	var url = '';	var leftchars = v.substring ( 0, 2 );		if ( leftchars == '//' ) {		url = v.substring ( 1, vlength );	} else {		url = v;	}	window.location.href = url;}//*********************************************************************************//END open bookmark code.//*********************************************************************************//*********************************************************************************//BEGIN do not allow Right Mouse Click code.//*********************************************************************************var sorry = "Sorry, you do not have access to this feature." ; function noRightClick ( e ) {	if ( document.all ) {		if ( event.button == 2 ) {			alert ( sorry );			return false;		}	}	if ( document.layers ) {		if ( e.which == 3 ) {			alert ( sorry );			return false;		}	}}if ( document.layers ) {	document.captureEvents ( Event.MOUSEDOWN );}//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<//The following line of code must be included on the form in the JSHeader.//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<//document.onmousedown = noRightClick;//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>//End of code to be included on the form.//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>//*********************************************************************************//END do not allow Right Mouse Click code.//*********************************************************************************//*********************************************************************************//BEGIN clear input items code.//*********************************************************************************function ResetCheckbox ( inputName ) {	form = document.forms[0];	for ( i = 0 ; i < form[inputName].length ; i++ ) {		form[inputName][i].checked = false;	}}function ClearAllChoices ( selectName ) {	form = document.forms[0];		for ( i = 0 ; i < form[selectName].length ; i ++ ) {		form[selectName][i].selected = false;	}}function ClearChoices ( selectName ) {	form = document.forms[0];		for ( i = 0 ; i < form[selectName].length ; i ++ ) {		form[selectName][i].selected = false;	}			form[selectName][0].selected = true;}//*********************************************************************************//END clear input items code.//*********************************************************************************//*********************************************************************************//BEGIN broswer cookie code.//*********************************************************************************var today = new Date ();var expires = new Date ( today.getTime () + ( 56 * 86400000 ) );function Get_Cookie ( name ) {	var start = document.cookie.indexOf ( name + "=" );	var len = start + name.length + 1;	if ( ( !start ) && ( name != document.cookie.substring ( 0, name.length ) ) ) return null;	if ( start == -1 ) return null;	var end = document.cookie.indexOf ( ";", len );	if ( end == -1 ) end = document.cookie.length;	return unescape ( document.cookie.substring ( len, end ) );}function Delete_Cookie ( name, path, domain ) {    if ( Get_Cookie ( name ) ) document.cookie = name + "=" +        ( ( path ) ? ";path=" + path : "" ) +        ( ( domain ) ? ";domain=" + domain : "" ) +        ";expires=Thu, 01-Jan-1970 00:00:01 GMT";}function Encrypt(theText) {output = new String;Temp = new Array();Temp2 = new Array();TextSize = theText.length;for (i = 0; i < TextSize; i++) {rnd = Math.round(Math.random() * 122) + 68;Temp[i] = theText.charCodeAt(i) + rnd;Temp2[i] = rnd;}for (i = 0; i < TextSize; i++) {output += String.fromCharCode(Temp[i], Temp2[i]);}return output;}function unEncrypt(theText) {output = new String;Temp = new Array();Temp2 = new Array();TextSize = theText.length;for (i = 0; i < TextSize; i++) {Temp[i] = theText.charCodeAt(i);Temp2[i] = theText.charCodeAt(i + 1);}for (i = 0; i < TextSize; i = i+2) {output += String.fromCharCode(Temp[i] - Temp2[i]);}return output;}function Set_Cookie ( name, value, expires, path, domain, secure ) {	var path = '/';	document.cookie = name + "=" + escape ( value ) +		( ( expires ) ? ";expires=" + expires.toGMTString () : "" ) +		( ( path ) ? ";path=" + path : "" ) + 		( ( domain ) ? ";domain=" + domain : "" ) +		( ( secure ) ? ";secure" : "" );}function set () {	var form = document.forms[0];	if ( form.save.checked ) {		Set_Cookie ( "Username",Encrypt( form.Username.value), expires );		Set_Cookie ( "Password",Encrypt( form.Password.value), expires );		Set_Cookie ( "save", form.save.checked, expires );	   Set_Cookie ( "Encrypt", 'true', expires );	} else {		Set_Cookie ( "save", form.save.checked, expires );	}}function get () {	var form = document.forms[0];			save = Get_Cookie ( "save" );	encrypt = Get_Cookie ( "Encrypt" );	if ( save == 'true' ) {		if ( encrypt == 'true' ) {		//check to see if the encrypt flag was set.		    userid = unEncrypt ( Get_Cookie ( "Username" ) );		    password = unEncrypt ( Get_Cookie ( "Password" ) );	  } else {	       userid = Get_Cookie ( "Username" );	       password = Get_Cookie ( "Password" );	}		if ( userid != null ) {			form.Username.value = userid;			form.Username.focus (); 		}		if ( password != null ) {			form.Password.value = password;			form.Password.focus (); 		}		form.save.checked = true;	} else {		form.save.checked = false;		document.forms[0].Username.focus (); 		document.forms[0].Username.select ();	}}//*********************************************************************************//END broswer cookie code.//*********************************************************************************//*********************************************************************************//BEGIN website login code.//*********************************************************************************function formlogin () {	var form = document.forms[0];	var host = form.Host.value;	var ssl = form.SSL.value;	var protocol = '';	var user = form.CurrentUser.value;	var login = form.Username.value;	var password = form.Password.value;	var redirect = form.RedirectTo.value;     var url = form.WebURL.value;        //this section is for rewriting the url redirect option if needed      var redirectprotocol=redirect.substring(0,5)     // -if this equals http we need to leave it alone.       if (redirectprotocol!='https'){         //now we need to determine if we have an http in the string or not.         //if so we will leave this alone again.         			redirectprotocol=redirect.substring(0,4)         			//alert(redirectprotocol);         			if (redirectprotocol!='http'){         			   //now we have a case where we need to build an http request.         			   	redirectprotocol='http://';         			   	redirect=redirectprotocol + host + redirect;         			   	//alert(redirect)         			   	         			}       			       }	if ( user != 'Anonymous' ) {		window.location.href = redirect;		return false;	}		if ( form.Username.value == '' ) {		alert ( 'You must enter a User Name.' );		document.forms[0].Username.focus (); 		document.forms[0].Username.select ();				return false;	}	if ( form.Password.value == '' ) {		alert ( 'You must enter a Password.' );				document.forms[0].Password.focus (); 		document.forms[0].Password.select ();		return false;	}		locked = Get_Cookie ( "PasswordLockout" );	if ( locked == "true" ) {		alert ( "Please wait while your password change request is completed." );				return false;	}	if ( ssl == 'Yes' ) {		protocol = 'https://' ;	} else {		protocol = 'http://' ;	}		//alert(redirect)		set ();	document.forms[0].action = protocol + host +"names.nsf?Login";	document.forms[0].method = "post";	document.forms[0].target = "_top";	document.forms[0].RedirectTo.value = redirect;	document.forms[0].submit();}//*********************************************************************************//END website login code.//*********************************************************************************//*********************************************************************************//BEGIN click view category code.//*********************************************************************************function ec ( docNumber ) {	var docNumberLength = docNumber.length;	for ( i = 0 ; i < document.links.length; i++ ) {		var link = document.links[i].href;		var startCollapse = link.indexOf( 'Collapse=', 0 ) + 9;		var startExpand = link.indexOf( 'Expand=', 0 ) + 7;		if ( startCollapse > 8 ) {			var tempdocNumber = link.substring( startCollapse, startCollapse + docNumberLength );		} else if ( startExpand > 6 ) {			var tempdocNumber = link.substring( startExpand, startExpand + docNumberLength );		}		if ( tempdocNumber == docNumber ) {			window.location = link;			return;		}	}}//*********************************************************************************//END click view category code.//*********************************************************************************//*********************************************************************************//BEGIN click view category code.//*********************************************************************************function ecl ( start, docNumber ) {	var docNumberLength = docNumber.length;	for ( i = start ; i < document.links.length; i++ ) {		var link = document.links[i].href;		var startCollapse = link.indexOf( 'Collapse=', 0 ) + 9;		var startExpand = link.indexOf( 'Expand=', 0 ) + 7;		if ( startCollapse > 8 ) {			var tempdocNumber = link.substring( startCollapse, startCollapse + docNumberLength );		} else if ( startExpand > 6 ) {			var tempdocNumber = link.substring( startExpand, startExpand + docNumberLength );		}		if ( tempdocNumber == docNumber ) {			window.location = link;			return;		}	}}//*********************************************************************************//END click view category code.//*********************************************************************************//*********************************************************************************//BEGIN click view category code.//*********************************************************************************function ecx ( docNumber ) {	var firstDecimal = docNumber.indexOf ( ".", 0 );	if ( firstDecimal > 0 ) {		var newDocNumber = docNumber.slice ( firstDecimal + 1 );	} else {		var newDocNumber = docNumber;	}	ec ( newDocNumber );}//*********************************************************************************//END click view category code.//*********************************************************************************//*********************************************************************************//BEGIN load publication code.//*********************************************************************************function loadPublication ( publicationName, jurCode ) {	var now = new Date ();	var year = now.getYear ();	var month = now.getMonth () + 1;	var day = now.getDate ();	if ( year < 1000 ) year += 1900;	var today = month.toString () + "/" + day.toString () + "/" + year.toString ();	if ( jurCode != null ) {		window.location = "/legtrack/web/naiipublications.nsf/searchresultbydate?SearchView&Query=[PubName]=(" + publicationName + ")AND[JurListValues]Contains(" + jurCode + ")AND[Article]=(No)AND[PublishDate]>(12/31/1969)AND[PublishDate]<=(" + today + ")&Start=1&Count=&SearchOrder=4&SearchMax=0&publication=" + publicationName;	} else {		window.location = "/legtrack/web/naiipublications.nsf/searchresultbydate?SearchView&Query=[CommNames]=(" + publicationName + ")AND[Article]=(No)AND[PublishDate]>(12/31/1969)AND[PublishDate]<=(" + today + ")&Start=1&Count=&SearchOrder=4&SearchMax=0&committee=" + publicationName;	}}//*********************************************************************************//END load publication code.//*********************************************************************************//*********************************************************************************//BEGIN load news releases code.//*********************************************************************************function loadNewsReleases ( type, code ) {	var now = new Date ();	var year = now.getYear ();	var month = now.getMonth () + 1;	var day = now.getDate ();	if ( year < 1000 ) year += 1900;	var today = month.toString () + "/" + day.toString () + "/" + year.toString ();	var yearAgoToday = month.toString () + "/" + day.toString () + "/" + ( year - 1 ).toString ();	if ( type == 'state' ) {		window.location = "/legtrack/web/naiipublications.nsf/srchresbydatepr?SearchView&Query=[JurListValues]Contains(" + code + ")AND[Article]=(No)AND[PublishDate]>(" + yearAgoToday + ")AND[PublishDate]<(" + today + ")&Start=1&Count=&SearchOrder=4&SearchMax=0&view=News Releases";	} else {		window.location = "/legtrack/web/naiipublications.nsf/srchresbydatepr?SearchView&Query=[JurListValues]Contains(" + code + ")AND[Article]=(No)AND[PublishDate]>(" + yearAgoToday + ")AND[PublishDate]<(" + today + ")&Start=1&Count=&SearchOrder=4&SearchMax=0&view=News Releases";	}}//*********************************************************************************//END load news releases code.//*********************************************************************************//*********************************************************************************//BEGIN Load State Compliance Charts.//*********************************************************************************function loadCharts ( label, pubCode, topicCode, yearsBack ) {	var now = new Date ();	var year = now.getYear ();	var month = now.getMonth () + 1;	var day = now.getDate ();	if ( year < 1000 ) year += 1900;	var today = month.toString () + "/" + day.toString () + "/" + year.toString ();	var yearsAgoToday = month.toString () + "/" + day.toString () + "/" + ( year - yearsBack ).toString ();	var yearsAgoYear = "01/01/" + ( year - 1 ).toString ();	if ( topicCode == 'all' ) {		window.location = "/legtrack/web/naiipublications.nsf/srchrescharts?SearchView&login&Query=(" + pubCode + ")AND[Article]=(No)&Start=1&Count=1000&SearchOrder=4&SearchMax=0&view=" + label ;	} else if ( topicCode == 'all2years' ) {		window.location = "/legtrack/web/naiipublications.nsf/srchrescharts?SearchView&login&Query=(" + pubCode + ")AND[Article]=(No)AND[PublishDate]>(" + yearsAgoToday + ")AND[PublishDate]<(" + today + ")&Start=1&Count=1000&SearchOrder=4&SearchMax=0&view=" + label ;	} else {		window.location = "/legtrack/web/naiipublications.nsf/srchreschartstopic?SearchView&login&Query=(" + pubCode + "%20AND%20" + topicCode + ")AND[Article]=(No)AND[PublishDate]>(" + yearsAgoToday + ")AND[PublishDate]<(" + today + ")&Start=1&Count=1000&SearchOrder=4&SearchMax=0&view=" + label ;	}}//*********************************************************************************//END Load State Compliance Charts.//*********************************************************************************//*********************************************************************************//BEGIN Load Latest News for State.//*********************************************************************************function loadStateNews ( label, stateName, jurCode, numItems, yearsBack ) {	var now = new Date ();	var year = now.getYear ();	var month = now.getMonth () + 1;	var day = now.getDate ();	if ( year < 1000 ) year += 1900;	var today = month.toString () + "/" + day.toString () + "/" + year.toString ();	var yearsAgoToday = month.toString () + "/" + day.toString () + "/" + ( year - yearsBack ).toString ();	var yearsAgoYear = "01/01/" + ( year - 1 ).toString ();	window.location = "/legtrack/web/naiipublications.nsf/statepubs?OpenView&login&RestrictToCategory=" + jurCode + "&Start=1&Count=" + numItems + "&state=" + stateName + "&view=" + label;}//*********************************************************************************//END Load Latest News for State.//*********************************************************************************//*********************************************************************************//BEGIN Load Meeting Notices for State.//*********************************************************************************function loadStateMeetings ( label, stateName, jurCode ) {	window.location = "/legtrack/web/naiipublications.nsf/statemeetings?OpenView&expandview&login&RestrictToCategory=" + jurCode + "&state=" + stateName + "&view=" + label;}//*********************************************************************************//END Load Meeting Notices for State.//*********************************************************************************//*********************************************************************************//BEGIN replace images code.//*********************************************************************************function replaceImages ( imgName, newimgName, width, height ) {	var start = 0;	var len = 0;	var origStr = "";	var newStr = "";	for ( var i = 0; i < document.images.length; i++ ) {		var imgsrc = document.images[i].src;				if ( imgsrc.indexOf ( imgName ) > 0 ) {			start = imgsrc.indexOf ( imgName );			len = imgsrc.length;			origStr = imgsrc.substring ( start , len );			newStr = stringReplace ( imgsrc , origStr , newimgName );			document.images[i].src = newStr;			document.images[i].width = width;			document.images[i].height = height;		}	}}//*********************************************************************************//END replace images code.//*********************************************************************************//*********************************************************************************//BEGIN string replace code.//*********************************************************************************function stringReplace ( origString , findTxt , replTxt ) {	var pos = 0;	var len = findTxt.length;	pos = origString.indexOf ( findTxt );	while ( pos != -1 ) {		preString = origString.substring ( 0 , pos );		postString = origString.substring ( pos + len , origString.length );		origString = preString + replTxt + postString;		pos = origString.indexOf ( findTxt );	}	return origString;}//*********************************************************************************//END string replace code.//*********************************************************************************//*********************************************************************************//BEGIN delete selected document code.//*********************************************************************************function DeleteSelected () {	var form = document.forms[0];	var deleteflag = false;		if ( form.Delete.length == null ) {		if ( form.Delete.checked ) {			deleteflag = true;		}	} else {		for ( i = 0; i < form.Delete.length ; i ++ ) {			if ( form.Delete[i].checked == true ) {				deleteflag = true;			}		}	}	if ( deleteflag ) {		return true;	} else {		alert ( "You have not selected any documents to delete." );		return false;	}}//*********************************************************************************//END delete selected document code.//*********************************************************************************//*********************************************************************************//BEGIN search results count check code.//*********************************************************************************function checkCount ( maxResults ) {	form = document.forms[0];	var count = parseInt ( form.TotalHits.value );	var msg = 'More than ' + maxResults.toString () + ' documents were retrieved for your selection.  Please refine your request using additional fields such as date or state on the Advanced Search page.';	var msgnone = 'No results found for the selected criteria.';	if ( count == 1 ) {		//The 6 comes from the number of links at the bottom of the page after the search results.		//location.replace(document.links[document.links.length - 6]);	} else if ( count >= maxResults ) {		alert ( msg );		history.go ( -1 );	} else if ( count == 0 ) {		alert ( msgnone );		history.go ( -1 );	}}//*********************************************************************************//END search results count check code.//*********************************************************************************//*********************************************************************************//BEGIN search results count check code for Alliance.//*********************************************************************************function checkCountA ( maxResults ) {	form = document.forms[0];	var count = parseInt ( form.TotalHits.value );	var msg = 'More than ' + maxResults.toString () + ' results found for the selected criteria.  Please limit your search using additional criteria such as a date range or additional categories.';	var msgnone = 'Your search returned 0 results.  Please refine your search criteria, and try again.';	if ( count >= maxResults ) {		alert ( msg );		history.go ( -1 );	} else if ( count == 0 ) {		alert ( msgnone );		history.go ( -1 );	}}//*********************************************************************************//END search results count check code for Alliance.//*********************************************************************************//*********************************************************************************//BEGIN e-mail validation code.//*********************************************************************************function isValidEmail ( strEmail ) {	if ( strEmail.search ( /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1 ) {		return true;	} else {		return false;	}}//*********************************************************************************//END e-mail validation code.//*********************************************************************************//*********************************************************************************//BEGIN change password scripts.//*********************************************************************************function openChangePassword ( ) {	var form = document.forms[0];	var regdbarray = form.RegistrationDb.value.split ( '\\' );	var regdbpath = regdbarray.join ( '/' );		if ( global_SSL == 'Yes' ) {		protocol = 'https://' ;	} else {		protocol = 'http://' ;	}		loadwindow ( protocol + global_Host + '/' + regdbpath + '/update?openform', 'SSLScroll' );}//*********************************************************************************//END change password scripts.//*********************************************************************************//*********************************************************************************//BEGIN user profile custom scripts.//*********************************************************************************function openprofile ( option ) {	var form = document.forms[0];	var sitehomearray = form.SitehomeDb.value.split ( '\\' );	var sitehomepath = sitehomearray.join ( '/' );	var url = '';	var currenturl = window.location.href;	var loc = currenturl.indexOf ( "=" );	if ( form.UserName.value == 'Anonymous' ) {		alert ( 'You must be logged in prior to viewing your subscriptions.  You will \nbe re-directed to the member login page now.  Please click this link \nagain after you are logged in.' );				url = '/' + sitehomepath + '/login?openform';				window.location = url;	} else {		switch ( option ) {			case 'profile':				url = form.PersonalURL.value;				break;			case 'whatsnew':				url = form.PersonalDDURL.value;				break;			case 'web':				url = form.PersonalWebURL.value;				break;			case 'pubs':				url = form.PersonalPubsURL.value;				window.location = url;								return;			case 'paper':				url = form.PersonalPaperURL.value;				window.location = url;								return;		}				loadwindow ( url, 'SSLScroll' );	}}//*********************************************************************************//END user profile custom scripts.//*********************************************************************************//*********************************************************************************//Custom scripts.//*********************************************************************************function Left(str, n){	if (n <= 0)	    return "";	else if (n > String(str).length)	    return str;	else	    return String(str).substring(0,n);}function Right(str, n){    if (n <= 0)       return "";    else if (n > String(str).length)       return str;    else {       var iLen = String(str).length;       return String(str).substring(iLen, iLen - n);    }}//*********************************************************************************//End Custom scripts.//*********************************************************************************//*********************************************************************************//BEGIN open intranet scripts.//*********************************************************************************function openIntranet ( ) {	if ( global_SSL == 'Yes' ) {		protocol = 'https://' ;	} else {		protocol = 'http://' ;	}		window.location.href = protocol + global_Host + '/web/nav.nsf/webwire?openform';}//*********************************************************************************//END open intranet scripts.//*********************************************************************************//*********************************************************************************//BEGIN display members scripts.//*********************************************************************************function displayMembers ( ) {	var form = document.forms[0];	var weburl = form.WebURL.value;	var committee = form.CommitteeName.value;	var code = form.CommitteeCode.value;	loadwindow(weburl + 'pciwebsite/MemberDirectory/CommResults.aspx?committeeCode=' + code + '&printAction=Print','Print')}//*********************************************************************************//END display members scripts.//*********************************************************************************//*********************************************************************************//BEGIN display digest scripts.//*********************************************************************************function displayDigest ( ) {	form = document.forms[0];	var userprofarray = form.UserProfDb.value.split ( '\\' );	var userprofpath = userprofarray.join ( '/' );	var membergrouparray = form.MemberGroup.value.split ( ' ' );	var membergroup = membergrouparray.join ( '%20' );		if ( membergroup.length == 0 ) {		window.location.href = form.WebURL.value + userprofpath + '/digestredirect?openform&login';	} else {			window.location.href = form.WebURL.value + userprofpath + '/vwhatsnew/' + membergroup + '?opendocument&login';	}}//*********************************************************************************//END display digest scripts.//*********************************************************************************//*********************************************************************************//BEGIN display archive scripts.//*********************************************************************************function displayArchive ( ) {	form = document.forms[0];	var userprofarray = form.UserProfDb.value.split ( '\\' );	var userprofpath = userprofarray.join ( '/' );	var membergrouparray = form.MemberGroup.value.split ( ' ' );	var membergroup = membergrouparray.join ( '%20' );		if ( form.ArchiveDate.value.length > 0 ) {		var currentdate = new Date ();		var selecteddate = new Date ( form.ArchiveDate.value );				if ( selecteddate <= currentdate ) { 			var selectedday = selecteddate.getDate();			var selectedmonth = selecteddate.getMonth() + 1;			var selectedyear = selecteddate.getYear();					var daystring = selectedday.toString ();			var daylength = daystring.length;					if ( daylength == 1 ) {				daystring = "0" + daystring;			}				var monthstring = selectedmonth.toString();			var monthlength = monthstring.length;				if ( monthlength == 1 ) {				monthstring = "0" + monthstring;			}				if ( selectedyear < 1000 ) {				selectedyear = selectedyear + 1900;				var yearstring = selectedyear.toString();			} else {				var yearstring = selectedyear.toString();			}			//var datestring = monthstring + "/" + daystring + "/" + yearstring;			var datestring = monthstring + daystring + yearstring;				window.location.href = '/' + userprofpath + '/lookupdigestarchive/' + datestring + membergroup + '?opendocument&login'		} else {			alert ( 'There is no Digest Archive for the selected date.' );		}	}}//*********************************************************************************//END display archive scripts.//*********************************************************************************//*********************************************************************************//BEGIN launch calendar scripts.//*********************************************************************************function launchcalendar ( formoption, caloption ) {	var dbnamearray = document.forms[0].DBName.value.split ( '\\' );	var dbname = dbnamearray.join ( '/' );	var url = '/' + dbname + '/' + formoption + '?openform';	var tWin = null;	var tWidth = '255';	var tHeight = '247';	var tScroll = 'no';	var tLeft = ( screen.width ) ? ( screen.width - tWidth ) / 2 : 100;	var tTop = ( screen.height ) ? ( screen.height - tHeight ) / 2 : 100;	var tSettings = 'width=' + tWidth + ',height=' + tHeight + ',top=' + tTop + ',left=' + tLeft + ',scrollbars=' + tScroll + ',location=no,directories=no,status=no,menubar=no,toolbar=no';	tWin = window.open ( url , 'Calendar' , tSettings )	document.forms[0].CalendarOption.value = caloption;		return true;}//*********************************************************************************//END launch calendar scripts.//*********************************************************************************//*********************************************************************************//BEGIN open digest postings view scripts.//*********************************************************************************function openDigestPostings ( ) {	var form = document.forms[0];	var sitehomearray = form.SitehomeDb.value.split ( '\\' );	var sitehomepath = sitehomearray.join ( '/' );	var url = '';		if ( form.UserName.value == 'Anonymous' ) {		url = '/' + sitehomepath + '/ddpa?openview&count=100';	} else {		url = '/' + sitehomepath + '/ddp?openview&count=100';	}		window.location = url;}//*********************************************************************************//END open digest postings view scripts.//*********************************************************************************//*********************************************************************************//BEGIN open link scripts.//*********************************************************************************function openlink ( path ) {	var form = document.forms[0];	var ssl = form.SSL.value;	var host = form.Host.value;	var url = '';//Check to see if SSL is on or not	if ( ssl == 'Yes' ) {		url = 'https://' + host + path;	} else {		url = 'http://' + host + path;	} 	loadwindow ( url, 'External' )}//*********************************************************************************//END open link scripts.//*********************************************************************************//*********************************************************************************//BEGIN News Edge scripts.//*********************************************************************************function writeNewsEdge (feedtime, headline, brief, provider, separator, limit) {	if ( saArray == 0 ) {		document.writeln ( "<B>No articles found</B>" );	} else {		for ( var iLoop = 0; iLoop < saArray.length; iLoop++ ) {			if ( ( limit == 0 ) || ( ( iLoop < limit ) && ( limit <= saArray.length ) ) ) {			// pull the headline data			var sData = saArray[iLoop];			var saData = sData.split ( '|' );			var sStory = saData[1];			var sHeadline = saData[2].replace ( '[pipe]', '|' ).replace ( '[caret]', '^' );			var sProviderName = saData[3];			var sProviderID = saData[4];			var sItemTime = saData[5];			var sFeedTime = saData[6];			var sSource = saData[7];			var sBrief = saData[8].replace ( '[pipe]', '|' ).replace ( '[caret]', '^' );			// get correct data source switch			if ( sSource == "rtcrws" ) {				sData = "&rtcrdata=on";			} else {				sData = "&rtcrdata=off";			}			if ( feedtime == "yes" ) {				// print feed time				document.writeln ( "<span class=\"newsdate-time\">" + sFeedTime + "</span>" );				document.writeln ( "<br>" );			}			if ( headline == "yes" ) {				// print headline				document.writeln ( "<a href=\"http://dialog.newsedge.com:80/newsedge.asp?site=2006121817052505165369&display=Industry+News&folderaction=viewhtml" + sData + "&block=html&headlineslink=off&mode=displaystory&synapseid=2006121914263205129206&storyid=" + sStory + "\" target=\"_blank\">" + sHeadline + "</a>" );				document.writeln ( "<br>" );			}			if ( brief == "yes" ) {				// print brief				if ( sBrief.length > 0 ) {					document.writeln ( "<span class=\"miniblack\">" + sBrief + "</span> " );					document.writeln ( "<a href=\"http://dialog.newsedge.com:80/newsedge.asp?site=2006121817052505165369&display=Industry+News&folderaction=viewhtml" + sData + "&block=html&headlineslink=off&mode=displaystory&synapseid=2006121914263205129206&storyid=" + sStory + "\" target=\"_blank\" class=\"small\">more ></a>" );					document.writeln ( "<br>" );				}			}			if ( provider == "yes" ) {				// print provider				document.writeln ( "<span class=\"newssource\">" + sProviderName + "</span>" );				document.writeln ( "<br>" );			}			if ( separator == "yes" ) {				// write a separator				document.writeln ( "<hr>" );			} else {				// write a separator				document.writeln ( "<br>" );			}			}		}	}}//*********************************************************************************//END News Edge scripts.//*********************************************************************************