function gc_EncodeURL(url) { if (typeof(encodeURIComponent) == 'function') { return encodeURIComponent(url); } else { return escape(url); } } gc_Date = new Date(); gc_DateStamp = gc_Date.getMinutes() + gc_Date.getSeconds(); gc_PageURL = document.URL; gc_PageURL = gc_EncodeURL(gc_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 == "") { 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; if (URL.indexOf("?") > 0) { URL += "&goldencanst=" + gc_EncodeURL(SearchText); } else { URL += "?goldencanst=" + gc_EncodeURL(SearchText); } gc_GoToURL(URL); } } function gc_GoToURL(URL) { document.location = URL; } document.write('');