function GoldenCANSI_EncodeURL(url) { if (typeof(encodeURIComponent) == 'function') { return encodeURIComponent(url); } else { return escape(url); } } GoldenCANSI_Date = new Date(); GoldenCANSI_DateStamp = GoldenCANSI_Date.getMinutes() + GoldenCANSI_Date.getSeconds(); GoldenCANSI_PageURL = document.URL; GoldenCANSI_PageURL = GoldenCANSI_EncodeURL(GoldenCANSI_PageURL); function gc_CKP(event) { var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode; if (keyCode == 13) { //event.keyCode = 9; document.getElementsByName("gcsearch").item(0).focus(); gc_Submit() return false; } else return true; } function gc_Submit() { var SearchText = document.getElementsByName("goldencanst").item(0).value; if (SearchText == "") { alert("Please enter a search text."); return; } else { var URL = document.getElementsByName("gcurl").item(0).value; if (URL.indexOf("?") > 0) { URL += "&goldencanst=" + GoldenCANSI_EncodeURL(SearchText); } else { URL += "?goldencanst=" + GoldenCANSI_EncodeURL(SearchText); } GoldenCANSI_GoToURL(URL); } } function GoldenCANSI_GoToURL(URL) { document.location = URL; } document.write('');