﻿function runSearch(txtBox) {
    var strURL = '/search/results.aspx?cx=008112444754083711906:by91qmcqrse&cof=FORID:9&ie=UTF-8&q=';	
    var strSearch = txtBox!=null ? document.getElementById(txtBox).value : document.getElementById('txtSearch').value;

    if (strSearch != '') {
        strURL += strSearch;
        // go to search
        window.location = strURL;
    }
    else $(".searchError").show();
}
$(function(){
	$("#txtSearch").keypress(function(e) {
		if(e.keyCode == 13) {
			runSearch();
			return false;
		}
	});
});
