function sendForm(f) {
  f.submit();
}
<!-- confirm form action //-->
function formConfirm(msg){
  var answer=confirm(msg);
  if (answer == true)
  	return true;
  else
  	return false;
}
<!-- confirm button action //-->
function buttonConfirm(msg,url){
  var answer=confirm(msg);
  if (answer == true)
  	document.location=url;
  else
	return false;
}
<!-- Start popup window w/ max height at top left of screen //-->
function maxPop(URL, popw) {
	eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,top=0,left=0,width=' + popw + ',height=' + screen.availHeight)");
}
<!-- End popup window w/ max height at top left of screen //-->

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  	if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    	if (obj.style) { 
			obj=obj.style; v=(v=='')?'':(v=='none')?'none':v; 
		}
    	obj.display=v; 
	}
}

function lastdate() {
	datUpdated = new Date(document.lastModified);
	monthname=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
	datMonth = monthname[datUpdated.getMonth()];
	datDate = datUpdated.getDate();
	datYear = datUpdated.getFullYear();
	document.write(datMonth + " " + datDate + ", " + datYear);
}
function lastyear() {
	datUpdated = new Date(document.lastModified);
	datYear = datUpdated.getFullYear();
	document.write(datYear);
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

var arrowState= new Array(30); 
var i=0; 
for (i=0; i<=30; i++) { 
	arrowState[i]=0; 
}

function swapImage(srcImage,nameImage,descImage) {
  var imgPath = "/images/";
  var mySubstring = srcImage.substring(5,srcImage.length);
  
  if (arrowState[mySubstring] == 0) {
  	document.images[srcImage].src = imgPath+nameImage+"_hl.gif";
	MM_showHideLayers(descImage,'none','')
	arrowState[mySubstring]=1;
  } else {
  	document.images[srcImage].src = imgPath+nameImage+".gif";
	MM_showHideLayers(descImage,'','none')
	arrowState[mySubstring]=0;
  }
  return mySubstring;
}

function swapImageDown(srcImage,nameImage,descImage) {
  var imgPath = "/images/";
  var mySubstring = srcImage.substring(5,srcImage.length);
  
  if (arrowState[mySubstring] == 1) {
  	document.images[srcImage].src = imgPath+nameImage+"_hl.gif";
	MM_showHideLayers(descImage,'none','')
	arrowState[mySubstring]=0;
  } else {
  	document.images[srcImage].src = imgPath+nameImage+".gif";
	MM_showHideLayers(descImage,'','none')
	arrowState[mySubstring]=1;
  }
  return mySubstring;
}

<!-- Begin collapsable menus functions w/ custom image paths //-->
function swapImage2(srcImage,nameImage,descImage,getImgPath) {
  var imgPath = getImgPath;
  var mySubstring = srcImage.substring(5,srcImage.length);
  
  // show plus sign, show div content
  if (arrowState[mySubstring] == 0) {
  	document.images[srcImage].src = imgPath+nameImage+"_hl.gif";
	MM_showHideLayers(descImage,'none','')
	arrowState[mySubstring]=1;
  } 
  // show minus sign, hide div content
  else {
  	document.images[srcImage].src = imgPath+nameImage+".gif";
	MM_showHideLayers(descImage,'','none')
	arrowState[mySubstring]=0;
  }
  return mySubstring;
}

function swapImageDown2(srcImage,nameImage,descImage,getImgPath) {
  var imgPath = getImgPath;
  var mySubstring = srcImage.substring(5,srcImage.length);
  
  if (arrowState[mySubstring] == 1) {
  	document.images[srcImage].src = imgPath+nameImage+"_hl.gif";
	MM_showHideLayers(descImage,'none','')
	arrowState[mySubstring]=0;
  } else {
  	document.images[srcImage].src = imgPath+nameImage+".gif";
	MM_showHideLayers(descImage,'','none')
	arrowState[mySubstring]=1;
  }
  return mySubstring;
}
<!-- End collapsable menus functions w/ custom image paths //-->

<!-- Code for open-ended reference window popup page //-->

var remote = null;
function remotePop(url, width, height) {
	remote = window.open(url, "Reference", "width="+width+",height="+height+",resizable,scrollbars=yes,status=no"); 
	if (remote != null) {
		if (remote.opener == null) {
			remote.opener = self;
			};
	}
}
<!-- End RemotePop //-->


<!-- This code launches the whats new page //-->

        var remote = null;
        function remoteStart() {
             remote = window.open("", "TheRemote", "width=550,height=250,resizable=1,scrollbars=yes"); 
             if (remote != null) {
             if (remote.opener == null) {
                 remote.opener = self;
           }
             remote.location.href = '/new/index.html';
             }
        }

<!-- end of whats new code //-->

<!-- This code launches the email popup page //-->

        var remote = null;
        function remoteEmail(mail) {
             remote = window.open("", "Email", "width=530,height=540,resizable=1,scrollbars=yes"); 
             if (remote != null) {
             	if (remote.opener == null) {
             		remote.opener = self;
           			}
             	remote.location.href = "/tools/allmail.cfm?mail=" + mail;
             }
        }
<!-- end of email popup code //-->


<!-- This code launches the email popup page //-->

        var remote = null;
        function remoteEmail2(mail) {
             remote = window.open("", "Email", "width=530,height=540,resizable=1,scrollbars=yes"); 
             if (remote != null) {
             	if (remote.opener == null) {
             		remote.opener = self;
           			}
             	remote.location.href = "/development/sergey/allmail.cfm?mail=" + mail;
             }
        }
<!-- end of email popup code //-->


<!-- This code launches the Kansas City credit card order path //-->

        var remote = null;
        function remoteReg() {
             remote = window.open("", "Subscription", "width=630,height=400,left=50,top=50,resizable=1,scrollbars=yes");
             if (remote != null) {
             if (remote.opener == null) {
                 remote.opener = self;
           }
             remote.location.href = '/community/forms/conf/2004/closed.html';
             }
        }
<!-- // remote.location.href = 'http://www.kc.frb.org/sanfran/reinvestment/onlineregister.cfm'; // //-->
<!-- end of credit card window code //-->


<!-- Code for the economics subscriptions popup page //-->

        var remote = null;
        function remoteSub(url) {
             remote = window.open("", "Subscription", "width=550,height=480,resizable=1,scrollbars=yes"); 
             if (remote != null) {
             	if (remote.opener == null) {
             		remote.opener = self;
           			}
             	remote.location.href = url;
             }
        }
<!-- end of economics subscriptions popup code //-->


<!-- Code for reference window popup page //-->

        var remote = null;
        function remoteReference(url) {
             remote = window.open("", "Reference", "width=550,height=480,resizable=1,scrollbars=yes"); 
             if (remote != null) {
             	if (remote.opener == null) {
             		remote.opener = self;
           			}
             	remote.location.href = '/popups/referencewindow.html';
             }
        }

<!-- end of reference window popup code //-->

<!-- popup for Fedville //-->

function popUp(URL, popw, poph) {
  eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=' + popw + ',height=' + poph);");
}
function popUpScroll(URL, popw, poph) {
  eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=' + popw + ',height=' + poph);");
}
<!-- end FedVille popups //-->
<!-- popups for BS&R //-->
 bName = navigator.appName;
 bVer = parseInt(navigator.appVersion);
 bName = navigator.appName;
 bVer = parseInt(navigator.appVersion);
   if       (bName == "Netscape" && bVer >=3) ver = "n3";
   else if  (bName == "Netscape" && bVer == 2) ver = "n2";
   else if  (bName == "Microsoft Internet Explorer" && bVer >= 2) ver = "e3";

 function changePage(url) {
  window.location.href=url
 }
       var remote = null;
        function remoteAcct() {
            if(ver == "n2")changePage("/federalreserve/people/contacts/accounting.html");
            else{
              remote = window.open("", "TheRemote", "width=540,height=350,resizable=1,scrollbars=yes"); 
              if (remote != null) {
              if (remote.opener == null) {
                 remote.opener = self;
            }
             remote.location.href = '/federalreserve/people/contacts/accounting.html';
            }
        }
        }
       var remote = null;
        function remoteApp() {
           if(ver == "n2") changePage("/federalreserve/people/contacts/applications.html");
           else{
             remote = window.open("", "TheRemote", "width=540,height=350,resizable=1,scrollbars=yes"); 
             if (remote != null) {
             if (remote.opener == null) {
                 remote.opener = self;
           }
             remote.location.href = '/federalreserve/people/contacts/applications.html';
             }
        }
        }
       var remote = null;
        function remoteCRA() {
           if(ver == "n2") changePage("/federalreserve/people/contacts/cra.html");
           else{
             remote = window.open("", "TheRemote", "width=540,height=350,resizable=1,scrollbars=yes"); 
             if (remote != null) {
             if (remote.opener == null) {
                 remote.opener = self;
           }
             remote.location.href = '/federalreserve/people/contacts/cra.html';
             }
        }
        }
      var remote = null;
        function remoteExam() {
            if(ver == "n2") changePage("/federalreserve/people/contacts/examinations.html");
            else{
             remote = window.open("", "TheRemote", "width=540,height=300,resizable=1,scrollbars=yes"); 
             if (remote != null) {
             if (remote.opener == null) {
                 remote.opener = self;
           }
             remote.location.href = '/federalreserve/people/contacts/examinations.html';
             }
        }
        }
       var remote = null;
        function remoteCash() {
            if(ver == "n2")changePage("/federalreserve/people/contacts/cash.html");
            else{
             remote = window.open("", "TheRemote", "width=540,height=300,resizable=1,scrollbars=yes"); 
             if (remote != null) {
             if (remote.opener == null) {
                 remote.opener = self;
           }
             remote.location.href = '/federalreserve/people/contacts/cash.html';
             }
        }
        }
      var remote = null;
        function remoteChecks() {
            if(ver == "n2")changePage("/federalreserve/people/contacts/checks.html");
            else{
             remote = window.open("", "TheRemote", "width=540,height=300,resizable=1,scrollbars=yes"); 
             if (remote != null) {
             if (remote.opener == null) {
                 remote.opener = self;
           }
             remote.location.href = '/federalreserve/people/contacts/checks.html';
             }
        }
        }
      var remote = null;
        function remoteWholesale() {
            if(ver == "n2")changePage("/federalreserve/people/contacts/wholesale.html");
            else{
             remote = window.open("", "TheRemote", "width=540,height=300,resizable=1,scrollbars=yes"); 
             if (remote != null) {
             if (remote.opener == null) {
                 remote.opener = self;
           }
             remote.location.href = '/federalreserve/people/contacts/wholesale.html';
             }
        }
      }

<!-- end popups for BS&R //-->
<!-- begin glossary window pop-up //-->

   
   function startDef()
   {
   	  browsername = navigator.appName;
      //browserver = parseInt(navigator.appVersion);
      theUrl = "/tools/glossary/glossApp.html";
      
      if(browsername == "Microsoft Internet Explorer" && (navigator.appVersion.indexOf("Mac") >= 1))
      {
      		location.href = "/tools/glossary/glossReg.html";
      }
      else
      {
      
		    glossaryWin = window.open(theUrl, "newWindow",
		                                "toolbar=no," +
		                                "location=no," +
		                                "directories=no," +
		                                "status=no," +
		                                "menubar=no," +
		                                "resizable=yes," +
		                                "scrollbars=no," +
		                                "screenX=375," +
		                                "screenY=40," +
		                                "width=500," +
		                                "height=350");
		       
   	   }	       
  }
<!-- end glossary javascript //-->

<!-- This code writes in the internal stylesheet for Mac platform only. //-->

   var platform = navigator.platform.substr(0,3);
   if (platform == "Mac"){
   document.writeln("<style type=\"text/css\">")
   document.writeln(".toolbar {font: bold 10pt Verdana, Arial, Helvetica, sans-serif; color: #660000; text-decoration: none;}")
   document.writeln(".noteworthy {font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #000000; text-decoration: none}")
   document.writeln("</style>")

   }
<!-- end of style sheet code //-->
function subscribeNow() {
	var mybar = location.href;
	var bar = "personal";
	if(mybar.indexOf('banking') != -1)
	{
		bar = "banking";
	}
	if(mybar.indexOf('community') != -1)
	{
		bar = "community";
	}
	
	if(mybar.indexOf('education') != -1)
	{
		bar = "education";
	}
	
	var buba = "/tools/allsubscriptions/login.cfm" + "?chooseLayer=" + bar;
}
// //-->

function Char_count(fldobj,maxlen)
{
	txtlen=fldobj.value.length+1
	if(txtlen>maxlen)
	{
		fldobj.value=fldobj.value.substr(0,maxlen-1);
		alert("You have entered too many characters.");
	}
}

function chkSmartQuotes(formelement)
{
	var a=(formelement.value);
	var b=a.length;
	var cha='8194';
	var cha1='8193'
	var cha2='8197';
	var cha3='8198'
	var ch=cha.length;
	var i,j;
	var a2="";
	formelement.value="";
	for(j=0;j<b;j++)
	{
		var a1=a.substring(j,j+1);
		a2=a.charCodeAt(j)-23;
		//alert(a2);
		if(a2==cha || a2==cha1)
		{
			a2='\'';
			formelement.value=formelement.value+a2;
		}
			else if(a2==cha2 || a2==cha3)
		{
			a2='\"';
			formelement.value=formelement.value+a2;
		}
		else
		{
			formelement.value=formelement.value+a1;
		}
	}
}

function limitText(limitField, limitNum) {
	if (limitField.value.length > limitNum) {
		limitField.value = limitField.value.substring(0, limitNum);
		alert("You have entered too many characters.");
	}
	// chkSmartQuotes(limitField);
}

function toggle(year,tblCls) {
  aObj = document.getElementById('a'+year);
  tblObj = document.getElementById('tbl'+year);
  currClass = aObj.className;
  newClass = (currClass=='show') ? 'hide' : 'show';
  aObj.className = newClass;
  if (tblCls==undefined) {
    tblObj.className = 'collapsible ' + newClass;
  } else {
    tblObj.className = tblCls + ' collapsible ' + newClass;
    if (tblCls=='econLet' && year < 2002) {
      pdfNoteCls = (document.getElementById('getReader').className.indexOf('show')!=-1) ? 'show' : 'hide';
      document.getElementById('pdfNote' + year).className = (newClass=='show' && pdfNoteCls=='show') ? 'pdfNote show' : 'pdfNote hide';
    }
  }
}

function hideDiv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}
function showDiv(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}

document.writeln('<script src="http:\/\/frbsf.org\/ajax\/jquery\/jquery-1.4.min.js" type="text\/javascript">\n<\/script>');
document.writeln('<script src="\/scripts\/jquery.cookie.js" type="text\/javascript">\n<\/script>');
document.writeln('<script src="http:\/\/frbsf.org\/ajax\/includes.js" type="text\/javascript">\n<\/script>');
document.writeln('<script src="http:\/\/frbsf.org\/education\/activities\/drecon\/drecon_scripts.js" type="text\/javascript">\n<\/script>');
document.writeln('<script src="\/scripts\/urlnewwindow.js" type="text\/javascript">\n<\/script>');
