if(typeof Util=="undefined"){Util={};}Util.isIE=(navigator.appName.indexOf("Microsoft",0)!=-1)?true:false;Util.getBodyHeight=function(){var a=Util.getBodyDim();return a.H;};Util.getBodyDim=function(){var a={};if(window.innerWidth){a.W=window.innerWidth;a.H=window.innerHeight;}else{if(document.documentElement&&document.documentElement.clientWidth){a.W=document.documentElement.clientWidth;a.H=document.documentElement.clientHeight;}else{if(document.body){a.W=document.body.clientWidth;a.H=document.body.clientHeight;}}}return a;};Util.getScrollTop=function(){var a;if(typeof window.pageYOffset!="undefined"){a=window.pageYOffset;}else{if(typeof document.compatMode!="undefined"&&document.compatMode!="BackCompat"){a=document.documentElement.scrollTop;}else{if(typeof document.body!="undefined"){a=document.body.scrollTop;}}}return a;};Util.randomString=function(g,f){var b="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";var e=b+"0123456789";var d="";for(var c=0;c<g;c++){if(f&&c==0){var a=Math.floor(Math.random()*b.length);d+=b.substring(a,a+1);}else{var a=Math.floor(Math.random()*e.length);d+=e.substring(a,a+1);}}return d;};Util.setCookie=function(c,e,a,g,d,f){var b=c+"="+escape(e)+((a)?"; expires="+a.toGMTString():"")+((g)?"; path="+g:"")+((d)?"; domain="+d:"")+((f)?"; secure":"");document.cookie=b;};Util.getCookie=function(c){var b=document.cookie;var e=c+"=";var d=b.indexOf("; "+e);if(d==-1){d=b.indexOf(e);if(d!=0){return null;}}else{d+=2;}var a=document.cookie.indexOf(";",d);if(a==-1){a=b.length;}return unescape(b.substring(d+e.length,a));};Util.AddEvent=function(d,c,b,a){if(d.addEventListener){d.addEventListener(c,b,a);}else{if(d.attachEvent){d.attachEvent("on"+c,b);}}};Util.RemoveEvent=function(d,c,b,a){if(d.removeEventListener){d.removeEventListener(c,b,a);}else{if(d.detachEvent){d.detachEvent("on"+c,b);}}};Util.StrFmt=function(){var a=arguments[0],c=a.split("%s"),d=new Array();for(var b=0;b<c.length;b++){d.push(c[b]);if(b+1<arguments.length&&b!=c.length-1){d.push(arguments[b+1]);}}return d.join("");};Function.prototype._Bind=function(){var d=this,b=arguments[0],a=new Array();for(var c=1;c<arguments.length;c++){a.push(arguments[c]);}return function(){var f=[];for(var e=0;e<arguments.length;e++){f.push(arguments[e]);}return d.apply(b,f.concat(a));};};Function.prototype._BindForEvent=function(){var d=this,b=arguments[0],a=new Array();for(var c=1;c<arguments.length;c++){a.push(arguments[c]);}return function(e){return d.apply(b,[(e||window.event)].concat(a));};};Util.Extend=function(e,c){var b={};var d=new Util.cloneObject(e);for(var a in c){if(typeof b[a]=="undefined"||b[a]!=c[a]){d[a]=c[a];}}if(Util.isIE&&typeof c.toString=="function"&&c.toString!=d.toString){d.toString=c.toString;}return d;};Util.cloneObject=function(a){for(i in a){this[i]=a[i];}};if(!Util){Util={};}Util.MergeObj=function(d,c){var b,a;if(!d){d={};}if(c){for(a in c){if(typeof(c[a])!="undefined"){d[a]=c[a];}}}return d;};Util._fcSearch=function(c,b){if(b instanceof Array){for(var a in b){if(b[a].toString().toLowerCase()==c){return 1;}}}else{if(typeof(b)=="string"){if(b.toLowerCase()==c){return 1;}}}return 0;};Util.FindChildren=function(e,d){var c,b=[];if(!e||!e.childNodes){return b;}for(c=0;c<e.childNodes.length;c++){if(e.childNodes[c].tagName&&Util._fcSearch(e.childNodes[c].tagName.toLowerCase(),d)){b.push(e.childNodes[c]);}}return b;};Util.ReplaceCss=function(l,j,k,e){var d,g,b,h;h=0;if(!l){g=e?e:"";}else{g=l.className?l.className.toString():"";}b=g.split(" ");if(!b.join){b=[];}for(d=0;d<b.length;d++){if(b[d]==k){h|=1;}else{if(b[d]==j){break;}}}if(d<b.length){if(k){b[d]=k;}else{b.splice(d,1);}}else{if(k&&!(h&1)){b.push(k);}}e=b.join(" ");if(l){l.className=e;}return e;};Util.AddComma=function(b){var a=/(\d{1,3})(?=(\d{3})+(?:$|\.))/g;return b.replace(a,"$1,");};Util.StrTemplate=function(){var a;var b=arguments[0];for(a=1;a<arguments.length;a++){b=b.replace("{$"+a+"}",arguments[a]);b=b.replace("$"+a,arguments[a]);}return b;};Util.HideObj=function(c,b){if(c){if(b===1||b===true||b===undefined){if(c.style.display!="none"){c.style.display="none";}}else{if(b===0||b===false){if(c.style.display){c.style.display="";}}else{if(b==-1){c.style.display=(c.style.display=="none")?"":"none";}}}}};Util.SL_ArraySearch=function(d,c){if(c instanceof Array){for(var b in c){if(c[b]==d){return b;}}}};if(typeof IO=="undefined"){IO={};}IO.SRV=function(){this.Init.apply(this,arguments);};IO.SRV.prototype={_xhr:null,_url:null,_cblist:[],_err_cb:null,Init:function(c,d,a){var b={};if(a){b.randomURL=true;}if(d){b.err_cb=d;}this._err_cb=d;this._xhr=new IO.Ajax(b);this._url=c;},Call:function(b,c,h,j){var g=this._url+"/"+b;var a="";var m={};if(typeof h=="object"){for(var e in h){var f=encodeURIComponent(h[e]);if(a==""){a=e+"="+f;}else{a+="&"+e+"="+f;}}m.postBody=a;}var d=this._cblist.length;this._cblist[d]=c;if(j){this._xhr.get(g+(a?("?"+a):""),this._StdCallBack(this,d));}else{this._xhr.post(g,this._StdCallBack(this,d),m);}},_StdCallBack:function(o,a_idx){return function(rtn){var l_cb=o._cblist[a_idx];delete o._cblist[a_idx];if(!rtn.responseText){if(l_cb){l_cb();}return;}try{eval("var v_l_data = "+rtn.responseText);}catch(e){o._err_cb(4000,rtn.responseText);return;}if(v_l_data&&v_l_data.__ERROR){o._err_cb(8001,v_l_data.__ERROR,v_l_data.__ERRORNO);}else{if(l_cb){l_cb(v_l_data,rtn.responseText);}}};}};if(typeof IO=="undefined"){IO={};}IO.XSRV2=function(){this.Init.apply(this,arguments);};IO.XSRV2.CallbackList=[];IO.XSRV2.prototype={_url:null,_err_cb:null,_loader:null,Init:function(c,e,a){var b={};var d;this._err_cb=e;this._url=c;d=document.getElementsByTagName("head")[0];if(d){this._loader=d;}else{this._loader=document.body;}this._randUrl=a;},jshash:function(o){var l,g,e,k,h,f,d,b;var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_$";var m=function(c,a){return((c|(c<<6))>>>(a%6))&63;};l=[];k=[];for(g=0;g<o.length;g++){h=o.charCodeAt(g);if(h&~255){h=(h>>8)^h;}k.push(h);if(k.length==3||g==o.length-1){while(k.length<3){k.push(0);}l.push((k[0]>>2)&63);l.push(((k[1]>>4)|(k[0]<<6))&63);l.push(((k[1]<<4)|(k[2]>>2))&63);l.push(k[2]&63);k=[];}}while(l.length<16){l.push(0);}b=0;for(g=0;g<l.length;g++){b^=(m(l[g]^(b|g),g)^m(g,b))&63;}for(g=0;g<l.length;g++){l[g]=(m((b|g&l[g]),b)^l[g])&63;b+=l[g];}for(g=16;g<l.length;g++){l[g%16]^=(l[g]+(g>>>4))&63;}for(g=0;g<16;g++){l[g]=n.substr(l[g],1);}l=l.slice(0,16).join("");return l;},Call:function(b,c,m,f){var n=[];for(var d in m){n.push(encodeURIComponent(d)+"="+encodeURIComponent(m[d]));}if(this._randUrl){n.push(encodeURIComponent(this._randUrl)+"="+Math.floor(60466176*Math.random()).toString(36));}n=n.join("&");var g,o,e;o=b+"?"+n;if(f&&f!==true){g=cid;}else{g=this.jshash(o);for(e=0;IO.XSRV2.CallbackList[g];e++){g=this.jshash(o+"#@`"+e);}}var j=this._url+"/IO.XSRV2.CallbackList['"+g+"']/"+b;if(n){j+="?"+n;}var l=document.createElement("script");l.type="text/javascript";l.src=j;IO.XSRV2.CallbackList[g]=function(a){l.parentNode.removeChild(l);c(a,g);delete IO.XSRV2.CallbackList[g];};this._loader.appendChild(l);}};if(typeof IO=="undefined"){IO={};}IO.Ajax=function(){this.Init.apply(this,arguments);};IO.Ajax.prototype={_standbyXmlHttpArray:[],_pendingXmlHttpArray:[],Init:function(a){if(a){if(a.nopool){this._nopool=true;}if(a.randomURL){this._randomURL=true;}if(a.err_cb){this._err_cb=a.err_cb;}}},get:function(b,c,a){if(typeof a=="undefined"){a={};}a.method="GET";this.request(b,c,a);},post:function(b,c,a){if(typeof a=="undefined"){a={};}a.method="POST";this.request(b,c,a);},request:function(c,e,b){var d=this.getXmlHttp();if(d){if(!b){b={};}if(!b.method){b.method="GET";}this._opt=b;this.registerXmlhttpCallback(d,e);if(this._randomURL){var a=(c.indexOf("?")==-1)?"?":"&";c+=a+Math.round(Math.random()*2147483648);}d.open(b.method,c,true);if(b.method="POST"){d.setRequestHeader("Content-type","application/x-www-form-urlencoded");d.send(b.postBody);}else{d.send(null);}}else{if(this._err_cb){this._err_cb(2000);}}},registerXmlhttpCallback:function(a,d){var b=this._pendingXmlHttpArray.length;this._pendingXmlHttpArray[b]=a;a.onreadystatechange=this._internalXmlhttpCallback(this,d,b);},getXmlHttp:function(){if(this._nopool){return this._createXmlHttp();}var a=this._standbyXmlHttpArray.pop();if(!a){a=this._createXmlHttp();}setTimeout(this._supplyXmlHttp(this),this._standbyXmlHttpArray.length*20);return a;},_supplyXmlHttp:function(a){return function(){try{while(a._standbyXmlHttpArray.length<5){a._standbyXmlHttpArray.push(a._createXmlHttp());}}catch(b){}};},_createXmlHttp:function(){var f=null;var a="Msxml2.XMLHTTP";try{f=new ActiveXObject(a);}catch(j){try{a="Microsoft.XMLHTTP";f=new ActiveXObject(a);}catch(h){}}if(!f){try{f=new XMLHttpRequest;}catch(g){}}return f;},_internalXmlhttpCallback:function(c,d,b){var a=false;return function(){var e=c._pendingXmlHttpArray[b];try{if(c._opt.raw){a=true;}else{if(e.readyState==4&&e.status==200){a=true;}}}catch(f){if(c._err_cb){c._err_cb(f);}}if(a){d(e);}if(e.readyState==4){setTimeout(function(){e.onreadystatechange=c._doNothing;delete c._pendingXmlHttpArray[b];},1000);}};},_doNothing:function(){}};if(typeof(S_Finance)=="undefined"){S_Finance={};}S_Finance.IO=function(){this.Init.apply(this,arguments);};S_Finance.IO.prototype={_scriptCharset:"gb2312",_randomURL:false,Init:function(b,a){var c;if(b){if(b.randomURL){this._randomURL=true;}if(b.scriptCharset){this._scriptCharset=b.scriptCharset;}}if(a){this._parent=a;}else{c=document.getElementsByTagName("head")[0];this._parent=c?c:document.body;}},load:function(b,d,f,e){if(this._randomURL){var a=(b.indexOf("?")==-1)?"?":"&";b+=a+Math.round(Math.random()*2147483648);}var c=this._createScriptTag();if(f){if(typeof f=="string"&&e){this._load_by_remote_cb(c,b,f,e,d);}else{this._load_by_local_cb(c,b,f,d);}}else{this._load_by_code(c,b,d);}},_load_by_local_cb:function(d,b,a,c){d.charset=this._scriptCharset;d.src=b;d.id=c;this._parent.appendChild(d);if(d.addEventListener){d.addEventListener("load",this._chck_s_state(d,a),false);}else{if(d.attachEvent){d.attachEvent("onreadystatechange",this._chck_s_state(d,a));}}},_load_by_remote_cb:function(d,b,f,e,c){var a=(b.indexOf("?")==-1)?"?":"&";b+=a+e+"="+f;d.charset=this._scriptCharset;d.src=b;d.id=c;this._parent.appendChild(d);this._clean_up_script_tag(d);},_load_by_code:function(c,a,b){c.charset=this._scriptCharset;c.src=a;c.id=b;this._parent.appendChild(c);this._clean_up_script_tag(c);},_createScriptTag:function(){var a=document.createElement("script");a.type="text/javascript";return a;},_clean_up_script_tag:function(a){if(a.addEventListener){a.addEventListener("load",this._rmvScriptTag(a),false);}else{if(a.attachEvent){a.attachEvent("onreadystatechange",this._rmvScriptTag(a));}}},_chck_s_state:function(b,a){return function(){if(b.readyState){if(b.readyState!="loading"){a(b);}}else{a(b);}};},_rmvScriptTag:function(a){return function(){if(a.readyState){if(a.readyState=="loaded"||a.readyState=="complete"){a.parentNode.removeChild(a);}}else{a.parentNode.removeChild(a);}};}};S_Finance.QuotesDataLight=function(){this.Init.apply(this,arguments);};S_Finance.QuotesDataLight.prototype={CODEPERQUERY:100,SCRIPTIDPRE_:"_s_qdl_",QUOTESURL:"http://hq.sinajs.cn/",JSVARPRE:"hq_str_",_scriptidseq:0,_iTmr:0,_oTmr:null,_fReq:null,_ofio:null,_dp:S_Finance.cnProcess,Init:function(c,d,a,b){this._arrCodeList=[];this._arrCodeType=[];this.SCRIPTIDPRE=this.SCRIPTIDPRE_+(new Date().getTime()%46656).toString(36)+"_";this._scriptidseq=0;if(b){this._dp=b;}else{this._dp=S_Finance.cnProcess;}this._ofio=new S_Finance.IO();this._arrCodeList=c;this._fReq=a;this.changeTimer(d);},changeCodes:function(a,b){this._aResult=[];this._arrCodeList=a;if(b){this._arrCodeType=b;}this.changeTimer(this._iTmr);},changeTimer:function(a){if(this._oTmr){clearInterval(this._oTmr);this._oTmr=null;}if(a){this._oTmr=setInterval(this._timerCallback._Bind(this),a);this._iTmr=a;}},start:function(){this.changeTimer(this._iTmr);},stop:function(){this.changeTimer(0);},_timerCallback:function(){return this.request();},_getQueryExp:function(a){var c,b;c=(this._arrCodeType[a]&&S_Finance[this._arrCodeType[a]])?S_Finance[this._arrCodeType[a]]:this._dp;if(!(b=c.QueryExp)){b=this._arrCodeList[a];}else{b=typeof(b)=="function"?b(this._arrCodeList[a]):b.replace("$1",this._arrCodeList[a]);}return this._specialchars(b);},request:function(c){var k,e,l,f,d,b,m;this._aResult=[];m="";if(typeof(c)=="undefined"&&this._dp.ExtraPara){c=this._dp.ExtraPara;}if(typeof(c)=="string"){m=c;}else{if(typeof(c)=="object"){m=[];for(var h in c){m.push(encodeURIComponent(h)+"="+encodeURIComponent(c[h]));}m=m.join("&");}}f=Math.ceil(this._arrCodeList.length/this.CODEPERQUERY);for(e=0;e<f;e++){k=this._getCodeSector(e);for(d=0;d<k.length;d++){k[d]=this._getQueryExp(e*this.CODEPERQUERY+d);}if(m){m+="&";}l=this.QUOTESURL+"rn="+Math.round(Math.random()*60466176).toString(36)+"&"+m+"list="+k.join(",");this._ofio.load(l,this.SCRIPTIDPRE+(this._scriptidseq++),this._reqCallback._Bind(this,e));}},_getCodeSector:function(a){var b=Math.ceil(this._arrCodeList.length/this.CODEPERQUERY);return this._arrCodeList.slice(a*this.CODEPERQUERY,(a==b-1)?this._arrCodeList.length:(a+1)*this.CODEPERQUERY);},_reqCallback:function(g,d){var c,b,e,f,h;b=this._getCodeSector(d);for(c=0;c<b.length;c++){h=d*this.CODEPERQUERY+c;e=this._getQueryExp(h);f=(this._arrCodeType[h]&&S_Finance[this._arrCodeType[h]])?S_Finance[this._arrCodeType[h]]:this._dp;this._aResult[h]=this._absconv(((e.substr(0,2)=="s_")?f.ABSshortVer:f.ABSlongVer),(window[this.JSVARPRE+e]));}this._checkReady();},_absconv:function(e,g){var c,b;c={};if(e instanceof Array){if(g&&g.indexOf(",")>=0){b=g.split(",");for(i=0;i<e.length;i++){c[e[i]]=b[i];}}else{for(i=0;i<e.length;i++){c[e[i]]="";}}}else{if(typeof(e)=="function"){c=e(g);}}return c;},_specialchars:function(a){return a.replace(/\./g,"").replace(/&/g,"");},_checkReady:function(b){var a;for(a=0;a<this._arrCodeList.length;a+=this.CODEPERQUERY){if(typeof(this._aResult[a])=="undefined"){return false;}}if(!b){if(this._fReq){this._fReq(this._aResult);}}return true;}};S_Finance.cnProcess={ABSshortVer:["name","latestdeal","updownvol","updownrange","dealvol","dealprice"],ABSlongVer:["name","todayopen","yesterdayclose","latestdeal","highdeal","lowdeal","buy","sell","dealvol","dealprice","buyvol1","buyprice1","buyvol2","buyprice2","buyvol3","buyprice3","buyvol4","buyprice4","buyvol5","buyprice5","sellvol1","sellprice1","sellvol2","sellprice2","sellvol3","sellprice3","sellvol4","sellprice4","sellvol5","sellprice5","quotesdate","quotestime"]};S_Finance.corpProcess={QueryExp:"$1_i",ABSlongVer:["type","name_py","eps","q4_eps_sum","latest_eps","nta","lastfive","total_capital","curr_capital","curr_a_capital","curr_b_capital","price_currency"]};S_Finance.forexProcess={QueryExp:"$1",ABSlongVer:["time","buy_price","sell_price","last_close_price","margin","open_price","high_price","low_price","close_price","name"]};S_Finance.fundNetProcess={QueryExp:"f_$1",ABSlongVer:["name","dwjz","ljdwjz","zrjz","date","jjgm"]};S_Finance.fundProcess={QueryExp:"fu_$1",ABSshortVer:["name","time","nav_chg","pre_nav","last_nav"],ABSlongVer:["name","time","pre_nav","last_nav","accu_nav","wfzs","nav_chg"]};S_Finance.futuresProcess={ABSlongVer:["name","ticktime","open","high","low","close","bid","ask","trade","settlement","prevsettlement","bidvol","askvol","ticktime","volume","market","contract","tradedate"]};S_Finance.globalProcess={QueryExp:"b_$1",ABSlongVer:["name","price","change","changerate","time"]};S_Finance.hkProcess={QueryExp:"hk$1",ABSlongVer:["engname","name","open","prevclose","high","low","lasttrade","change","changeRate","buy","sell","currentvolume","volume","PE","Yield","high_52week","low_52week","Update_Date","ticktime"]};S_Finance.usProcess={QueryExp:function(a){return"gb_"+a.toLowerCase();},ABSlongVer:["cname","price","chg","updtime","diff","open","high","low","_52whigh","_52wlow","volume","avgvol","mktcap","eps","pe","fpe","beta","dividend","yield","shares","instown","newprice","newchg","newdiff","newustime","ustime","prevclose"]};S_Finance.futuresIndexProcess={QueryExp:"CFF_$1",ABSlongVer:["open","high","low","trade","volume","amount","position","close","settlement","tradingboard","dailylimit","prevactual","actual","prevclose","prevsettlement","prevposition","buyprice1","buyvol1","buyprice2","buyvol2","buyprice3","buyvol3","buyprice4","buyvol4","buyprice5","buyvol5","sellprice1","sellvol1","sellprice2","sellvol2","sellprice3","sellvol3","sellprice4","sellvol4","sellprice5","sellvol5","date","ticktime","microsec"]};S_Finance.futuresGlobalProcess={QueryExp:"hf_$1",ABSlongVer:["last","pricechange","bid","ask","high","low","timeupdate","prev","open","totalvol","bidsize","asksize","currentvol","dateupdate"]};S_Finance.twIndexProcess={QueryExp:"twi_$1",ABSshortVer:["trade_day","time","pri","preclose","ttlvol","ttlamt","name"],ABSlongVer:["trade_day","time","pri","open","preclose","high","low","ttlvol","vol","ttlamt","ttldealrec","index","ttlbuyrec","ttlsellrec","ttlbuyvol","ttlsellvol","cntup","cntdown","cnteve","cntupstop","cntdownstop","cntundeal","outmkt","inmkt","cntbuy","cntsell","cntbuystop","cntsellstop","chgpct","name"]};S_Finance.goldProcess={QueryExp:"SGE_$1",ABSlongVer:["symbol","name","webname","trade","settlement","prevsettlement","open","high","low","close","bid","ask","bidvol","askvol","volume","amount","ticktime","changepercent"]};if(typeof $C=="undefined"){$C=function(a){return document.createElement(a);};}if(typeof $T=="undefined"){$T=function(a){return document.createTextNode(a);};}S_SL=function(){this.Init.apply(this,arguments);};S_SL.WAITMASK={a:{}};S_SL.prototype={VERSION:[1,3,12],_ARROWS:["↑","↓","　","　"],_IDPREFIX:"s_sl_id_",_CSSIGNORE:"s_sl_ignore",Init:function(a,k,g,l,e,c,h){var m,f,b,d;this._cp=null;this._srv="";this._sID="sl_sid_"+a+"_"+Math.floor(60466176*Math.random()).toString(36);this._oDivRoot=null;this._oDivPage=null;this._oPage={_aEvents:[],itemCount:-1};this._oTmr={cnt:0};this._aCodes=[];this._cntCol=0;this._aEvents=[];this._aHead=[];this._aCells=[];this._aRows=[];this._aData=[];this._oCfg=this.MergeObj(this.MergeObj({},window.SINA_STOCKLIST_CONFIG),h);d=this.MergeObj({},g);for(var j in d){if(j.substr(0,5)=="EXFP_"){this._oCfg[j.substr(5)]=d[j];delete d[j];}}this._initCP(a,d,c);if(!this._cp){return;}this._oCBCol=(typeof(l)!="object")?{pc:l}:l;this._oDivRoot=typeof(k)=="string"?document.getElementById(k):k;if(m=this._searchBuiltTable()){this._buildTable(m);}else{this._oDivRoot.appendChild(this._buildTable());}if(e==""){e=[];}if(!(e instanceof Array)){e=[e];}this._oDivPage=[];for(f=0;f<e.length;f++){b=document.getElementById(e[f]);if(!b){b=$C("div");b.className=this._cp.css.pagediv;this._oDivRoot.appendChild(b);}this._oDivPage.push(b);}this._addEvent(window,"scroll",this._scroll._BindForEvent(this));this._sortcss();this._getStockCount();this.SetReqAction("init");this._getDataFromService();this.ResetTimer();},_scroll:function(){this._makeWMScroll();},_searchBuiltTable:function(){var b=Util.FindChildren(this._oDivRoot,"table");if(b&&b.length){return b[0];}return null;},GetDataAtOnce:function(){return this._getDataFromService();},ResetTimer:function(){this.EnableTimer(false);this.EnableTimer(true);},ClearEvent:function(a){var b,c;for(c in this._aEvents){if(!a||this._aEvents[c].o==a){Util.RemoveEvent(this._aEvents[c].o,this._aEvents[c].a,this._aEvents[c].f);}}this._aEvents=[];},RemoveMe:function(){this._extCallBack(this._cp.RemoveMe,[],this._cp);this._clearWaitMask();this.ClearEvent();this._clearPageBtn();while(this._oDivRoot.firstChild){this._oDivRoot.removeChild(this._oDivRoot.firstChild);}if(this._oTmr.oTmr){clearInterval(this._oTmr.oTmr);}},SetLength:function(a){var b;a=parseInt(a);if(a>0){b=Math.floor((this._cp.svcParam.num*(this._cp.svcParam.page-1))/a)+1;this._cp.svcParam.num=a;this._buildTable(a);this._sortcss();this.SetReqAction("setlen");this._cp.svcParam.page=b;if(!this._bLightMode&&this._aCodes.length){this._aCodes=[];}this._getDataFromService();this._redrawPage();}},_addEvent:function(d,b,c){this._aEvents.push({o:d,a:b,f:c});Util.AddEvent(d,b,c);},_createTitleTD:function(c){var b,d;d=$C((this._cp.aFields[c].s&16)?"th":"td");if(this._cp.aFields[c].s&2){d.appendChild($T(this._cp.aFields[c].t));}else{b=$C("a");b.appendChild($T(this._cp.aFields[c].t));b.setAttribute("href","javascript:void(0);");this._addEvent(b,"click",this._sort._BindForEvent(this,c));d.appendChild(b);}return d;},_highlight:function(c,a,b){if(typeof(this._iHighlight)!="undefined"){this.ReplaceCss(this._getRow(a),this._cp.css.highlight,"");}if(b){this.ReplaceCss(this._getRow(a),"",this._cp.css.highlight);this._iHighlight=a;}},_buildTable:function(x){var q,l,h,d,g,B,w,v,f,y,b,k,r,u;var s,c;var p,e,A;if(this._oTable){s=this._aRows.length;c=x;l=this._oTable;h=this._oTbody;if(c<this._aRows.length){v=this._searchField(this._cp.svcParam.sort);for(w=c;w<this._aRows.length;w++){Util.HideObj(this._aRows[w],1);this.ReplaceCss(this._aCells[w][v],this._cp.css.sortasc,"");this.ReplaceCss(this._aCells[w][v],this._cp.css.sortdesc,"");}}}else{s=-1;c=this._cp.svcParam.num;if(x&&x.nodeType){l=x;p=1;f=Util.FindChildren(l,"thead");if(f&&f[0]){f=f[0];}else{f=$C("thead");}h=Util.FindChildren(l,"tbody");if(h&&h[0]){h=h[0];c=(Util.FindChildren(h,"tr")).length;if(c<this._cp.svcParam.num){c=this._cp.svcParam.num;}}else{h=$C("tbody");}this._aRows=Util.FindChildren(h,"tr");}else{l=$C("table");f=$C("thead");h=$C("tbody");}}if(p||this._cp.tdGroups){delete this._oCfg.aColMap;}this._oThead=f;for(w=s;w<c;w++){A=1;if(p){if(w==-1){while(f.firstChild){f.removeChild(f.firstChild);}}else{d=this._aRows[w];if(!d){d=$C("tr");}else{this._aCells[w]=Util.FindChildren(d,["td","th"]);A=0;}if(this._cp.aRowCss&&this._cp.aRowCss.length){this.ReplaceCss(d,"",this._cp.aRowCss[w%this._cp.aRowCss.length]);}Util.HideObj(d,w>=this._cp.svcParam.num?1:0);}}if(A||!p){d=$C("tr");if(w>=0){Util.HideObj(d,1);this._aCells[w]=[];this._aRows[w]=(d);}if(this._cp.aRowCss&&this._cp.aRowCss.length){this.ReplaceCss(d,"",this._cp.aRowCss[w%this._cp.aRowCss.length]);}}if(this._cp.tdGroups){y=$C("tr");k=0;}for(v=0;v<this._colmap();v++){u=this._colmap(v);e=1;if(w==-1){g=this._createTitleTD(u);this._aHead[v]=g;}else{if(!this._aCells[w][v]){g=$C((this._cp.aFields[u].s&16)?"th":"td");this._aCells[w][v]=g;}else{e=0;}}if(this._cp.aFields[u].c){g.className=this._cp.aFields[u].c;}if(e){if(y&&w==-1){r=this._cp.tdGroups[k];if(r&&r.s==v){b=$C("th");b.className="th_grouptitle "+(r.c?r.c:"");try{b.appendChild(r.t);}catch(z){b.appendChild($T(r.t));}b.colSpan=r.e-r.s+1;b.setAttribute("colSpan",r.e-r.s+1);y.appendChild(b);}if(r&&r.e>=v&&r.s<=v){d.appendChild(g);}else{g.rowSpan=2;g.setAttribute("rowSpan",2);y.appendChild(g);}if(r&&r.e==v){k++;}}else{d.appendChild(g);}}}if(w>=0){if(this._cp.css.highlight){this._addEvent(d,"mouseover",this._highlight._BindForEvent(this,w,1));this._addEvent(d,"mouseout",this._highlight._BindForEvent(this,w,0));}if(A){h.appendChild(d);}}else{if(y){f.appendChild(y);}f.appendChild(d);}}if(s<0){l.appendChild(f);l.appendChild(h);l.border="0";this._oTbody=h;}this._cntCol=this._cp.aFields.length;return this._oTable=l;},_createPageLink:function(e,g,h,d){var b;if(g||d){b=$C("a");b.appendChild($T(e));b.className=h;b.setAttribute("href","javascript:void(0);");this._oPage._aEvents.push({o:b,f:g});Util.AddEvent(b,"click",g);}else{b=$C("span");b.appendChild($T(e));b.className=h;this.ReplaceCss(b,"",this._cp.css.pagedisabled);}return b;},_clearPageBtn:function(){var a,b;if(!this._oDivPage||!this._oDivPage.length){return;}for(a=0;a<this._oPage._aEvents.length;a++){Util.RemoveEvent(this._oPage._aEvents[a].o,"click",this._oPage._aEvents[a].f);}this._oPage._aEvents=[];for(a=0;a<this._oDivPage.length;a++){b=this._oDivPage[a];while(b.firstChild){b.removeChild(b.firstChild);}}},_createPageBtn:function(b){var h,d,g,e,c;var l,k,f;if(!this._oDivPage||!this._oDivPage.length){return;}if(!b){b=this._cp.svcParam.page;}b=parseInt(b);d=Math.ceil(this._oPage.itemCount/this._cp.svcParam.num);if(d<0){d=0;}l=typeof(this._cp.pagetagl)=="number"?this._cp.pagetagl:(b-Math.floor(this._cp.pagetags/2));k=typeof(this._cp.pagetagr)=="number"?this._cp.pagetagr:(b+Math.floor(this._cp.pagetags/2));f=this._cp.css.pageone?this._cp.css.pageone:"";if(l<1){l=1;}if(k>d){k=d;}for(e=0;e<this._oDivPage.length;e++){if(d<=1&&!this._oCfg.bAlwaysShowPage){Util.HideObj(this._oDivPage[e],1);continue;}else{Util.HideObj(this._oDivPage[e],0);this._oDivPage[e].style.display="";}c=this._oDivPage[e];c.appendChild(this._createPageLink("上一页",b>1?this._pageAct._BindForEvent(this,b-1):null,f));for(g=l;g<=k;g++){if(g==l&&l!=1){c.appendChild(this._createPageLink("1",this._pageAct._BindForEvent(this,1),""));if(g-1>1){c.appendChild($T("..."));}}c.appendChild(this._createPageLink(g,g==b?null:this._pageAct._BindForEvent(this,g),g==b?"pagecurr":""),1);if(g==k&&k!=d){if(g+1<d){c.appendChild($T("..."));}c.appendChild(this._createPageLink(d,this._pageAct._BindForEvent(this,d),""));}}c.appendChild(this._createPageLink("下一页",b<d?this._pageAct._BindForEvent(this,b+1):null,f));}},_pageAct:function(a,b){this._cp.svcParam.page=b;if(arguments[0]){this.SetReqAction("page");this._getDataFromService();}this._redrawPage();},_redrawPage:function(){this._clearPageBtn();this._createPageBtn();},_searchField:function(b){var a;for(a=0;a<this._cp.aFields.length;a++){if(this._cp.aFields[a].f==b){return a;}}return -1;},_sortcss:function(b){var a;a=this._colmap(this._cp.svcParam.sort);if(a>=0){if(b){this.ColCss(a,this._cp.css.sortasc,"");this.ColCss(a,this._cp.css.sortdesc,"");}else{this.ColCss(a,"",this._cp.css[this._cp.svcParam.asc?"sortasc":"sortdesc"]);}}},_sort:function(c,a){var b=this._cp.aFields[a].f;if((this._cp.aFields[a].s&2)){return;}this._sortcss(1);if(b==this._cp.svcParam.sort){if(this._b3SSort&&(!this._cp.svcParam.asc==!!(this._cp.aFields[a].s&32))){this._cp.svcParam.sort=this._s_cpsort;this._cp.svcParam.asc=this._i_cpasc;}else{this._cp.svcParam.asc^=1;}}else{this._cp.svcParam.asc=(this._cp.aFields[a].s&32)?1:0;this._cp.svcParam.sort=b;}this._sortcss();this.SetReqAction("sort");this._getDataFromService();},ColCss:function(a,f,e){var b,d;for(b=-1;b<this._cp.svcParam.num;b++){d=b<0?(this._aHead[a]):(this._aCells[b][a]);this.ReplaceCss(d,f,e);}},_getDataLight:function(a){this._cp.GetDataLight(this._svcCallbackLight._Bind(this));},_getStockCount:function(){this._cp.GetListLength(this.SetStockCnt._Bind(this));},SetStockCnt:function(a){if(isNaN(a=parseInt(a))){a=0;}if(this._oPage.itemCount!=a){this._oPage.itemCount=a;if(this._oPage.itemCount==0&&!this._oCfg.bAllowEmptyData&&!this._oDivEDTip){this._hideTable(1);this._oDivEDTip=$C("div");this._oDivEDTip.className="divEmptyData";this._oDivEDTip.appendChild($T("没有符合条件的内容"));this._oDivRoot.appendChild(this._oDivEDTip);}this._redrawPage();}},_getDataFromService:function(e){var b,d,g,c;if(!e){this.ParamChange();this._clearWaitMask();if(this._oCfg.iWaitMask){this._oTmrMsgBox=setTimeout(this._addWaitMask._Bind(this),this._oCfg.iWaitMask);}}if(this._bLightMode){b=[];for(d=0;d<this._aCodes.length;d++){for(c=0;c<this._aListData.length;c++){if(this._aListData[c][this._cp.indexField]==this._aCodes[d]){b[d]=this._aListData[c];break;}}}this._svcCallback(b);}else{this._oTmr.cnt=0;this._cp.GetData(this._svcCallback._Bind(this));}},_addWaitMask:function(){var b,a;delete this._oTmrMsgBox;S_SL.WAITMASK.a[this._sID]=1;S_SL.WAITMASK.i=1;if(!S_SL.WAITMASK.C){S_SL.WAITMASK.C=$C("div");S_SL.WAITMASK.D=$C("div");S_SL.WAITMASK.C.style.cssText="z-index: 30000; position: absolute; margin: 0px; background: black; filter: Alpha(opacity=0); opacity: 0; ";S_SL.WAITMASK.D.style.cssText="width: 220px; height: 70pxpx; z-index: 31000; position: absolute; border-top: 1px #cccccc solid; border-left: 1px #cccccc solid; border-bottom: 2px #666666 solid; border-right: 2px #666666 solid;";Util.AddEvent(S_SL.WAITMASK.C,"click",this.StopPropagation);Util.AddEvent(S_SL.WAITMASK.C,"mouseup",this.StopPropagation);b=$C("img");b.setAttribute("src","http://www.sinaimg.cn/cj/money/images/progress2.gif");b.setAttribute("alt","读取中");b.setAttribute("border",0);S_SL.WAITMASK.D.appendChild(b);document.body.appendChild(S_SL.WAITMASK.D);document.body.appendChild(S_SL.WAITMASK.C);}this._makeWMScroll();this._oTmrMsgBoxC=setTimeout(this._clearWaitMask._Bind(this),15000);},_makeWMScroll:function(c){var b,a;if(!S_SL.WAITMASK.i){return;}b=Util.getBodyDim();a=Util.getScrollTop();S_SL.WAITMASK.C.style.top=a+"px";S_SL.WAITMASK.C.style.width=(b.W-30)+"px";S_SL.WAITMASK.C.style.height=b.H+"px";S_SL.WAITMASK.D.style.left=(b.W-220)/2+"px";S_SL.WAITMASK.D.style.top=((b.H-70)/2+a)+"px";Util.HideObj(S_SL.WAITMASK.C,0);Util.HideObj(S_SL.WAITMASK.D,0);},_clearWaitMask:function(){var d,b,e;if(this._oTmrMsgBoxC){clearTimeout(this._oTmrMsgBoxC);delete this._oTmrMsgBoxC;}delete S_SL.WAITMASK.a[this._sID];e=0;for(var a in S_SL.WAITMASK.a){e++;}S_SL.WAITMASK.i=e;if(e==0){Util.HideObj(S_SL.WAITMASK.C,1);Util.HideObj(S_SL.WAITMASK.D,1);}if(this._oTmrMsgBox){clearTimeout(this._oTmrMsgBox);delete this._oTmrMsgBox;}},StopPropagation:function(a){if(a.stopPropagation){a.stopPropagation();}a.cancelBubble=true;},_svcCallback:function(a){return this._gotDataSvc(a,0);},_svcCallbackLight:function(c){var b,a;if(!c){c=[];}a=[];for(b=0;b<c.length;b++){a[b]=this.MergeObj({},c[b]);delete a[b][this._cp.indexField];}return this._gotDataSvc(a,1);},MergeObj:Util.MergeObj,_dataFull:function(c){var a,b;if(!c){return true;}for(b=0;b<this._cp.aFields.length;b++){if(typeof(c[this._cp.aFields[b].f])=="undefined"){return false;}}return true;},_gotDataSvc:function(f,h){var q,s,e,k,t,u,d,n,g;s=0;t=f.length>this._cp.svcParam.num?this._cp.svcParam.num*(this._cp.svcParam.page-1):0;if(!h&&f[0]&&(this._bLightMode=!this._dataFull(f[0]))){this._aLightData=[];for(q=0;q<f.length;q++){this._aLightData[q]=f[q];this._aCodes[q]=f[q][this._cp.indexField];}if(!this._aInitCodes){this._aInitCodes=this._aCodes.slice(0,this._aCodes.length);}this._cp.CodesChange(this._aCodes);this._getDataLight(1);return;}else{if(h&&this._aLightData){for(q=0;q<f.length;q++){this.MergeObj(f[q],this._aLightData[q]);}e=this._searchField(this._cp.svcParam.sort);if(e>=0){switch(this._cp.aFields[e].d){case -2:case -3:this.iSortMode=2;for(q=0;q<f.length;q++){f[q][this._cp.svcParam.sort]=typeof(f[q][this._cp.svcParam.sort])=="string"?f[q][this._cp.svcParam.sort].toString():"";}break;default:this.iSortMode=1;for(q=0;q<f.length;q++){if(typeof(f[q][this._cp.svcParam.sort])=="string"&&f[q][this._cp.svcParam.sort]!=""&&!isNaN(f[q][this._cp.svcParam.sort])){f[q][this._cp.svcParam.sort]=parseFloat(f[q][this._cp.svcParam.sort]);}}}f.sort(this._sortCallback._Bind(this));for(q=0;q<f.length;q++){this._aCodes[q]=f[q][this._cp.indexField];}}else{if(this._aInitCodes){this._aCodes=this._aInitCodes.slice(0,this._aInitCodes.length);e={};for(q=0;q<this._aCodes.length;q++){e["smb_"+this._aCodes[q]]=q;}d=[];for(q=0;q<f.length;q++){d[e["smb_"+f[q][this._cp.indexField]]]=f[q];}f=d;}}this._cp.CodesChange(this._aCodes);}}g=0;for(q=t;q<this._cp.svcParam.num+t;q++){d=f.length>this._cp.svcParam.num?f[q]:f[q%this._cp.svcParam.num];if(d){g++;this._sPrev=this._aCodes[q];if(d[this._cp.indexField]&&this._aCodes[q]!=d[this._cp.indexField]){this._aCodes[q]=d[this._cp.indexField];s++;}if((f.length>this._cp.svcParam.num&&this._iCurrPage!=this._cp.svcParam.page)){delete this._aData[q];}if(this._aData[q]&&(typeof(d[this._cp.indexField])=="undefined"||this._aData[q][this._cp.indexField]==d[this._cp.indexField])){for(k=0;k<this._cp.aFields.length;k++){if(this._cp.aFields[k].s&64){continue;}n=this._cp.aFields[k].f;if((h&&(this._cp.aFields[k].s&512)&&!this._bLightMode)||(typeof(d[n])!="undefined"&&(d[n]==this._aData[q][n])&&!this._cp.aFields[k].u)){delete d[n];}}}this._replaceRow(d,q,this._aData[q]);this._aData[q]=this.MergeObj(this._aData[q],d);}else{if(this._aCodes.length>q){this._aCodes=this._aCodes.slice(0,q);}this._replaceRow(undefined,q,this._aData[q]);}}this._iCurrPage=this._cp.svcParam.page;if(h&&this._aLightData){this._aListData=this._aLightData;this._aLightData=undefined;}this._sPrev=null;if(s){this._cp.CodesChange(this._aCodes);}this._clearWaitMask();this._extCallBack(this._oCBCol.vr,[g]);},_getRow:function(a){return this._aRows[a];},_getText:function(c){var a,b;if(!c.tagName&&c.data){return c.data;}else{if(c.childNodes){b=[];for(a=0;a<c.childNodes.length;a++){if(c.childNodes[a].className&&c.childNodes[a].className.indexOf(this._CSSIGNORE)<0){b.push(this._getText(c.childNodes[a]));}else{if(!c.childNodes[a].tagName&&c.childNodes[a].data){b.push(c.childNodes[a].data);}}}return b.join("");}else{return"";}}},_replaceRow:function(g,k,B){var b,x,q,t,z,y,j,w,e,n,A,h;if(typeof(B)=="undefined"){B={};}b=this._getRow(k%this._cp.svcParam.num);if(!b){return;}this._extCallBack(this._cp.OnRowRemove,[g,B,k,b],this._cp);if(!g){Util.HideObj(b,1);return;}if(this._oDivEDTip){this._oDivEDTip.parentNode.removeChild(this._oDivEDTip);delete this._oDivEDTip;this._hideTable(0);}Util.HideObj(b,0);z=g[this._cp.colorfield];if(typeof(z)!="undefined"){z=parseFloat(z);x=b.className;x=this.ReplaceCss(null,this._cp.css.up,"",x);x=this.ReplaceCss(null,this._cp.css.down,"",x);x=this.ReplaceCss(null,this._cp.css.draw,"",x);x=this.ReplaceCss(null,this._cp.css.other,"",x);if(isNaN(z)){x=this.ReplaceCss(null,"",this._cp.css.other,x);}else{if(z>0){x=this.ReplaceCss(null,"",this._cp.css.up,x);}else{if(z<0){x=this.ReplaceCss(null,"",this._cp.css.down,x);}else{x=this.ReplaceCss(null,"",this._cp.css.draw,x);}}}if(x!=b.className){b.className=x;}}j=this._aCells[k%this._cp.svcParam.num];for(q=0;q<j.length;q++){x=j[q];h=this._colmap(q);z=g[this._cp.aFields[h].f];if(typeof(z)=="undefined"){continue;}if(z==""&&!(this._cp.aFields[h].s&256)&&(!this._bLightMode)&&(!g[this._cp.indexField]||(this._sPrev==g[this._cp.indexField]))){continue;}if(typeof(z)=="string"&&z==""&&!(this._cp.aFields[h].s&256)){z="--";}e=null;if((this._cp.aFields[h].s&64)&&(!this._aLightData)&&(!g[this._cp.indexField]||(this._sPrev==g[this._cp.indexField]))){e=this._aData[k][this._cp.aFields[h].f];}while(x.firstChild){x.removeChild(x.firstChild);}if(z&&z.nodeType){x.appendChild(z);}else{if(this._cp.aFields[h].s&128){x.innerHTML=z;}else{if(typeof(z)=="number"){if(isNaN(z)){z=0;}}w=z;if(this._cp.aFields[h].d>=0&&!isNaN(z)){z=parseFloat(z);if(this._cp.aFields[h].o){z*=Math.pow(10,this._cp.aFields[h].o);}z=z.toFixed(this._cp.aFields[h].d);if(this._cp.aFields[h].s&8){z=this.AddComma(z);}if((this._cp.aFields[h].s&4)&&parseFloat(w)>0){z="+"+z;}}if(y=this._cp.aFields[h].p){z=y.replace("$1",z);}if(this._cp.aFields[h].s&64){if(!isNaN(parseFloat(e))){e=this._compare(w,e,1);e=[1,2,0][e+1];}else{e=3;}z=this._ARROWS[e]+z.toString();}if(n=this._extCallBack(this._cp[this._cp.aFields[h].u],[z,g,B,k,b],this._cp)){x.appendChild(n);}else{if(this._cp.aFields[h].s&1){y=$C("a");A=this._cp.detailPage;if(typeof(this._cp.detailPage)=="function"){A=this._cp.detailPage(this._aCodes[k]);}else{A=Util.StrTemplate(this._cp.detailPage,this._aCodes[k]);}y.setAttribute("href",A);if(!this._oCfg.bUseCurrentWindow){y.setAttribute("target","_blank");}y.appendChild($T(z));x.appendChild(y);}else{x.appendChild($T(z));}}}}}},_compare:function(f,e,a){var c,b;try{if(f&&f.nodeType){f=this._getText(f);}if(e&&e.nodeType){e=this._getText(e);}switch(a){case 1:f=parseFloat(f);e=parseFloat(e);if(isNaN(f)){f=0;}if(isNaN(e)){e=0;}break;case 2:f=f?f.toString():"";e=e?e.toString():"";break;}if(f<e){return -1;}else{if(f>e){return 1;}}return 0;}catch(d){return 0;}},_sortCallback:function(b,a){return -this._compare(b[this._cp.svcParam.sort],a[this._cp.svcParam.sort],this.iSortMode)*(0.5-this._cp.svcParam.asc);},_timerCallback:function(){this._oTmr.cnt++;if(this._oTmr.disabled){return;}if(!this._bLightMode&&this._oTmr.cnt>=this._cp.tmrCntFull){this._oTmr.cnt=0;this.SetReqAction("auto");this._getDataFromService(1);}else{this._getDataLight();}},EnableTimer:function(a){if(a&&!this._oTmr.oTmr){this._oTmr.cnt=0;this._oTmr.oTmr=setInterval(this._timerCallback._Bind(this),this._cp.tmrInt);}else{if(!a&&this._oTmr.oTmr){clearInterval(this._oTmr.oTmr);delete this._oTmr.oTmr;}}this._extCallBack(this._cp.EnableTimer,[a],this._cp);},GetCodes:function(){return this._aCodes;},ReplaceCss:Util.ReplaceCss,AddComma:Util.AddComma,_initCP:function(a,g,e){var d;try{this._cp=new window["S_SL_"+a.toUpperCase()](this,g);}catch(c){return;}this._extCallBack(e,[this._cp]);if(!isNaN(this._cp.colorfield)){this._cp.colorfield=this._cp.aFields[this._cp.colorfield].f;}this._cp__defaultParam=this.MergeObj({},this._cp.svcParam);d=g.sort;if(!d){d=this._cp__defaultParam.sort;}this._s_cpsort=d;this._b3SSort=(this._searchField(d)<0);d=g.asc;if(typeof(d)=="undefined"){d=this._cp__defaultParam.asc;}this._i_cpasc=d;this._paramFilter(g);this._extCallBack(this._cp.Init2,[e],this._cp);},_paramFilter:function(c){var b,a;if(!c){c={};}for(a in this._cp.svcParam){if(typeof(c[a])!="undefined"){if(typeof(this._cp.svcParam[a])=="number"){this._cp.svcParam[a]=parseFloat(c[a]);}else{this._cp.svcParam[a]=c[a];}}}},ParamChange:function(){this._extCallBack(this._oCBCol.pc,[this._outputParam()]);},_outputParam:function(){var b,a;if(!this._cp.outputParam){return this._cp.svcParam;}b={};for(a=0;a<this._cp.outputParam.length;a++){if(typeof(this._cp.svcParam[this._cp.outputParam[a]])!="undefined"&&this._cp.svcParam[this._cp.outputParam[a]]!=this._cp__defaultParam[this._cp.outputParam[a]]){b[this._cp.outputParam[a]]=this._cp.svcParam[this._cp.outputParam[a]];}}return b;},ErrHandler:function(a,b){if(!this._oCfg.bAllowErrorData&&!this._oDivEDTip){this._hideTable(1);this._oDivEDTip=$C("div");this._oDivEDTip.className="divErrorData";this._oDivEDTip.appendChild($T("读取内容失败！请检查网络状况并刷新页面。"));this._oDivRoot.appendChild(this._oDivEDTip);this._clearWaitMask();}},_hideTable:function(b){var c;Util.HideObj(this._oTable,b);for(c=0;c<this._oDivPage.length;c++){Util.HideObj(this._oDivPage[c],b);}},SRVProvider:function(c,e,d,b){if(!c){c=this.ErrHandler._Bind(this);}if(typeof(this._oCfg.iSRVType)!="undefined"&&typeof(d)=="undefined"){d=this._oCfg.iSRVType;}this._sSrvCid="js_sl_"+Math.floor(60466176*Math.random()).toString(36);try{switch(d){case 1:if(typeof(b)=="undefined"){b=this._oDivRoot;}if(!e){e=this._oCfg.sSRVPath?this._oCfg.sSRVPath:"http://vip.stock.finance.sina.com.cn/quotes_service/api/jsonp_v2.php";}this._srv=new IO.XSRV(e,c,b);this._iSrvType=1;break;case 3:if(!e){e=this._oCfg.sSRVPath?this._oCfg.sSRVPath:"http://vip.stock.finance.sina.com.cn/quotes_service/api/jsonp_v2.php";}this._srv=new IO.XSRV2(e,c);this._iSrvType=3;break;default:if(!e){e=this._oCfg.sSRVPath?this._oCfg.sSRVPath:"/quotes_service/api/json_v2.php";}if(typeof(b)=="undefined"){b=false;}this._srv=new IO.SRV(e,c,b);this._iSrvType=2;break;}}catch(a){return null;}return this._srv;},SRVCall:function(g,e,d,f,c){var b,h;if(!this._srv&&!c){return;}h=c?c:this._srv;if(typeof(f)=="undefined"){switch(this._iSrvType){case 1:f=[];break;case 2:case 3:default:f=[true];break;}}else{if(!(f instanceof Array)){f=[f];}}h.Call.apply(this._srv,[g,e,d].concat(f));},SetReqAction:function(b){if(this._oCfg.bEnableSRA){this._cp.svcParam._s_r_a=b;}},_extCallBack:function(a,b,c){if(typeof(a)=="function"){return a.apply(c,b?b:[]);}},_colmap:function(e){var c,b=this._oCfg.aColMap;var d=b instanceof Array;switch(typeof(e)){case"undefined":return d?b.length:this._cp.aFields.length;case"number":return d?this._searchField(b[e]):e;case"string":if(d){c=Util.SL_ArraySearch(e,b);return c==undefined?-1:c;}else{return this._searchField(e);}}}};S_SLLDR=function(){this.Init.apply(this,arguments);};S_SLLDR.prototype={_oPrevObj:null,_sDivRoot:null,Init:function(a){this._oCfg=a?a:(window.SINA_STOCKLIST_CONFIG?window.SINA_STOCKLIST_CONFIG:{});},Recycle:function(){if(this._oPrevObj){this._oPrevObj.RemoveMe();}if(this._oDivRoot=(this._sDivRoot)){while(this._oDivRoot.firstChild){this._oDivRoot.removeChild(this._oDivRoot.firstChild);}}},Load:function(j,g,e,a,d,l){var c,h,k;if(this._oPrevObj){this.Recycle();}if(!g){g=this._sDivRoot;}if(!j){return;}c=j.split(".");k=c[0];h=c[1]?c[1]:"";if(typeof(window["S_SL_"+k.toUpperCase()])!="function"){return;}this._sDivRoot=(g&&g.nodeType)?g:document.getElementById(g);if(this._oDivRoot=this._sDivRoot){while(!this._oCfg.bKeepDiv&&this._oDivRoot.firstChild){this._oDivRoot.removeChild(this._oDivRoot.firstChild);}}this._oPrevObj=new S_SL(k,g,e,a,d,window["S_SL_CF_"+h.toUpperCase()],l);return this._oPrevObj;},EnableTimer:function(a){return this._oPrevObj?this._oPrevObj.EnableTimer(a):undefined;},ResetTimer:function(){return this._oPrevObj?this._oPrevObj.ResetTimer():undefined;},GetDataAtOnce:function(){return this._oPrevObj?this._oPrevObj.GetDataAtOnce():undefind;},SetLength:function(a){return this._oPrevObj?this._oPrevObj.SetLength(a):undefined;}};S_SL_ADR=function(){this.Init.apply(this,arguments);};S_SL_ADR.prototype={Init:function(a){this._frame=a;this.svcParam={page:1,num:20,sort:"symbol",asc:1,node:"adr_hk"};this.css={up:"green",down:"red",highlight:"highlight",sortasc:"sort_down",sortdesc:"sort_up",pagediv:"pages",pagedisabled:"pagedisabled",pagecurr:"pagecurr"};this.outputParam=["sort","page","num","asc"];this.colorfield=3;this.pagetags=5;this.tmrInt=60000;this.tmrCntFull=1;this.aFields=[{f:"symbol",t:"代码",d:-2,s:48},{f:"chname",t:"中文名称",d:-2,s:50},{f:"last",t:"最新价",d:2,s:64,c:"colorize"},{f:"chg",t:"涨跌额",d:3,s:4,c:"colorize"},{f:"pchg",t:"涨跌幅",d:3,s:4,c:"colorize",p:"$1%"},{f:"prevclose",t:"昨收",d:2,s:0,c:"colorize"},{f:"open",t:"今开",d:2,s:0,c:"colorize"},{f:"high",t:"最高",d:2,s:0,c:"colorize"},{f:"low",t:"最低",d:2,s:0,c:"colorize"},{f:"volume",t:"成交量",d:0,s:8,c:"colorize"},{f:"amount",t:"成交额",d:0,s:8,c:"colorize"},{f:"vwap",t:"加权均价",d:2,s:0,c:"colorize"}];this.indexField="symbol";this.detailPage="http://biz.finance.sina.com.cn/suggest/lookup_n.php?q=$1";this._aCodes=[];this._srv=this._frame.SRVProvider();},GetData:function(a){this._cbSVC=a;this._frame.SRVCall("Market_Center.getADRData",this._gotData._Bind(this),this.svcParam);},_gotData:function(a){this._cbSVC(a);},GetDataLight:function(a){a([]);},GetListLength:function(a){this._frame.SRVCall("Market_Center.getADRCount",a,this.svcParam);},CodesChange:function(a){this._aCodes=a;if(this._oQDL){this._oQDL.changeCodes(a);}}};S_SL_ANH=function(){this.Init.apply(this,arguments);};S_SL_ANH.prototype={Init:function(a){this._frame=a;this.svcParam={page:1,num:20,sort:"hrap",asc:0,node:"aplush"};this.css={up:"anh_up",down:"anh_down",highlight:"highlight",sortasc:"sort_down",sortdesc:"sort_up",pagediv:"pages",pagedisabled:"pagedisabled",pagecurr:"pagecurr"};this.outputParam=["sort","page","num","asc"];this.pagetags=5;this.tmrInt=6000;this.tmrCntFull=6;this.aFields=[{f:"name",t:"股票简称",d:-2,s:51},{f:"symbol",t:"A股代码",d:-2,s:49},{f:"hsymbol",t:"H股代码",d:-2,s:48,u:"HKLink"},{f:"lasttrade",t:"A股价格(RMB)",d:2,s:64,u:"SetColor_cn"},{f:"changepercent",t:"A股涨跌幅",d:3,s:4,p:"$1%",u:"SetColor_cn"},{f:"hhlasttrade",t:"H股价格(HKD)",d:3,s:64,u:"SetColor_hk"},{f:"hrlasttrade",t:"H股价格(RMB)",d:3,s:0,u:"SetColor_hk"},{f:"hchangepercent",t:"H股涨跌幅",d:3,s:4,p:"$1%",u:"SetColor_hk"},{f:"hrap",t:"比价H:A",d:2,s:0,p:"$1%"},{f:"volume",t:"A股成交量",d:0,s:8},{f:"hvolume",t:"H股成交量",d:0,s:8}];this.indexField="symbol";this.detailPage="http://biz.finance.sina.com.cn/suggest/lookup_n.php?q=$1";this._aCodes=[];if(S_Finance.QuotesDataLight){this._oQDL=new S_Finance.QuotesDataLight([],0,this._qdlCallback._Bind(this));}this._srv=this._frame.SRVProvider();},A2H:function(b){return this._arrA2H[b];},GetData:function(a){if(typeof(a)=="function"){this._cbSVC=a;}if(!this._arrA2H){this._frame.SRVCall("Market_Center.getANHData",this._codeInit._Bind(this),this.svcParam);}else{setTimeout(this._gotData._Bind(this),10);}if(this._svcChgCb){this._svcChgCb(this._outputParam());}},_gotData:function(){var d,c;c=[];for(var b in this._arrA2H){c.push({symbol:b,hsymbol:this._arrA2H[b]});}this._cbSVC(c);},GetDataLight:function(a){if(typeof(a)=="function"){this._cbQDL=a;}if(this._oQDL){this._oQDL.request();}},GetListLength:function(a){this._frame.SRVCall("Market_Center.getANHCount",a,{node:this.svcParam.node});},_codeInit:function(e){var d,c;c=[];this._arrA2H={};if(!e){e=[];}for(d=0;d<e.length;d++){this._arrA2H[e[d].a]=e[d].h;}for(var b in this._arrA2H){c.push(b);}this.CodesChange(c);if(this._cbSVC){this._gotData();}},CodesChange:function(f){var e,b,d;this._aCodes=f;b=["HKDCNY"];d=["forexProcess"];for(e=0;e<f.length;e++){b.push(f[e]);d.push("cnProcess");b.push(this._arrA2H[f[e]]);d.push("hkProcess");}if(this._oQDL){this._oQDL.changeCodes(b,d);}},_qdlCallback:function(b){var c,d;this._fHKDCNY=parseFloat(b[0].close_price);d=[];for(c=1;c<b.length;c+=2){d[(c-1)/2]=this._qdlObjConv(b[c],b[c+1],this._aCodes[(c-1)/2]);}this._cbQDL(d);},_qdlObjConv:function(a,d,e){var b;b={name:a.name,hsymbol:this._arrA2H[e],lasttrade:parseFloat(a.latestdeal),changepercent:parseFloat(a.latestdeal)?((a.latestdeal/a.yesterdayclose)*100-100):0,hhlasttrade:parseFloat(d.lasttrade),hrlasttrade:parseFloat(d.lasttrade)*this._fHKDCNY,hchangepercent:parseFloat(d.lasttrade)?((d.lasttrade/d.prevclose)*100-100):0,volume:a.dealvol/100,hvolume:d.volume};b.hrap=(b.hrlasttrade?b.hrlasttrade:d.prevclose)/(b.lasttrade?b.lasttrade:a.yesterdayclose)*100;return b;},SetColor_cn:function(b,e,d,a){var f;f=parseFloat(typeof(e.changepercent)=="undefined"?d.changepercent:e.changepercent);f=(f>0)?("anh_cn_up"):((f<0)?("anh_cn_down"):(""));return this._setColor_cb(b,f);},SetColor_hk:function(b,e,d,a){var f;f=parseFloat(typeof(e.hchangepercent)=="undefined"?d.hchangepercent:e.hchangepercent);f=(f>0)?("anh_hk_up"):((f<0)?("anh_hk_down"):(""));return this._setColor_cb(b,f);},_setColor_cb:function(a,e){var b,d;b=document.createElement("span");b.appendChild(document.createTextNode(a));b.className=e;return b;},HKLink:function(c){var b;b=document.createElement("a");b.setAttribute("href","http://finance.sina.com.cn/stock/hkstock/quote.html?code="+c);b.setAttribute("target","_blank");b.appendChild(document.createTextNode(c));return b;}};S_SL_BOND=function(){this.Init.apply(this,arguments);};S_SL_BOND.prototype={Init:function(a){this._frame=a;this.svcParam={page:1,num:20,sort:"symbol",asc:1,node:"hs_z"};this.css={up:"red",down:"green",highlight:"highlight",sortasc:"sort_down",sortdesc:"sort_up",pagediv:"pages",pagedisabled:"pagedisabled",pagecurr:"pagecurr"};this.outputParam=["node","sort","page","num","asc"];this.colorfield="changepercent";this.pagetags=5;this.tmrInt=4000;this.tmrCntFull=50;this.aFields=[{f:"symbol",t:"代码",d:-2,s:49},{f:"name",t:"名称",d:-2,s:51},{f:"trade",t:"最新价",d:2,s:64,c:"colorize"},{f:"pricechange",t:"涨跌额",d:2,s:4,c:"colorize"},{f:"changepercent",t:"涨跌幅",d:3,s:4,c:"colorize",p:"$1%"},{f:"buy",t:"买入",d:2,c:"colorize"},{f:"sell",t:"卖出",d:2,c:"colorize"},{f:"settlement",t:"昨收",d:2,c:"colorize"},{f:"open",t:"今开",d:2,c:"colorize"},{f:"high",t:"最高",d:2,c:"colorize"},{f:"low",t:"最低",d:2,c:"colorize"},{f:"volume",t:"成交量/手",d:0,s:8},{f:"amount",t:"成交额/万",d:2,s:8},{f:"bar",t:"股吧",s:18}];this.indexField="symbol";this.detailPage="http://biz.finance.sina.com.cn/suggest/lookup_n.php?q=$1";this._aCodes=[];if(S_Finance.QuotesDataLight){this._oQDL=new S_Finance.QuotesDataLight([],0,this._qdlCallback._Bind(this));}this._srv=this._frame.SRVProvider();},GetData:function(a){this._cbSVC=a;this._frame.SRVCall("Market_Center.getHQNodeDataSimple",this._gotData._Bind(this),this.svcParam);if(this._svcChgCb){this._svcChgCb(this._outputParam());}},_gotData:function(a){this._cbSVC(this._dataPrepare(a));},_openstatus:function(b){var a=b?parseInt(b.replace(/\:/g,""),10):0;return(a>=92500&&a<150500);},_genStockLink:function(e){var b,d,c;d=[];b=document.createElement("a");b.setAttribute("href","http://vip.stock.finance.sina.com.cn/portfolio/hqjia.php?symbol="+e);b.setAttribute("target","_blank");b.setAttribute("title","加入我的自选");c=document.createElement("img");c.setAttribute("src","http://www.sinaimg.cn/cj/subject/2009/0618/images/addto_p.gif");c.setAttribute("alt","关注");b.appendChild(c);d[0]=b;b=document.createElement("a");b.setAttribute("href","http://bar.sina.com.cn/bar.php?name="+e);b.setAttribute("target","_blank");b.setAttribute("title","进入股票吧");c=document.createElement("img");c.setAttribute("src","http://www.sinaimg.cn/cj/subject/2009/0618/images/linkto_ba.gif");c.setAttribute("alt","股吧");b.appendChild(c);d[1]=b;return d;},_dataPrepare:function(d,e){var g,n,f,m,h,b,k;if(!d){d=[];}m=["per","pb"];h=["volume"];if(!e){this._hqOpen=0;}for(g=0;g<d.length;g++){if(!e){this._hqOpen|=this._openstatus(d[g].ticktime);}k=d[g][this.indexField]?d[g][this.indexField]:this._aCodes[g];b=this._genStockLink(k);for(f in m){if(d[g][m[f]]&&parseFloat(d[g][m[f]]<0)){d[g][m[f]]="N/a";}}for(f in h){if(d[g][h[f]]&&!isNaN(parseFloat(d[g][h[f]]))){if(!e||!(k.substr(0,4)=="sh58"||k.substr(0,3)=="sh0"||k.substr(0,3)=="sh1"||(k.substr(0,4)>="sz10"&&k.substr(0,4)<="sz12"))){d[g][h[f]]=parseFloat(d[g][h[f]])/100;}}}if(d[g]&&!isNaN(parseFloat(d[g].amount))){d[g].amount=parseFloat(d[g].amount)/10000;}d[g].zxg=b[0];d[g].bar=b[1];if(parseFloat(d[g].trade)==0){d[g].trade="--";}}return d;},GetDataLight:function(a){this._cbQDL=a;if(this._hqOpen&&this._oQDL){this._oQDL.request();}},GetListLength:function(a){this._frame.SRVCall("Market_Center.getHQNodeStockCountSimple",a,{node:this.svcParam.node});},CodesChange:function(a){this._aCodes=a;if(this._oQDL){this._oQDL.changeCodes(a);}},_qdlCallback:function(b){var c;if(!b){b=[];}for(c=0;c<b.length;c++){b[c]=this._qdlObjConv(b[c]);}this._cbQDL(this._dataPrepare(b,1));},_qdlObjConv:function(e){var b,c,a;b=["todayopen","yesterdayclose","highdeal","lowdeal","latestdeal","dealvol","dealprice"];c=["open","settlement","high","low","trade","volume","amount"];for(a=0;a<b.length;a++){if(typeof(e[b[a]])!="undefined"){e[c[a]]=e[b[a]];e[b[a]]=undefined;}}if(typeof(e.pricechange)=="undefined"){e.pricechange=e.trade-e.settlement;}if(typeof(e.changepercent)=="undefined"){e.changepercent=(e.pricechange/e.settlement)*100;}if(e.trade==0){e.pricechange=e.changepercent=0;}return e;}};S_SL_CF_CNZXG=function(e){var d,b,c;b={f:"zxg",t:"收藏",s:18};e.aFields.splice(e.aFields.length-1,0,b);c=["trade","pricechange","changepercent","buy","sell","settlement","high","low","open"];for(d=0;d<e.aFields.length;d++){for(var f in c){if(e.aFields[d].f==c[f]){e.aFields[d].d=3;break;}}}};S_SL_CF_FUNDEX=function(d){var c=["trade","pricechange","changepercent","buy","sell","settlement","high","low","open"];d.detailPage="http://biz.finance.sina.com.cn/suggest/lookup_n.php?q=$1&country=fund";for(var b in d.aFields){for(var e in c){if(d.aFields[b].f==c[e]){d.aFields[b].d=3;}}if(d.aFields[b].f=="bar"){d.aFields[b].t="基金吧";}}};S_SL_CF_CNINDEX=function(d){var c,b=["buy","sell"];for(c=0;c<d.aFields.length;c++){for(var e in b){if(d.aFields[c].f==b[e]){d.aFields.splice(c,1);c--;break;}}}};S_SL_CF_BOND=function(b){var a;for(a=0;a<b.aFields.length;a++){if(b.aFields[a].s){b.aFields[a].s&=4294967294;}}};S_SL_CN=function(){this.Init.apply(this,arguments);};S_SL_CN.prototype={Init:function(a){this._frame=a;this.svcParam={page:1,num:20,sort:"symbol",asc:1,node:"sh_a"};this.css={up:"red",down:"green",highlight:"highlight",sortasc:"sort_down",sortdesc:"sort_up",pagediv:"pages",pagedisabled:"pagedisabled",pagecurr:"pagecurr"};this.outputParam=["node","sort","page","num","asc"];this.colorfield="pricechange";this.pagetags=5;this.tmrInt=4000;this.tmrCntFull=50;this.aFields=[{f:"symbol",t:"代码",d:-2,s:49},{f:"name",t:"名称",d:-2,s:51},{f:"trade",t:"最新价",d:2,s:64,c:"colorize"},{f:"pricechange",t:"涨跌额",d:2,s:4,c:"colorize"},{f:"changepercent",t:"涨跌幅",d:3,s:4,c:"colorize",p:"$1%"},{f:"buy",t:"买入",d:2,c:"colorize"},{f:"sell",t:"卖出",d:2,c:"colorize"},{f:"settlement",t:"昨收",d:2,c:"colorize"},{f:"open",t:"今开",d:2,c:"colorize"},{f:"high",t:"最高",d:2,c:"colorize"},{f:"low",t:"最低",d:2,c:"colorize"},{f:"volume",t:"成交量/手",d:0,s:8},{f:"amount",t:"成交额/万",d:2,s:8},{f:"zxg",t:"收藏",s:18},{f:"bar",t:"股吧",s:18}];this.indexField="symbol";this.detailPage="http://biz.finance.sina.com.cn/suggest/lookup_n.php?q=$1";this._aCodes=[];if(S_Finance.QuotesDataLight){this._oQDL=new S_Finance.QuotesDataLight([],0,this._qdlCallback._Bind(this));}this._srv=this._frame.SRVProvider();},GetData:function(a){this._cbSVC=a;this._frame.SRVCall("Market_Center.getHQNodeData",this._gotData._Bind(this),this.svcParam);},_openstatus:function(b){var a=b?parseInt(b.replace(/\:/g,""),10):0;return(a>=92500&&a<150500);},_gotData:function(a){this._cbSVC(this._dataPrepare(a));},_genStockLink:function(e){var b,d,c;d=[];b=document.createElement("a");b.setAttribute("href","http://vip.stock.finance.sina.com.cn/portfolio/hqjia.php?symbol="+e);b.setAttribute("target","_blank");b.setAttribute("title","加入我的自选");c=document.createElement("img");c.setAttribute("src","http://www.sinaimg.cn/cj/subject/2009/0618/images/addto_p.gif");c.setAttribute("alt","收藏");b.appendChild(c);d[0]=b;b=document.createElement("a");b.setAttribute("href","http://bar.sina.com.cn/bar.php?name="+e);b.setAttribute("target","_blank");b.setAttribute("title","进入股票吧");c=document.createElement("img");c.setAttribute("src","http://www.sinaimg.cn/cj/subject/2009/0618/images/linkto_ba.gif");c.setAttribute("alt","股吧");b.appendChild(c);d[1]=b;return d;},_dataPrepare:function(d,e){var g,n,f,m,h,b,k;m=["per","pb"];h=["volume"];if(!d){d=[];}if(!e){this._hqOpen=0;}for(g=0;g<d.length;g++){if(!e){this._hqOpen|=this._openstatus(d[g].ticktime);}for(f in m){if(d[g][m[f]]&&parseFloat(d[g][m[f]]<0)){d[g][m[f]]="N/a";}}for(f in h){if(d[g][h[f]]&&!isNaN(parseFloat(d[g][h[f]]))){d[g][h[f]]=parseFloat(d[g][h[f]])/100;}}if(d[g]&&!isNaN(parseFloat(d[g].amount))){d[g].amount=parseFloat(d[g].amount)/10000;}k=d[g][this.indexField]?d[g][this.indexField]:this._aCodes[g];b=this._genStockLink(k);d[g].zxg=b[0];d[g].bar=b[1];if(parseFloat(d[g].trade)==0){d[g].trade="--";}}return d;},GetDataLight:function(a){this._cbQDL=a;if(this._hqOpen&&this._oQDL){this._oQDL.request();}},GetListLength:function(a){this._frame.SRVCall("Market_Center.getHQNodeStockCount",a,{node:this.svcParam.node});},CodesChange:function(a){this._aCodes=a;if(this._oQDL){this._oQDL.changeCodes(a);}},_qdlCallback:function(b){var c;if(!b){b=[];}for(c=0;c<b.length;c++){b[c]=this._qdlObjConv(b[c]);}this._cbQDL(this._dataPrepare(b,1));},_qdlObjConv:function(e){var b,c,a;b=["todayopen","yesterdayclose","highdeal","lowdeal","latestdeal","dealvol","dealprice"];c=["open","settlement","high","low","trade","volume","amount"];for(a=0;a<b.length;a++){if(typeof(e[b[a]])!="undefined"){e[c[a]]=e[b[a]];delete e[b[a]];}}if(typeof(e.pricechange)=="undefined"){e.pricechange=e.trade-e.settlement;}if(typeof(e.changepercent)=="undefined"){e.changepercent=(e.pricechange/e.settlement)*100;}if(e.trade==0){e.pricechange=e.changepercent=0;}return e;}};S_SL_CF_CN_SH_B=function(d){var c=["trade","pricechange","changepercent","buy","sell","settlement","high","low","open"];for(var b in d.aFields){for(var e in c){if(d.aFields[b].f==c[e]){d.aFields[b].d=3;}}}};S_SL_CF_CNTURNOVERR=function(d){var c,b=["buy","sell"];for(c=0;c<d.aFields.length;c++){for(var e in b){if(d.aFields[c].f==b[e]){d.aFields.splice(c,1);c--;break;}}}c=d.aFields.length-2;d.aFields.splice(c,0,{f:"turnoverratio",t:"换手率",d:2,p:"$1%"});};S_Finance.cnmrProcess={QueryExp:"",ExtraPara:{format:"text"},ABSlongVer:function(a){return a;},p_NodeTable:{stock_sh_up_5min_20:{asc:0},stock_sz_up_5min_20:{asc:0},stock_hs_up_5min_20:{asc:0},stock_shw_up_5min_20:{asc:0},stock_szw_up_5min_20:{asc:0},stock_hsw_up_5min_20:{asc:0},stock_sh_down_5min_20:{asc:1},stock_sz_down_5min_20:{asc:1},stock_hs_down_5min_20:{asc:1},stock_shw_down_5min_20:{asc:1},stock_szw_down_5min_20:{asc:1},stock_hsw_down_5min_20:{asc:1}}};S_SL_CNMR=function(){this.Init.apply(this,arguments);};S_SL_CNMR.prototype={Init:function(a,b){var c,d;this._frame=a;this.svcParam={page:1,num:20,sort:"mr_percent",asc:1,base:"cnmr",node:"stock_sh_up_5min_20"};this.css={up:"red",down:"green",draw:"",other:"",highlight:"highlight",sortasc:"sort_down",sortdesc:"sort_up",pagediv:"pages",pagedisabled:"pagedisabled",pagecurr:"pagecurr"};this.outputParam=["node"];this.colorfield="pricechange";this.pagetags=5;this.tmrInt=12000;this.tmrCntFull=1;this.aFields=[{f:"symbol",t:"代码",d:-2,s:51},{f:"name",t:"名称",d:-2,s:51},{f:"trade",t:"最新价",d:2,s:66,c:"colorize"},{f:"pricechange",t:"涨跌额",d:2,s:6,c:"colorize"},{f:"changepercent",t:"涨跌幅",d:3,s:6,c:"colorize",p:"$1%"},{f:"mr_percent",t:"5分钟涨速",d:2,s:6,c:"colorize",p:"$1%"},{f:"settlement",t:"昨收",d:2,s:2,c:"colorize"},{f:"open",t:"今开",d:2,s:2,c:"colorize"},{f:"high",t:"最高",d:2,s:2,c:"colorize"},{f:"low",t:"最低",d:2,s:2,c:"colorize"},{f:"volume",t:"成交量/手",d:0,s:10},{f:"amount",t:"成交额/万",d:2,s:10}];this.indexField="symbol";this.detailPage="http://biz.finance.sina.com.cn/suggest/lookup_n.php?q=$1";},Init2:function(){var a;a=S_Finance.cnmrProcess.p_NodeTable[this.svcParam.node];if(!a){return;}this.svcParam=this._frame.MergeObj(this.svcParam,a);this._oQDLs=new S_Finance.QuotesDataLight([],0,this._qdlsCB._Bind(this),S_Finance.cnmrProcess);this._oQDL=new S_Finance.QuotesDataLight([],0,this._gotData._Bind(this));this._oQDLs.changeCodes([this.svcParam.node]);this._oQDLs.JSVARPRE="";},_qdlsCB:function(g){var f,b,e,d,h;b=g[0];e=[];h=[];if(!b){b=[];}for(f=0;f<b.length;f++){h[f]=b[f].symbol;e[f]={symbol:h[f],mr_percent:b[f].percent};}this._aMRData=e;this._aCode=h;this._oQDL.changeCodes(h);if(b.length){this._oQDL.request();}else{this._gotData([]);}},GetData:function(a){if(this._oQDL){this._cbSVC=a;this._oQDLs.request();}},_gotData:function(c){var b,a;b=[];for(a=0;a<c.length;a++){b[a]=this._frame.MergeObj(this._qdlObjConv(c[a]),this._aMRData[a]);}this._frame.SetStockCnt(b.length);this._cbSVC(b);},GetDataLight:function(a){},GetListLength:function(a){},CodesChange:function(a){},_qdlObjConv:function(c){var m,h,f;var l,e,k,g,b;k=["per","pb"];m=["todayopen","yesterdayclose","highdeal","lowdeal","latestdeal","dealvol","dealprice"];h=["open","settlement","high","low","trade","volume","amount"];for(f=0;f<m.length;f++){if(typeof(c[m[f]])!="undefined"){c[h[f]]=c[m[f]];delete c[m[f]];}}if(typeof(c.pricechange)=="undefined"){c.pricechange=c.trade-c.settlement;}if(typeof(c.changepercent)=="undefined"){c.changepercent=(c.pricechange/c.settlement)*100;}if(c.trade==0){c.pricechange=c.changepercent=0;c.recentprice=c.settlement;}else{c.recentprice=c.trade;}for(e in k){if(c[k[e]]&&parseFloat(c[k[e]]<0)){c[k[e]]="N/a";}}c.volume=parseFloat(c.volume)/100;c.amount=parseFloat(c.amount)/10000;return c;}};S_SL_CREFUND=function(){this.Init.apply(this,arguments);};S_SL_CREFUND.prototype={Init:function(a){this._frame=a;this.svcParam={page:1,num:20,sort:"symbol",asc:1,node:"crefund"};this.css={up:"red",down:"green",highlight:"highlight",sortasc:"sort_down",sortdesc:"sort_up",pagediv:"pages",pagedisabled:"pagedisabled",pagecurr:"pagecurr"};this.outputParam=["sort","page","num","asc"];this.colorfield="nav_chg";this.pagetags=5;this.tmrInt=6000;this.tmrCntFull=1;this.aFields=[{f:"symbol",t:"代码",d:-2,s:49},{f:"name",t:"名称",d:-2,s:51},{f:"trade",t:"最新价",d:3,s:64,c:"colorize"},{f:"changepercent",t:"涨跌幅",d:3,s:4,c:"colorize",u:"addperc"},{f:"last_nav",t:"最新公布净值",d:4,c:"colorize"},{f:"accu_nav",t:"累计净值",d:4,c:"colorize"},{f:"zrjz",t:"前单位净值",d:4,c:"colorize"},{f:"nav_chg",t:"净值增长率",d:4,s:4,c:"colorize",p:"$1%"},{f:"date",t:"公布日期",d:-3},{f:"jjgm",t:"基金规模",d:3,c:"colorize"}];this.indexField="symbol";this.detailPage="http://biz.finance.sina.com.cn/suggest/lookup_n.php?q=$1&country=fund";this._aCodes=[];if(S_Finance.QuotesDataLight){this._oQDL=new S_Finance.QuotesDataLight([],0,this._qdlCallback._Bind(this),S_Finance.fundProcess);}this._fio=new S_Finance.IO();this._fio.load("http://finance.sina.com.cn/iframe/286/20091218/26.js","",this._gotList._Bind(this));this._srv=this._frame.SRVProvider();},_gotList:function(){var b,c,e,f,d,g;b=CREFUND.split(",");f=[];d={};for(c=0;c<b.length;c++){e=b[c].split("|");if(e.length<2||!e[0]||e[0].length!=6){continue;}g=({symbol:e[0],c_type:e[1],enable_exc:parseInt(e[2]),market:e[3]});f.push(g);d[e[0]]=g;}this._hList=d;return this._aList=f;},GetData:function(a){this._cbSVC=a;setTimeout(this._gotData._Bind(this),10);},_gotData:function(){if(this._aList){this._cbSVC(this._aList);if(this._cbLen){this._cbLen(this._aList.length);delete this._cbLen;}}else{setTimeout(this._gotData._Bind(this),100);}},_dataPrepare:function(d,e){var g,n,f,m,h,b,k;if(!d){d=[];}if(e){return d;}for(g=0;g<d.length;g++){k=d[g][this.indexField]?d[g][this.indexField]:this._aCodes[g];}return d;},GetDataLight:function(a){this._cbQDL=a;if(this._oQDL){this._oQDL.request();}},GetListLength:function(a){if(this._aList){return a(this._aList.length);}else{this._cbLen=a;}},CodesChange:function(g){var b,e,d,f;this._aCodes=g;b=[];e=[];for(d=0;d<g.length;d++){b.push(g[d]);e.push("fundNetProcess");if(this._hList[g[d]].enable_exc){b.push(this._hList[g[d]].market+g[d]);e.push("cnProcess");}}if(this._oQDL){this._oQDL.changeCodes(b,e);}},_qdlCallback:function(l){var n,p,g,e,b,m,f,k;b=[];m=this._aCodes;f=0;for(g=0;g<m.length;g++){k=this._hList[m[g]];e={symbol:m[g],name:l[f].name,trade:"--",changepercent:"--",last_nav:l[f].dwjz,accu_nav:l[f].ljdwjz,zrjz:l[f].zrjz,date:l[f].date,nav_chg:(l[f].dwjz-l[f].zrjz)/l[f].zrjz*100,jjgm:l[f].jjgm};if(k.enable_exc&&l[f+1]&&l[f+1].latestdeal){e.trade=l[f+1].latestdeal;e.changepercent=(e.trade-l[f+1].yesterdayclose)/l[f+1].yesterdayclose*100;}else{e.trade=e.changepercent="--";}b.push(e);f+=k.enable_exc?2:1;}this._cbQDL(b);},addperc:function(b,f,d,a,e){var c;if(b!="--"&&b!=-100){c=b+"%";Util.ReplaceCss(e,this.css.down,"");Util.ReplaceCss(e,this.css.up,"");Util.ReplaceCss(e,"",b>0?this.css.up:(b<0?this.css.down:""));}else{c="--";}return document.createTextNode(c);}};S_SL_FOREX=function(){this.Init.apply(this,arguments);};S_SL_FOREX.prototype={Init:function(a){this._frame=a;this.svcParam={page:1,num:20,sort:"symbol",asc:1,node:"jbhl_forex"};this.css={up:"red",down:"green",highlight:"highlight",sortasc:"sort_down",sortdesc:"sort_up",pagediv:"pages",pagedisabled:"pagedisabled",pagecurr:"pagecurr"};this.outputParam=["sort","asc","node"];this.colorfield="changepercent";this.pagetags=5;this.tmrInt=60000;this.tmrCntFull=6;this.aFields=[{f:"symbol",t:"代码",d:-2,s:49},{f:"name",t:"名称",d:-2,s:51},{f:"close_price",t:"最新价",d:4,s:64,c:"colorize"},{f:"changepercent",t:"涨跌幅",d:4,s:4,c:"colorize",p:"$1%"},{f:"pricechange",t:"涨跌额",d:4,s:4,c:"colorize"},{f:"open_price",t:"开盘价",d:4,s:64,c:"colorize"},{f:"high_price",t:"最高价",d:4,s:64,c:"colorize"},{f:"low_price",t:"最低价",d:4,s:64,c:"colorize"},{f:"margin",t:"振幅",d:0,s:0,c:"colorize"},{f:"last_close_price",t:"昨收价",d:4,s:64,c:"colorize"},{f:"buy_price",t:"买入价",d:4,s:64,c:"colorize"},{f:"sell_price",t:"卖出价",d:4,s:64,c:"colorize"}];this.indexField="symbol";this.detailPage="http://finance.sina.com.cn/money/forex/hq/$1.shtml";this._aCodes=[];if(S_Finance.QuotesDataLight){this._oQDL=new S_Finance.QuotesDataLight([],0,this._qdlCallback._Bind(this),S_Finance.forexProcess);}this._srv=this._frame.SRVProvider();},GetData:function(a){this._cbSVC=a;this._frame.SRVCall("Market_Center.getNameList",this._gotData._Bind(this),this.svcParam);},_gotData:function(a){this._cbSVC(a);},GetDataLight:function(a){this._cbQDL=a;if(this._oQDL){this._oQDL.request();}},GetListLength:function(a){this._frame.SRVCall("Market_Center.getNameCount",a,{node:this.svcParam.node});},CodesChange:function(a){this._aCodes=a;if(this._oQDL){this._oQDL.changeCodes(a);}},_qdlCallback:function(b){var c;if(!b){b=[];}for(c=0;c<b.length;c++){if(b[c].close_price&&b[c].last_close_price){b[c].pricechange=b[c].close_price-b[c].last_close_price;b[c].changepercent=b[c].pricechange/b[c].last_close_price*100;}}this._cbQDL(b);}};S_SL_FUND=function(){this.Init.apply(this,arguments);};S_SL_FUND.prototype={Init:function(a){this._frame=a;this.svcParam={page:1,num:20,sort:"symbol",asc:1,node:"jjycjz"};this.css={up:"red",down:"green",highlight:"highlight",sortasc:"sort_down",sortdesc:"sort_up",pagediv:"pages",pagedisabled:"pagedisabled",pagecurr:"pagecurr"};this.outputParam=["sort","page","num","asc"];this.colorfield=5;this.pagetags=5;this.tmrInt=60000;this.tmrCntFull=5;this.aFields=[{f:"symbol",t:"代码",d:-2,s:49},{f:"name",t:"名称",d:-2,s:51},{f:"pre_nav",t:"最新估值",d:4,s:64,c:"colorize"},{f:"last_nav",t:"最新公布净值",d:4,c:"colorize"},{f:"accu_nav",t:"累计净值",d:4,c:"colorize"},{f:"nav_chg",t:"涨跌幅",d:4,s:4,c:"colorize",p:"$1%"},{f:"bar",t:"基金吧",s:146}];this.indexField="symbol";this.detailPage="http://biz.finance.sina.com.cn/suggest/lookup_n.php?q=$1&country=fund";this._aCodes=[];if(S_Finance.QuotesDataLight){this._oQDL=new S_Finance.QuotesDataLight([],0,this._qdlCallback._Bind(this),S_Finance.fundProcess);}this._srv=this._frame.SRVProvider();},GetData:function(a){this._cbSVC=a;this._frame.SRVCall("Market_Center.getFundPrevData",this._gotData._Bind(this),this.svcParam);},_gotData:function(a){this._cbSVC(this._dataPrepare(a));},_genStockLink:function(e){var b,d,c;d=[];b=document.createElement("a");b.setAttribute("href","http://bar.sina.com.cn/bar.php?name=of"+e);b.setAttribute("target","_blank");b.setAttribute("title","进入基金吧");c=document.createElement("img");c.setAttribute("src","http://www.sinaimg.cn/cj/subject/2009/0618/images/linkto_ba.gif");c.setAttribute("alt","基金吧");b.appendChild(c);d[1]=b;return d;},_dataPrepare:function(d,e){var g,n,f,m,h,b,k;if(!d){d=[];}if(e){return d;}for(g=0;g<d.length;g++){k=d[g][this.indexField]?d[g][this.indexField]:this._aCodes[g];b=this._genStockLink(k);d[g].bar=b[1];}return d;},GetDataLight:function(a){this._cbQDL=a;if(this._oQDL){this._oQDL.request();}},GetListLength:function(a){this._frame.SRVCall("Market_Center.getFundPrevCount",a,this.svcParam);},CodesChange:function(a){this._aCodes=a;if(this._oQDL){this._oQDL.changeCodes(a);}},_qdlCallback:function(b){this._cbQDL(this._dataPrepare(b),1);}};S_SL_FUNDMONEY=function(){this.Init.apply(this,arguments);};S_SL_FUNDMONEY.prototype={Init:function(a){this._frame=a;this.svcParam={page:1,num:20,sort:"symbol",asc:1,node:"moeny_fund"};this.css={up:"red",down:"green",highlight:"highlight",sortasc:"sort_down",sortdesc:"sort_up",pagediv:"pages",pagedisabled:"pagedisabled",pagecurr:"pagecurr"};this.outputParam=["node","sort","page","num","asc"];this.colorfield=3;this.pagetags=5;this.tmrInt=600000;this.tmrCntFull=5;this.aFields=[{f:"symbol",t:"代码",d:-2,s:49},{f:"name",t:"名称",d:-2,s:51},{f:"dwjz",t:"每万份基金单位收益",d:3,c:"colorize"},{f:"ljdwjz",t:"7日年化收益率",d:3,s:4,c:"colorize",p:"$1%"},{f:"date",t:"公布日期",d:-3},{f:"jjgm",t:"基金规模",d:3,c:"colorize"}];this.indexField="symbol";this.detailPage="http://biz.finance.sina.com.cn/suggest/lookup_n.php?q=$1&country=fund";this._aCodes=[];if(S_Finance.QuotesDataLight){this._oQDL=new S_Finance.QuotesDataLight([],0,this._qdlCallback._Bind(this),S_Finance.fundNetProcess);}this._srv=this._frame.SRVProvider();},GetData:function(a){this._cbSVC=a;this._frame.SRVCall("Market_Center.getNameList",this._gotData._Bind(this),this.svcParam);},_gotData:function(a){this._cbSVC(a);},_dataPrepare:function(d,e){var g,n,f,m,h,b,k;return d;},GetDataLight:function(a){this._cbQDL=a;if(this._oQDL){this._oQDL.request();}},GetListLength:function(a){this._frame.SRVCall("Market_Center.getNameCount",a,this.svcParam);},CodesChange:function(a){this._aCodes=a;if(this._oQDL){this._oQDL.changeCodes(a);}},_qdlCallback:function(b){this._cbQDL(this._dataPrepare(b),1);}};S_SL_FUNDNET=function(){this.Init.apply(this,arguments);};S_SL_FUNDNET.prototype={Init:function(a){this._frame=a;this.svcParam={page:1,num:20,sort:"symbol",asc:1,node:"open_fund"};this.css={up:"red",down:"green",highlight:"highlight",sortasc:"sort_down",sortdesc:"sort_up",pagediv:"pages",pagedisabled:"pagedisabled",pagecurr:"pagecurr"};this.outputParam=["node","sort","page","num","asc"];this.colorfield=5;this.pagetags=5;this.tmrInt=600000;this.tmrCntFull=5;this.aFields=[{f:"symbol",t:"代码",d:-2,s:49},{f:"name",t:"名称",d:-2,s:51},{f:"dwjz",t:"最新公布净值",d:3,c:"colorize"},{f:"ljdwjz",t:"累计净值",d:3,c:"colorize"},{f:"zrjz",t:"前单位净值",d:3,c:"colorize"},{f:"jzzz",t:"净值增长率",d:3,s:4,c:"colorize",p:"$1%"},{f:"date",t:"公布日期",d:-3},{f:"jjgm",t:"基金规模",d:3,c:"colorize"}];this.indexField="symbol";this.detailPage="http://biz.finance.sina.com.cn/suggest/lookup_n.php?q=$1&country=fund";this._aCodes=[];if(S_Finance.QuotesDataLight){this._oQDL=new S_Finance.QuotesDataLight([],0,this._qdlCallback._Bind(this),S_Finance.fundNetProcess);}this._srv=this._frame.SRVProvider();},GetData:function(a){this._cbSVC=a;this._frame.SRVCall("Market_Center.getFundNetData",this._gotData._Bind(this),this.svcParam);},_gotData:function(a){this._cbSVC(this._dataPrepare(a));},_dataPrepare:function(d,e){var g,n,f,m,h,b,k;if(!d){d=[];}for(g=0;g<d.length;g++){d[g].jzzz=(d[g].zrjz&&d[g].dwjz)?(((d[g].dwjz/d[g].zrjz)-1)*100):0;}return d;},GetDataLight:function(a){this._cbQDL=a;if(this._oQDL){this._oQDL.request();}},GetListLength:function(a){this._frame.SRVCall("Market_Center.getFundNetCount",a,this.svcParam);},CodesChange:function(a){this._aCodes=a;if(this._oQDL){this._oQDL.changeCodes(a);}},_qdlCallback:function(b){this._cbQDL(this._dataPrepare(b),1);}};S_SL_FUTURES=function(){this.Init.apply(this,arguments);};S_SL_FUTURES.prototype={Init:function(a){this._frame=a;this.svcParam={page:1,num:20,sort:"symbol",asc:1,node:"hj_qh"};this.css={up:"red",down:"green",highlight:"highlight",sortasc:"sort_down",sortdesc:"sort_up",pagediv:"pages",pagedisabled:"pagedisabled",pagecurr:"pagecurr"};this.outputParam=["node","sort","page","num","asc"];this.colorfield="changepercent";this.pagetags=5;this.tmrInt=6000;this.tmrCntFull=15;this.aFields=[{f:"symbol",t:"代码",d:-2,s:49},{f:"name",t:"名称",d:-2,s:49},{f:"trade",t:"最新价",d:0,s:64,c:"colorize"},{f:"changepercent",t:"涨跌幅",d:2,s:4,c:"colorize",p:"$1%"},{f:"close",t:"昨收",d:0,c:"colorize"},{f:"open",t:"今开",d:0,c:"colorize"},{f:"high",t:"最高",d:0,c:"colorize"},{f:"low",t:"最低",d:0,c:"colorize"},{f:"bid",t:"买入",d:0,c:"colorize"},{f:"ask",t:"卖出",d:0,c:"colorize"},{f:"settlement",t:"动态结算",d:0,c:"colorsize"},{f:"prevsettlement",t:"昨日结算",d:0,c:"colorsize"},{f:"bidvol",t:"买量",d:0},{f:"askvol",t:"卖量",d:0},{f:"volume",t:"成交量",d:0,s:8},{f:"position",t:"持仓量",d:0,s:8}];this.indexField="symbol";this.detailPage="http://finance.sina.com.cn/money/future/quote.html?$1";if(S_Finance.QuotesDataLight){this._oQDL=new S_Finance.QuotesDataLight([],0,this._qdlCallback._Bind(this),S_Finance.futuresProcess);}this._srv=this._frame.SRVProvider();},GetData:function(a){this._cbSVC=a;this._frame.SRVCall("Market_Center.getHQFuturesData",this._gotData._Bind(this),this.svcParam);if(this._svcChgCb){this._svcChgCb(this._outputParam());}},_gotData:function(a){this._cbSVC(this._dataPrepare(a));},_genStockLink:function(e){var b,d,c;b=document.createElement("a");b.setAttribute("href","http://bar.sina.com.cn/bar.php?name="+e);b.setAttribute("target","_blank");b.setAttribute("title","进入股票吧");c=document.createElement("img");c.setAttribute("src","http://www.sinaimg.cn/cj/subject/2009/0618/images/linkto_ba.gif");c.setAttribute("alt","股吧");b.appendChild(c);return b;},_dataPrepare:function(k){var f,d,e,b,h,g,l;if(!k){k=[];}for(f=0;f<k.length;f++){l=k[f][this.indexField]?k[f][this.indexField]:this._aCodes[f];g=this._genStockLink(l);k[f].bar=g;if(typeof(k[f].changepercent)=="undefined"){k[f].changepercent=parseFloat(k[f].trade)?((k[f].trade/k[f].prevsettlement-1)*100):0;}else{k[f].changepercent=(!isNaN(k[f].changepercent))?(parseFloat(k[f].changepercent)*100):0;}}return k;},GetDataLight:function(a){this._cbQDL=a;if(this._oQDL){this._oQDL.request();}},GetListLength:function(a){this._frame.SRVCall("Market_Center.getHQFuturesCount",a,{node:this.svcParam.node});},CodesChange:function(a){this._aCodes=a;if(this._oQDL){this._oQDL.changeCodes(a);}},_qdlCallback:function(b){var c;if(!b){b=[];}for(c=0;c<b.length;c++){b[c]=this._qdlObjConv(b[c]);}this._cbQDL(this._dataPrepare(b));},_qdlObjConv:function(b){var a=/(\d{1,2})(?=(\d{2})+(?:$|\.))/g;if(b.ticktime){b.ticktime.replace(a,"$1:");}return b;}};S_SL_CF_FU_DIG2=function(d){var c=["trade","close","open","high","low","bid","ask","settlement","prevsettlement"];for(var b in d.aFields){for(var e in c){if(d.aFields[b].f==c[e]){d.aFields[b].d=2;}}}};S_SL_FUTURESGLOBAL=function(){this.Init.apply(this,arguments);};S_SL_FUTURESGLOBAL.prototype={Init:function(a){this._frame=a;this.svcParam={page:1,num:20,sort:"symbol",asc:1,node:"qqqh_qh"};this.css={up:"global_up",down:"global_down",highlight:"highlight",sortasc:"sort_down",sortdesc:"sort_up",pagediv:"pages",pagedisabled:"pagedisabled",pagecurr:"pagecurr"};this.outputParam=["sort","page","num","asc"];this.colorfield="pricechange";this.pagetags=5;this.tmrInt=6000;this.tmrCntFull=6;this.aFields=[{f:"symbol",t:"代码",d:-2,s:49},{f:"name",t:"名称",d:-2,s:51},{f:"pricechange",t:"涨跌额",d:3,s:4,c:"colorize"},{f:"last",t:"最新价",d:3,s:64,c:"colorize"},{f:"prev",t:"昨收",d:3,c:"colorize"},{f:"open",t:"今开",d:3,c:"colorize"},{f:"high",t:"最高",d:3,c:"colorize"},{f:"low",t:"最低",d:3,c:"colorize"},{f:"bid",t:"买入",d:3,c:"colorize"},{f:"ask",t:"卖出",d:3,c:"colorize"},{f:"bidsize",t:"买量",d:0},{f:"asksize",t:"卖量",d:0},{f:"totalvol",t:"持仓量",d:0,s:8}];this.indexField="symbol";this.detailPage="http://finance.sina.com.cn/money/future/quote_hf.html?$1";if(S_Finance.QuotesDataLight){this._oQDL=new S_Finance.QuotesDataLight([],0,this._qdlCallback._Bind(this),S_Finance.futuresGlobalProcess);}this._srv=this._frame.SRVProvider();},GetData:function(a){this._cbSVC=a;this._frame.SRVCall("Market_Center.getFuturesGlobalData",this._gotData._Bind(this),this.svcParam);if(this._svcChgCb){this._svcChgCb(this._outputParam());}},_gotData:function(a){this._cbSVC(this._dataPrepare(a));},_dataPrepare:function(k){var f,d,e,b,h,g,l;if(!k){k=[];}for(f=0;f<k.length;f++){k[f].pricechange=k[f].last?(k[f].last-k[f].prev):0;}return k;},GetDataLight:function(a){this._cbQDL=a;if(this._oQDL){this._oQDL.request();}},GetListLength:function(a){this._frame.SRVCall("Market_Center.getFuturesGlobalCount",a,{node:this.svcParam.node});},CodesChange:function(a){this._aCodes=a;if(this._oQDL){this._oQDL.changeCodes(a);}},_qdlCallback:function(b){var c;if(!b){b=[];}for(c=0;c<b.length;c++){b[c]=this._qdlObjConv(b[c]);}this._cbQDL(this._dataPrepare(b));},_qdlObjConv:function(b){var a=/(\d{1,2})(?=(\d{2})+(?:$|\.))/g;if(b.ticktime){b.ticktime.replace(a,"$1:");}return b;}};S_SL_FUTURESINDEX=function(){this.Init.apply(this,arguments);};S_SL_FUTURESINDEX.prototype={Init:function(a){this._frame=a;this.svcParam={page:1,num:20,sort:"symbol",asc:1,node:"qz_qh"};this.css={up:"red",down:"green",highlight:"highlight",sortasc:"sort_down",sortdesc:"sort_up",pagediv:"pages",pagedisabled:"pagedisabled",pagecurr:"pagecurr"};this.outputParam=["node","sort","page","num","asc"];this.colorfield="pricechange";this.pagetags=5;this.tmrInt=6000;this.tmrCntFull=5;this.aFields=[{f:"symbol",t:"代码",d:-2,s:49},{f:"name",t:"名称",d:-2,s:51},{f:"trade",t:"最新价",d:1,s:64,c:"colorize"},{f:"pricechange",t:"涨跌额",d:1,c:"colorize"},{f:"changepercent",t:"涨跌幅",d:2,c:"colorize",p:"$1%"},{f:"prevclose",t:"昨收",d:1,c:"colorize"},{f:"open",t:"今开",d:1,c:"colorize"},{f:"high",t:"最高",d:1,c:"colorize"},{f:"low",t:"最低",d:1,c:"colorize"},{f:"prevsettlement",t:"昨结算",d:1,c:"colorsize"},{f:"volume",t:"成交量",d:0,s:8},{f:"position",t:"持仓量",d:0,s:8}];this.indexField="symbol";this.detailPage="http://finance.sina.com.cn/money/cffex/quotes/$1/nc.shtml";if(S_Finance.QuotesDataLight){this._oQDL=new S_Finance.QuotesDataLight([],0,this._qdlCallback._Bind(this),S_Finance.futuresIndexProcess);}this._srv=this._frame.SRVProvider();},GetData:function(a){this._cbSVC=a;this._frame.SRVCall("Market_Center.getNameList",this._gotData._Bind(this),this.svcParam);if(this._svcChgCb){this._svcChgCb(this._outputParam());}},_gotData:function(a){this._cbSVC(this._dataPrepare(a));},_genStockLink:function(e){var b,d,c;b=document.createElement("a");b.setAttribute("href","http://bar.sina.com.cn/bar.php?name="+e);b.setAttribute("target","_blank");b.setAttribute("title","进入股票吧");c=document.createElement("img");c.setAttribute("src","http://www.sinaimg.cn/cj/subject/2009/0618/images/linkto_ba.gif");c.setAttribute("alt","股吧");b.appendChild(c);return b;},_dataPrepare:function(k){var f,d,e,b,h,g,l;if(!k){k=[];}for(f=0;f<k.length;f++){l=k[f][this.indexField]?k[f][this.indexField]:this._aCodes[f];g=this._genStockLink(l);k[f].bar=g;if(k[f].symbol){k[f].name=k[f].symbol.replace("IF","期指");}}return k;},GetDataLight:function(a){this._cbQDL=a;if(this._oQDL){this._oQDL.request();}},GetListLength:function(a){this._frame.SRVCall("Market_Center.getNameCount",a,{node:this.svcParam.node});},CodesChange:function(a){this._aCodes=a;if(this._oQDL){this._oQDL.changeCodes(a);}},_qdlCallback:function(b){var c;if(!b){b=[];}for(c=0;c<b.length;c++){b[c]=this._qdlObjConv(b[c]);}this._cbQDL(this._dataPrepare(b));},_qdlObjConv:function(b){var a=/(\d{1,2})(?=(\d{2})+(?:$|\.))/g;if(b.ticktime){b.ticktime.replace(a,"$1:");}if(typeof(b.pricechange)=="undefined"){b.pricechange=b.trade-b.prevsettlement;}if(typeof(b.changepercent)=="undefined"){b.changepercent=(b.pricechange/b.prevsettlement)*100;}if(b.trade==0){b.pricechange=b.changepercent=0;}return b;}};S_SL_GLOBAL=function(){this.Init.apply(this,arguments);};S_SL_GLOBAL.prototype={Init:function(a){this._frame=a;this.svcParam={page:1,num:20,sort:"_",asc:1,node:"asia_hqgz"};this.css={up:"global_up",down:"global_down",highlight:"highlight",sortasc:"sort_down",sortdesc:"sort_up",pagediv:"pages",pagedisabled:"pagedisabled",pagecurr:"pagecurr"};this.outputParam=["node","sort","page","num","asc"];this.colorfield=4;this.pagetags=5;this.tmrInt=6000;this.tmrCntFull=6;this.aFields=[{f:"area",t:"国家或地区",d:-2,s:48},{f:"symbol",t:"代码",d:-2,s:48},{f:"name",t:"名称",d:-2,s:50},{f:"price",t:"最新价",d:2,s:64,c:"colorize"},{f:"change",t:"涨跌额",d:2,s:4,c:"colorize"},{f:"changerate",t:"涨跌幅",d:3,s:4,c:"colorize",p:"$1%"},{f:"time",t:"行情时间",s:2,d:-3}];this.indexField="symbol";this.detailPage="";this.cssPrefix="s_sl_global_css_";this._aCodes=[];if(S_Finance.QuotesDataLight){this._oQDL=new S_Finance.QuotesDataLight([],0,this._qdlCallback._Bind(this),S_Finance.globalProcess);}this._srv=this._frame.SRVProvider();},GetData:function(a){this._cbSVC=a;this._frame.SRVCall("Market_Center.getGlobalIndex",this._gotData._Bind(this),this.svcParam);},_gotData:function(a){this._cbSVC(a);},GetDataLight:function(a){this._cbQDL=a;if(this._oQDL){this._oQDL.request();}},GetListLength:function(a){this._frame.SRVCall("Market_Center.getGlobalIndexCount",a,this.svcParam);},CodesChange:function(a){this._aCodes=a;if(this._oQDL){this._oQDL.changeCodes(a);}},_qdlCallback:function(b){this._cbQDL(b);}};S_SL_GOLD=function(){this.Init.apply(this,arguments);};S_SL_GOLD.prototype={Init:function(a){this._frame=a;this.svcParam={page:1,num:20,sort:"symbol",asc:1,node:"sge_gold"};this.css={up:"red",down:"green",highlight:"highlight",sortasc:"sort_down",sortdesc:"sort_up",pagediv:"pages",pagedisabled:"pagedisabled",pagecurr:"pagecurr"};this.outputParam=["sort","asc","node","page"];this.colorfield="changepercent";this.pagetags=5;this.tmrInt=60000;this.tmrCntFull=6;this.aFields=[{f:"webname",t:"品种",d:-2,s:48},{f:"name",t:"名称",d:-2,s:50},{f:"trade",t:"最新价",d:2,s:64,c:"colorize"},{f:"open",t:"开盘价",d:2,c:"colorize"},{f:"high",t:"最高价",d:2,c:"colorize"},{f:"low",t:"最低价",d:2,c:"colorize"},{f:"changepercent",t:"涨跌幅",d:2,s:4,c:"colorize",p:"$1"},{f:"close",t:"昨收价",d:2,c:"colorize"},{f:"volume",t:"总成交量",d:2,s:8},{f:"amount",t:"总成交额",d:2,s:8},{f:"ticktime",t:"更新时间",s:16,d:-3},{f:"lsjy",t:"历史交易",s:2}];this.indexField="symbol";this.detailPage="";this._aCodes=[];if(S_Finance.QuotesDataLight){this._oQDL=new S_Finance.QuotesDataLight([],0,this._qdlCallback._Bind(this),S_Finance.goldProcess);}this._srv=this._frame.SRVProvider();},GetData:function(a){this._cbSVC=a;this._frame.SRVCall("Market_Center.getNameList",this._gotData._Bind(this),this.svcParam);},_gotData:function(d){var c,b;this._cbSVC(d);},GetDataLight:function(a){this._cbQDL=a;if(this._oQDL){this._oQDL.request();}},GetListLength:function(a){this._frame.SRVCall("Market_Center.getNameCount",a,{node:this.svcParam.node});},CodesChange:function(a){this._aCodes=a;if(this._oQDL){this._oQDL.changeCodes(a);}},_qdlCallback:function(b){var c,d;if(!b){b=[];}for(c=0;c<b.length;c++){d=$C("a");d.appendChild($T("查看"));d.target="_blank";d.href="http://vip.stock.finance.sina.com.cn/q/view/vGold_History.php?breed="+b[c].symbol;b[c].lsjy=d;}this._cbQDL(b);}};S_SL_HK=function(){this.Init.apply(this,arguments);};S_SL_HK.prototype={Init:function(a){this._frame=a;this.svcParam={page:1,num:20,sort:"symbol",asc:1,node:"qbgg_hk"};this.css={up:"global_up",down:"global_down",highlight:"highlight",sortasc:"sort_down",sortdesc:"sort_up",pagediv:"pages",pagedisabled:"pagedisabled",pagecurr:"pagecurr"};this.outputParam=["node","sort","page","num","asc"];this.colorfield="pricechange";this.pagetags=5;this.tmrInt=60000;this.tmrCntFull=10;this.aFields=[{f:"symbol",t:"代码",d:-2,s:49},{f:"name",t:"名称",d:-2,s:563},{f:"lasttrade",t:"最新价",d:3,s:64,c:"colorize"},{f:"pricechange",t:"涨跌额",d:3,s:4,c:"colorize"},{f:"changepercent",t:"涨跌幅",d:3,s:4,c:"colorize",p:"$1%"},{f:"prevclose",t:"昨收",d:3,s:512,c:"colorize"},{f:"open",t:"今开",d:3,c:"colorize"},{f:"high",t:"最高",d:3,c:"colorize"},{f:"low",t:"最低",d:3,c:"colorize"},{f:"volume",t:"成交量/万",d:2,s:8},{f:"amount",t:"成交额/万",d:2,s:8},{f:"jjtmfsshq",t:"经济通免费实时行情",d:-2,s:18},{f:"bar",t:"股吧",s:18}];this.indexField="symbol";this.detailPage="http://finance.sina.com.cn/stock/hkstock/quote.html?code=$1";this.cssPrefix="s_sl_hk_css_";this._aCodes=[];if(S_Finance.QuotesDataLight){this._oQDL=new S_Finance.QuotesDataLight([],0,this._qdlCallback._Bind(this),S_Finance.hkProcess);}this._srv=this._frame.SRVProvider();},GetData:function(a){this._cbSVC=a;this._frame.SRVCall("Market_Center.getHKStockData",this._gotData._Bind(this),this.svcParam);},_gotData:function(a){this._cbSVC(this._dataPrepare(a));},_genStockLink:function(f){var b,e,d;e=[];var g=parseInt(f,10).toString();while(g.length<4){g="0"+g;}b=document.createElement("a");b.setAttribute("href","http://bar.sina.com.cn/bar.php?name="+g+"HK");b.setAttribute("target","_blank");b.setAttribute("title","进入股票吧");d=document.createElement("img");d.setAttribute("src","http://www.sinaimg.cn/cj/subject/2009/0618/images/linkto_ba.gif");d.setAttribute("alt","股吧");b.appendChild(d);e[0]=b;return e;},_dataPrepare:function(d,e){var g,n,f,m,h,b,k;for(g=0;g<d.length;g++){if(e&&!parseFloat(d[g].open)&&!parseFloat(d[g].volume)){d[g]={};continue;}k=d[g][this.indexField]?d[g][this.indexField]:this._aCodes[g];b=this._genStockLink(k);d[g].bar=b[0];if(d[g].volume){d[g].volume/=10000;}if(d[g].amount){d[g].amount/=10000;}b=document.createElement("a");n=document.createElement("img");n.src="http://www.sinaimg.cn/cj/subject/2009/0618/images/btn_hk_rt.gif";b.appendChild(n);b.target="_blank";b.href="http://biz.finance.sina.com.cn/hk/hk_rt_rd.php?code="+k;d[g].jjtmfsshq=b;}return d;},GetDataLight:function(a){this._cbQDL=a;if(this._oQDL){this._oQDL.request();}},GetListLength:function(a){this._frame.SRVCall("Market_Center.getHKStockCount",a,{node:this.svcParam.node});},CodesChange:function(a){this._aCodes=a;if(this._oQDL){this._oQDL.changeCodes(a);}},_qdlCallback:function(b){var c;for(c=0;c<b.length;c++){b[c]=this._qdlObjConv(b[c]);}this._cbQDL(this._dataPrepare(b,1));},_qdlObjConv:function(e){var b,c,a;return e;}};S_SL_HKINDEX=function(){this.Init.apply(this,arguments);};S_SL_HKINDEX.prototype={Init:function(a){this._frame=a;this.svcParam={page:1,num:20,sort:"symbol",asc:1,node:"zs_hk"};this.css={up:"global_up",down:"global_down",highlight:"highlight",sortasc:"sort_down",sortdesc:"sort_up",pagediv:"pages",pagedisabled:"pagedisabled",pagecurr:"pagecurr"};this.outputParam=["sort","page","num","asc"];this.colorfield=3;this.pagetags=5;this.tmrInt=60000;this.tmrCntFull=5;this.aFields=[{f:"symbol",t:"代码",d:-2,s:49},{f:"name",t:"名称",d:-2,s:51},{f:"lasttrade",t:"最新价",d:2,s:64,c:"colorize"},{f:"pricechange",t:"涨跌额",d:2,s:4,c:"colorize"},{f:"changepercent",t:"涨跌幅",d:3,s:4,c:"colorize",p:"$1%"},{f:"prevclose",t:"昨收",d:2,c:"colorize"},{f:"open",t:"今开",d:2,c:"colorize"},{f:"high",t:"最高",d:2,c:"colorize"},{f:"low",t:"最低",d:2,c:"colorize"}];this.indexField="symbol";this.detailPage="http://finance.sina.com.cn/stock/hkstock/quote.html?code=$1";this.cssPrefix="s_sl_hkindex_css_";this._aCodes=[];if(S_Finance.QuotesDataLight){this._oQDL=new S_Finance.QuotesDataLight([],0,this._qdlCallback._Bind(this),S_Finance.hkProcess);}this._srv=this._frame.SRVProvider();},GetData:function(a){this._cbSVC=a;this._frame.SRVCall("Market_Center.getNameList",this._gotData._Bind(this),this.svcParam);},_gotData:function(a){this._cbSVC(this._dataPrepare(a));},_dataPrepare:function(k){var f,d,e,b,h,g,l;if(!k){k=[];}return k;},GetDataLight:function(a){this._cbQDL=a;if(this._oQDL){this._oQDL.request();}},GetListLength:function(a){this._frame.SRVCall("Market_Center.getNameCount",a,{node:this.svcParam.node});},CodesChange:function(a){this._aCodes=a;if(this._oQDL){this._oQDL.changeCodes(a);}},_qdlCallback:function(b){var c;for(c=0;c<b.length;c++){b[c]=this._qdlConv(b[c]);}this._cbQDL(this._dataPrepare(b));},_qdlConv:function(a){a.pricechange=a.lasttrade-a.prevclose;a.changepercent=a.pricechange/a.prevclose*100;if(!a.lasttrade){a.pricechange=a.changepercent=0;}return a;}};S_SL_US=function(){this.Init.apply(this,arguments);};S_SL_US.prototype={Init:function(a){this._frame=a;this.svcParam={page:1,num:20,sort:"chg",asc:0,node:"china_us"};this.css={up:"global_up",down:"global_down",highlight:"highlight",sortasc:"sort_down",sortdesc:"sort_up",pagediv:"pages",pagedisabled:"pagedisabled",pagecurr:"pagecurr",pageone:"pageone"};this.outputParam=["node","sort","page","num","asc"];this.colorfield="diff";this.pagetags=5;this.tmrInt=60000;this.tmrCntFull=6;this.aFields=[{f:"symbol",t:"代码",d:-2,s:49},{f:"cname",t:"名称",d:-2,s:51},{f:"price",t:"最新价",d:2,s:64,c:"colorize"},{f:"diff",t:"涨跌额",d:2,s:4,c:"colorize"},{f:"chg",t:"涨跌幅",d:3,s:4,c:"colorize",p:"$1%"},{f:"open",t:"开盘价",d:3,c:"colorize"},{f:"high",t:"最高价",d:3,c:"colorize"},{f:"low",t:"最低价",d:3,c:"colorize"},{f:"_52whigh",t:"52周最高价",d:3,c:"colorize"},{f:"_52wlow",t:"52周最低价",d:3,c:"colorize"},{f:"volume",t:"成交量",s:8,d:0}];this.indexField="symbol";this.detailPage="http://biz.finance.sina.com.cn/suggest/lookup_n.php?strict=1&country=us&q=$1";this.cssPrefix="s_sl_us_css_";if(S_Finance.QuotesDataLight){this._oQDL=new S_Finance.QuotesDataLight([],0,this._qdlCallback._Bind(this),S_Finance.usProcess);}this._srv=this._frame.SRVProvider();},GetData:function(a){this._cbSVC=a;this._frame.SRVCall("Market_Center.getUSList",this._gotData._Bind(this),this.svcParam);},_gotData:function(a){this._cbSVC(a);},GetDataLight:function(a){this._cbQDL=a;if(this._oQDL){this._oQDL.request();}},GetListLength:function(a){this._frame.SRVCall("Market_Center.getUSCount",a,{node:this.svcParam.node});},CodesChange:function(a){this._aCodes=a;if(this._oQDL){this._oQDL.changeCodes(a);}},_qdlCallback:function(b){this._cbQDL(b);}};S_SL_WAR=function(){this.Init.apply(this,arguments);};S_SL_WAR.prototype={Init:function(a){this._frame=a;this.svcParam={stock_symbol:"",value:"","class":"a",publisher:"",page:1,num:20,sort:"chgrate",asc:0,node:"hk_warrant_rgz"};this.css={up:"green",down:"red",highlight:"highlight",sortasc:"sort_down",sortdesc:"sort_up",pagediv:"pages",pagedisabled:"pagedisabled",pagecurr:"pagecurr"};this.outputParam=["sort","page","num","asc","node"];this.colorfield=3;this.pagetags=5;this.tmrInt=60000;this.tmrCntFull=1;this.aFields=[{f:"symbol",t:"代码",d:-2,s:49},{f:"warrant_name",t:"名称",d:-2,s:51},{f:"lasttrade",t:"最新价",d:3,s:64,c:"colorize"},{f:"chgrate",t:"涨跌幅",d:3,s:4,c:"colorize",p:"$1%"},{f:"volume",t:"成交量/万",d:2,s:8,c:"colorize"},{f:"amount",t:"成交额/万",d:2,s:8,c:"colorize"},{f:"callputflag",t:"形式",d:-2},{f:"strikeprice",t:"行使价",d:-2},{f:"maturitydate",t:"到期日",d:-2},{f:"publisher",t:"发行人",d:-2,s:18},{f:"stock_name",t:"相关股票",d:-2,s:18}];this.indexField="symbol";this.detailPage="http://biz.finance.sina.com.cn/suggest/lookup_n.php?q=$1&country=hk";this._aCodes=[];if(S_Finance.QuotesDataLight){this._oQDL=new S_Finance.QuotesDataLight([],0,this._qdlCallback._Bind(this),S_Finance.hkProcess);}this._srv=this._frame.SRVProvider();},GetData:function(a){this._cbSVC=a;if(this.svcParam.node){var b={hk_warrant_rgz:"a",hk_warrant_nxz:"b",hk_warrant_rengu:"0",hk_warrant_rengou:"1",hk_warrant_xz:"2",hk_warrant_nz:"3"};this.svcParam["class"]=b[this.svcParam.node];}this._frame.SRVCall("HK_DelayQuotes.getWarrant",this._gotData._Bind(this),this.svcParam);},_dataPrepare:function(d){var c,b;if(!d){d=[];}for(c=0;c<d.length;c++){b=document.createElement("a");b.appendChild(document.createTextNode(d[c]["stock_name"]));b.setAttribute("target","_blank");b.setAttribute("href","http://biz.finance.sina.com.cn/suggest/lookup_n.php?country=hk&q="+d[c]["stock_symbol"]);d[c]["stock_name"]=b;d[c].volume/=10000;d[c].amount/=10000;}return d;},_gotData:function(a){this._cbSVC(this._dataPrepare(a));},GetDataLight:function(a){this._cbQDL=a;if(this._oQDL){this._oQDL.request();}},_qdlCallback:function(b){var c;for(c=0;c<b.length;c++){b[c]=this._qdlObjConv(b[c]);}this._cbQDL(this._dataPrepare(b));},_qdlObjConv:function(e){var b,c,a;b=["changeRate"];c=["chgrate"];for(a=0;a<b.length;a++){if(typeof(e[b[a]])!="undefined"){e[c[a]]=e[b[a]];delete e[b[a]];}}},CodesChange:function(a){this._aCodes=a;if(this._oQDL){this._oQDL.changeCodes(a);}},GetListLength:function(a){if(this.svcParam.node){var b={hk_warrant_rgz:"a",hk_warrant_nxz:"b",hk_warrant_rengu:"0",hk_warrant_rengou:"1",hk_warrant_xz:"2",hk_warrant_nz:"3"};this.svcParam["class"]=b[this.svcParam.node];}this._frame.SRVCall("HK_DelayQuotes.getWarrantCount",a,this.svcParam);}};S_SL_CF_WARSIMPLE=function(b){var a;for(a=0;a<b.aFields.length;a++){if(b.aFields[a].f=="callputflag"){b.aFields.splice(a,1);break;}}};
