4
| <![CDATA[<script>
function stringReplace(form) {
var replaceStr = form.keyword.value;
var pattern = /\;/g;
form.keyword.value = replaceStr.replace(pattern, " ");
if (trim(form.keyword.value, " ").length == 0) {
window.location.href = "search?browse-all=yes";
return false;
}
}
function stringReplace2(form) {
var replaceStr = form.keyword.value;
var pattern = /\;/g;
form.keyword.value = replaceStr.replace(pattern, " ");
}
function trim(str, chars) {
return ltrim(rtrim(str, chars), chars);
}
function ltrim(str, chars) {
chars = chars || "\\s";
return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
}
function rtrim(str, chars) {
chars = chars || "\\s";
return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
}
</script>]]>
|