function GoldenCANSIMM_EncodeURL(url) { if (typeof(encodeURIComponent) == 'function') { return encodeURIComponent(url); } else { return escape(url); } } GoldenCANSIMM_Date = new Date(); GoldenCANSIMM_Date = GoldenCANSIMM_EncodeURL(GoldenCANSIMM_Date); GoldenCANSIMM_PageURL = document.URL; GoldenCANSIMM_PageURL = GoldenCANSIMM_EncodeURL(GoldenCANSIMM_PageURL); function GoldenCANSIMM_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 == "") { if (document.getElementsByName("goldencanst").item(1)) { SearchText = document.getElementsByName("goldencanst").item(1).value; } } if (SearchText == ""){ alert("Please enter a search text."); return; } else { var URL = document.getElementsByName("gcurl").item(0).value; var sType = ""; if (document.getElementsByName("goldencanstype").item(0)) { sType = document.getElementsByName("goldencanstype").item(0).checked; } if (URL.indexOf("?") > 0) { URL += "&goldencanst=" + GoldenCANSIMM_EncodeURL(SearchText); } else { URL += "?goldencanst=" + GoldenCANSIMM_EncodeURL(SearchText); } URL += "&goldencanstype=" + sType; GoldenCANSIMMGoToURL(URL); } } function GoldenCANSIMMGoToURL(URL) { document.location = URL; } document.write('');