			function TopSearchEnter(myfield,e)
			{
				var keycode;
				if (window.event) keycode = window.event.keyCode;
				else if (e) keycode = e.which;
				else return true;
				if (keycode == 13)
  			{
   				submitTopSearch(myfield.form);
  	 			return false;
	   		}
				else
					return true;
			}

			function QuickSearchBar_Preselect( dropdown, src_id )
			{
				//alert('' + frm);
				if ( undefined == dropdown || undefined == src_id)
				{
					return 0;
				}
				//Company profiles have no src_id
				//Industry & Market Reports have a src_id of 0247 and a purchase_type of DBIND and purchase_format of XML?
				//Business Plans have a src_id of 0247?
				//Business Encyclopedias have a src_id of 0232
				
				//Industry Information is 0198?
				//Business Plans are 0247?
				//Content Map is 0198? /coms2/seocm_range_0198_
				//
				switch ( src_id )
				{
					case '0199':
					case '0198':
						dropdown.selectedIndex = '4';
					break;
					case '0247':
						dropdown.selectedIndex = '5';
					break;
					case '0232':
						dropdown.selectedIndex = '2';
					break;
				}
			}
				
			function submitTopSearch( frm )
			{
				//alert('' + frm.name);
				//return 0;
				//var str = frm.title.value;
				//var re = /'/g;
				//document.frmTopSearch.title.value = str.replace(re, "");
				if (frm.page.value == '')
				{
					alert('Please select a category');
					return 0;
				} 
				else if ( frm.title.value == '') {
					alert('Please enter a title to search for');
				}
				else {
					if (frm.page.value == 'dbcomp_search') {
						frm.action = 'http://goliath.ecnext.com/comsite5/bin/goliath2005_dbcomp_search_results_tt.pl';
						frm.publisher.value='0247';
						frm.company_name.value = frm.title.value;
					}
					if (frm.page.value == 'industries_search') {
						frm.action = 'http://goliath.ecnext.com/comsite5/bin/goliath_tt_industries_search_results.pl';
						frm.subject.value = frm.title.value;
					}
					if (frm.page.value == 'research_search') {
						frm.action = 'http://goliath.ecnext.com/comsite5/bin/goliath2005_research_search_results_tt.pl';
						frm.publisher.value='0199';
						frm.article_text.value = frm.title.value;
					}
					if (frm.page.value == 'gbp_search') {
						frm.action = 'http://goliath.ecnext.com/comsite5/bin/goliath2005_inv_search_results_tt.pl';
						frm.src_id.value='0247';
						frm.pub_code.value='BPH';
					}
					if (frm.page.value == 'encyclopedia_search') {
						frm.action = 'http://goliath.ecnext.com/comsite5/bin/goliath2005_inv_search_results_tt.pl?pub_type=E';
						frm.src_id.value='0232';
					}
					if (frm.page.value == 'courses_search') {
						frm.action = 'http://goliath.ecnext.com/comsite5/bin/goliath2005_courses_search_results_tt.pl';
					}
					frm.submit();
				}
			}

