function launchHelpWindow(pageName) { helpFilename = '/texas/help/' + pageName + '_help.shtml'; window.open(helpFilename,'helpWindow','toolbar=no,status=no,scrollbars=yes,resizable=no,width=500,height=500'); } function getBreedHelp() { var typeName = ""; for ( var i = 0; i < document.LostForm.TYPE.length; ++i) { if (document.LostForm.TYPE[i].checked == "1") { typeName = document.LostForm.TYPE[i].value.toLowerCase(); if ((typeName == "dog") || (typeName == "cat") || (typeName == "bird")) { launchHelpWindow(typeName + 'breed'); } else { alert("Sorry, breed help is only available for Dogs, Cats and Birds."); } } } } function fillSearchTextbox(nameIn) { document.NumberOneForm.editBox.value = nameIn; } function fillTextbox(nameIn) { opener.document.LostForm.BREED.value = nameIn; window.close(); } function clearTextbox() { document.LostForm.BREED.value = ""; } function mixedBreed() { var breedName = ""; var countBreeds = 0; for (var i = 0; i < document.NumberOneForm.elements[0].options.length; i++) { if (document.NumberOneForm.elements[0].options[i].selected) { if (countBreeds > 0) //At least the second time through { breedName += "/"; } breedName += document.NumberOneForm.elements[0].options[i].value; countBreeds++; } } if (countBreeds > 1) { breedName += " Mix"; } return breedName; } function messageOn(messageURL) { document.images.ImportantMessage.src = "images/" + messageURL; } // This function is included to overcome a bug in Netscape's implementation // of the escape () function: function myunescape (str) { str = '' + str; while (true) { var i = str . indexOf ('+'); if (i < 0) break; str = str . substring (0, i) + ' ' + str . substring (i + 1, str . length); } return unescape (str); } // This function creates the args [] array and populates it with data // found in the URL's search string: function args_init () { args = new Array (); var argstring = window . location . search; if (argstring . charAt (0) != '?') return; argstring = argstring . substring (1, argstring . length); var argarray = argstring . split ('&'); var i; var singlearg; for (i = 0; i < argarray . length; ++ i) { singlearg = argarray [i] . split ('='); if (singlearg . length != 2) continue; var key = myunescape (singlearg [0]); var value = myunescape (singlearg [1]); args [key] = value; } }