var g_toppatent_c=new Array();var g_toppatentcolor_c=new Array();var g_toppatentRowArray1_c=new Array();var g_toppatentRowArray2_c=new Array();function loadPreference(){}function setFilterStatus(){if(!g_queryfilter_disable&&(!isNullorEmpty(g_pabdate)||!isNullorEmpty(g_infdate)||(!isNullorEmpty(g_queryfilter)&&g_queryfilter_click))){g_queryfilter_status=true}else{g_queryfilter_status=false}}function disablePreference(a){g_queryfilter_disable=!g_queryfilter_disable;if(g_queryfilter_disable){a.innerHTML=c_sEnable}else{a.innerHTML=c_sDisable}setFilterStatus()}function onUpdatePreferenceClick(){var a=dojo.byId("preference-preferencelist");updatePreference();a.style.display="none"}function resetPreference(){g_pns="";g_toppatent_c=new Array();g_toppatentcolor_c=new Array();g_toppatentRowArray1_c=new Array();g_toppatentRowArray2_c=new Array();g_queryfilter="";var a=dojo.byId("preference-info-form");a.stp.value="";a.sqf.value="";a.spabd.value="";a.sinfd.value="";if(g_isLogin){updatePreference()}var b=dojo.byId("preference-preferencelist");b.style.display="none";setFilterStatus()}function updatePreference(){var a=dojo.byId("preference-info-form");g_pabdate=a.spabd.value;g_infdate=a.sinfd.value;g_queryfilter=a.sqf.value;updateTopPatents();if(dojo.byId("search-filter-click-checkbox").checked){g_queryfilter_click=true}else{g_queryfilter_click=false}setFilterStatus()}function updateTopPatents(){var c=dojo.byId("preference-info-form").stp.value;g_toppatent_c=new Array();g_toppatentcolor_c=new Array();g_toppatentRowArray1_c=new Array();g_toppatentRowArray2_c=new Array();if(isNullorEmpty(c)||dojo.string.trim(c)==""){return}var a=c_sQueryFulltext+"&ipt=0&ips=100&idi="+DATABASE_ALL+'&foo=SEARCH-MASTER-TOP-C&sq=pns/"'+c+'"&random='+Math.random();var b={url:a,handleAs:"text",load:function(e,d){g_pns=c;var l=document.createElement("div");l.innerHTML=XSLTtrans(e,c_sXslFileQueryFulltext);var h=l.getElementsByTagName("table");if(h==null){return}for(var g=0;g<h.length;g++){if(h[g].id=="querylist-queryresult-table-SEARCH-MASTER-TOP-C"){table=h[g];break}}if(table==null){return}for(var g=1;g<table.rows.length;g+=2){var k=table.rows[g];if(k==null||dojox.data.dom.textContent(k.cells[1])==""){continue}var j=table.rows[g+1];var f=k.cells[0].getElementsByTagName("span")[0].pn;g_toppatent_c[g_toppatent_c.length]=getNormalizedPN(f);g_toppatentcolor_c[g_toppatentcolor_c.length]=k.Color;g_toppatentRowArray1_c[g_toppatentRowArray1_c.length]=k;g_toppatentRowArray2_c[g_toppatentRowArray2_c.length]=j}},error:function(e,d){alert(e.message)}};dojo.xhrGet(b)};
