/* FILE ARCHIVED ON 1:17:15 Sep 16, 2008 AND RETRIEVED FROM THE AN OPENWAYBACK INSTANCE ON 23:00:07 Apr 28, 2024. JAVASCRIPT APPENDED BY OPENWAYBACK, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ function submitSearch() { f = document.forms[1]; // Sometimes there are so many forms that it's not on the first one. if (typeof f.Query == "undefined") { f = document.forms[2]; } Query = f.Query.value if (Query == "") { alert("Must fill in a Query string") f.Query.focus() return false } f.submit() } function GP_popupConfirmMsg(msgCode) { if (msgCode == 1) { msg = "This link will take you to a non-federal site. " + "You may wish to review their privacy policy since their " + "information-collection practices may differ from ours.\r\r" + "Our linking to this site does not constitute an endorsement " + "of any products, services or information found on this non-federal site." } if (msgCode == 2) { msg = "This link will take you to a government site " + "which is not administered by STAT-USA. " + "You may wish to review their privacy policy since their " + "information-collection practices may differ from ours."} document.MM_returnValue = confirm(msg); } function openWin(URL, name) { popupWin = window.open(URL, name, 'toolbar=no,resizable,scrollbars=yes,width=630,height=470,left=10,top=10'); } function popLoc(Parm, name) { // Presuming Parm is something like FileExt=ZIP if (typeof(name) == "undefined") { i = Parm.lastIndexOf("="); newName = Parm.substring(i + 1, Parm.length); } else { newName = name } // The big disadvantage to redefining newName is that the Google toolbar will // consider this to be a pop-up ad and block it for you! Maybe... popupWin = window.open('/stemplate.nsf/frmPopLoc?OpenForm&' + Parm, newName, 'toolbar=no,resizable,scrollbars=yes,width=500,height=400'); } // Function is used in searching in order to determine what database view you're watching. function SrchSetPgm() { f = document.forms[1]; var CurView = window.location.pathname.toUpperCase(); // alert(CurView); i = CurView.lastIndexOf("/"); // alert(CurView + " i=" + i + " len=" + CurView.length); if (i < (CurView.length - 1)) { CurView = CurView.substring(i + 1, CurView.length); } else { // alert("Trying the second approach") CurView = CurView.substring(0, (CurView.length - 1)); i = CurView.lastIndexOf("/"); // alert(CurView + " i=" + i + " len=" + CurView.length); CurView = CurView.substring(i + 1, CurView.length); } /* Since you're using pathname, the items after ? are automatically gone. */ // alert("CurView=" + CurView); /* Now we see if we can find this value in the list of choices. */ // alert(f.WhichView.length) // alert("true=" + true + " false=" + false) var HitSomething = false for (i = 0; i < f.WhichView.length; i++) { v = f.WhichView.options[i].value.toUpperCase(); // alert(i + "=" + v); if (v == CurView) { f.WhichView.options[i].selected = true // alert(i + "=" + v); HitSomething = true } else { // For some databases, the string is /TOP.NSF/BYCOUNTRY and // you'll never find BYCOUNTRY equal to that so trying a second // approach if necessary. j = v.lastIndexOf("/") if (j > 0) { // alert(v.substr(j + 1)); if (v.substr(j + 1) == CurView) { f.WhichView.options[i].selected = true // alert(i + "=" + v); HitSomething = true } else { f.WhichView.options[i].selected = false } } else { f.WhichView.options[i].selected = false } } } document.Search.Query.focus(); }