var param; var listTab=[]; var tmpName=[]; var tmpData=[]; var timerESD; listTab[0]=0; listTab[1]=0; listTab[2]=0; listTab[3]=0; function secBoard(n) { _secTable=document.getElementById("secTable"); _mainTable=document.getElementById("mainTable"); param=n; _row=_secTable.rows[0]; for(i=0;i<_row.cells.length;i++){ if (i!=n){ _row.cells[i].className="sec1"; } } _row.cells[n].className="sec2"; //_tBodies=_mainTable.getElementsByTagName("tbody"); //alert (_tBodies.length); for(i=0;i<4;i++){ if (i!=n){ document.getElementById("mainTable"+i).style.display="none"; } } var obj=document.getElementById("mainTable"+n); if (listTab[n]==0){ if (n==3){ getProdCateInfo(n,obj); }else{ getIndCateInfo(n,obj); } } //obj.style.display="block"; obj.style.display=""; } function getIndCateInfo(n,obj){ IndexManager.queryCategory(n, { callback:function(list) { display(n,list,obj); }, errorHandler:function(errorString, exception) { handleError(errorString, exception) } }); } function getProdCateInfo(n,obj){ IndexManager.queryProductCategory( { callback:function(list) { display(n,list,obj); }, errorHandler:function(errorString, exception) { handleError(errorString, exception) } }); } function makeData(list){ tmpName=[]; tmpData=[]; var l=0; var j=0; var k=0; if (list.length>0){ tmpName[j]=list[l++]; tmpData[j]=[]; while (l"; td_2_2.innerHTML=""+tmpName[i].name+""; tr_2.appendChild(td_2_1); tr_2.appendChild(td_2_2); tbody_1.appendChild(tr_2); var tr_3 = document.createElement("tr"); var td_3_1 = document.createElement("td"); td_3_1.innerHTML=" "; var td_3_2 = document.createElement("td"); td_3_2.setAttribute("class","tugao"); td_3_2.className="tugao"; var str=""; for (m=0;m" + tmpData[i][m].name + ""; }else{ str+="" + tmpData[i][m].name + " | "; } } td_3_2.innerHTML=str; tr_3.appendChild(td_3_1); tr_3.appendChild(td_3_2); tbody_1.appendChild(tr_3); if (i%2==0){ td1.appendChild(table_1); }else{ td3.appendChild(table_1); } i++; } var table_1 = document.createElement("table"); table_1.setAttribute("width","100%"); var tbody_1 = document.createElement("tbody"); table_1.appendChild(tbody_1); var tr_1 = document.createElement("tr"); tr_1.setAttribute("align","right"); tbody_1.appendChild(tr_1); var td_1 = document.createElement("td"); td_1.innerHTML="更多>>"; tr_1.appendChild(td_1); td3.appendChild(table_1); tr1.appendChild(td1); tr1.appendChild(td2); tr1.appendChild(td3); tbody1.appendChild(tr1); var o=obj.rows[0].cells[0]; o.innerHTML=""; o.appendChild(table1); } var s_page=1; function getSupply() { IndexManager.getLimitSuply(s_page,{ callback:function(childCategorys) { setRefreshOptions(childCategorys); }, errorHandler:function(errorString, exception) { handleError(errorString, exception) } }); } setRefreshOptions = function(childCategorys){ var container = document.getElementById("supplyTest"); var table = document.createElement("table"); table.setAttribute("width","272"); table.setAttribute("border","0"); table.setAttribute("cellspacing","0"); table.setAttribute("cellpadding","0"); var supplyList = childCategorys.suplyList; var size = childCategorys.size; var length = supplyList.length; if(supplyList.length==7){ s_page++; }else{ s_page=1; } if(size==0){ s_page=2; } if(supplyList.length>7){ length = 7; } for(var i=0;i
"+list[0]+"
"; } else { td.setAttribute("width","112"); td.className="orange"; td.setAttribute("align","center"); td.innerHTML = "
  "+list[5]+"
" } } } var tr = table.insertRow(i); var td = tr.insertCell(0); td.colSpan=4; td.align="right"; td.innerHTML="更多  "; container.innerHTML=""; container.appendChild(table); } var d_page=1; function getDemand() { IndexManager.getLimitDemand(d_page,{ callback:function(demands) { setRefreshDemand(demands); }, errorHandler:function(errorString, exception) { handleError(errorString, exception) } }); } var setRefreshDemand = function(demands){ var childCategorys = demands.demandList; var size = demands.size; var container = document.getElementById("demandTest"); var table = document.createElement("table"); table.setAttribute("width","272"); table.setAttribute("border","0"); table.setAttribute("cellspacing","0"); table.setAttribute("cellpadding","0"); var length = childCategorys.length; if(childCategorys.length>7){ length = 7; } if(childCategorys.length==7){ d_page++; }else{ d_page=1; } if(size==0){ d_page=2; } for(var i=0;i
"+list[0]+"
"; } else { if(j==2){ td.setAttribute("width","80"); td.className="gray"; } td.setAttribute("align","center"); if(list[1]==null||list[1]==""){ td.innerHTML="待定"; }else { td.innerHTML=formatDate(new Date(),"yyyy-MM-dd");//+list[1]; } } } } var tr = table.insertRow(i); var td = tr.insertCell(0); td.colSpan=4; td.align="right"; td.innerHTML="更多  "; container.innerHTML=""; container.appendChild(table); } var e_page=1; function getEnterprise() { IndexManager.getLimitEnterprise(e_page,{ callback:function(enterprises) { setRefreshEnterprise(enterprises); }, errorHandler:function(errorString, exception) { handleError(errorString, exception) } }); } var setRefreshEnterprise = function(enterprises){ var childCategorys = enterprises.enterpriseList; var size = enterprises.size; var container = document.getElementById("enterpriseTest"); var table = document.createElement("table"); table.setAttribute("width","100%"); table.setAttribute("border","0"); table.setAttribute("cellspacing","0"); table.setAttribute("cellpadding","0"); var length = childCategorys.length; if(childCategorys.length>6){ length = 6; } if(childCategorys.length==6){ e_page++; }else{ e_page=1; } if(size==0){ e_page=2; } var tr = table.insertRow(0); var td = tr.insertCell(0); td.className="tugao"; str=""; for(var i=0;i "+list[0]+""; } td.innerHTML=str; container.innerHTML=""; container.appendChild(table); } function getFocusLinks() { LinkFocusManager.getLinks({ callback:function(focusLinks) { setRefreshFocusLinks(focusLinks); }, errorHandler:function(errorString, exception) { handleError(errorString, exception) } }); } var setRefreshFocusLinks = function (focusLinks){ var container = document.getElementById("focusLinksDiv"); var table = document.createElement("table"); table.setAttribute("width","98%"); table.setAttribute("border","0"); table.setAttribute("cellspacing","0"); table.setAttribute("cellpadding","0"); var length = focusLinks.length ; if(length>3){ length = 3 } for(var i=0 ;i'+focusLinks[i].title+''; } container.innerHTML=""; container.appendChild(table); } var n_page=1; function getNewsLimit() { IndexManager.getNews(n_page,{ callback:function(news) { setRefreshNews(news); }, errorHandler:function(errorString, exception) { handleError(errorString, exception) } }); } var setRefreshNews = function (news){ var newsList = news.newsList; var size = news.size; var container = document.getElementById("newsDiv"); var v_table = document.createElement("table"); var v_news = ""; var length = newsList.length; if(newsList.length > 5){ length = 5; } if(newsList.length==5){ n_page++; }else{ n_page=1; } if(size=='0'){ n_page=2; } for(var i=0 ;i
"+newsList[i].name+"
"; } if(j==2){ v_td.setAttribute("width","9%"); if(formatDate(newsList[i].create_time,"yyyy-MM-dd")==formatDate(new Date(),"yyyy-MM-dd")){ v_td.innerHTML = ""; } } } } container.innerHTML = "" ; container.appendChild(v_table); } var f_page=1; function getReferLimit() { IndexManager.getRefer(f_page,{ callback:function(refer) { setRefreshRefer(refer); }, errorHandler:function(errorString, exception) { handleError(errorString, exception) } }); } var setRefreshRefer = function (refer){ var referList = refer.referList; var size = refer.size; var container = document.getElementById("referDiv"); var v_table = document.createElement("table"); var v_refer = ""; var length = referList.length; if(referList.length>5){ length = 5; } if(referList.length==5){ f_page++; }else{ f_page=1; } if(size==0){ f_page=1; } for(var i=0 ;i
"+referList[i].name+"
"; } if(j==2){ v_td.setAttribute("width","10%"); if(formatDate(referList[i].create_time,"yyyy-MM-dd")==formatDate(new Date(),"yyyy-MM-dd")){ v_td.innerHTML = ""; } } } } container.innerHTML = "" ; container.appendChild(v_table); } function getData(){ getSupply(); getDemand(); getEnterprise(); } function getNewsAndRefer(){ getNewsLimit(); getReferLimit(); } function clearTimer(){ clearInterval(timerESD); }