var _lastValue;function handleSearch(c,b){var a=c.charCode||c.keyCode;switch(a){case 13:return true;break;case 37:return;break;case 38:return;break;case 39:return;break;case 40:return;break;case 17:return;break;case 18:return;break}var c=document.getElementById(b);if(c.value!=""){if(c.value.length>0){Suggestion.GetSuggestedEntities(suggestSiteID,2057,suggestCurID,c.value,1,-1,cnOnRequestComplete)}else{return false}}}function cnOnRequestComplete(a){write(a)}function write(b){if(b.Items.length>0){recordCount=b.Items.length;var a="";var c=2;for(var d=0;d<recordCount;d++){var g=b.Items[d];if((g.rssMask&c)==c){if(g.EntityType==1){var e="";if(OnchangeSelected==g.SeaID){e='selected="selected"'}if(recordCount==1){a+='<option  value="'+g.SeaID+'" '+e+">"+g.SeaName+"</option>";if(!Postback){SendHTML(a)}}if(recordCount>1){a+='<option   value="'+g.SeaID+'" '+e+">"+g.SeaName+"</option>"}}}}$("#ctl00_cpLeft1_lbSeason").html(a);if(OnchangeSelected==""){$("#ctl00_cpLeft1_lbSeason option:first").attr("selected","selected")}else{$("#ctl00_cpLeft1_lbSeason").val(OnchangeSelected)}var f=0;$("#ctl00_cpLeft1_lbSeason option").each(function(h){f+=h});if(f==0&&Postback&&OnchangeSelected!=""){SendHTML(a)}if($("#ctl00_cpLeft1_lbSeason :selected").text()!=""){$("#ctl00_cpLeft1_lbSeason").click()}}if(b.Items.length==0){ClearResults()}}function ClearResults(){$("#ctl00_cpLeft1_lbPerformance").html("<option>"+message+"</option>");$("#ctl00_cpLeft1_lbSeason").html("<option>"+message+"</option>")}function ClearPerformance(){$("#ctl00_cpLeft1_lbPerformance").html("<option></option>")};