var HQLoader=function(){this._S=null;this._T="";this._U=[];this._V=null;this._W=-1;this._X=function(){var _a=this._T;var _b=_a.split("<"+"!-- @LOOP@ -->");var _c=_b[0];var _d=_b[1];var _e=_b[2];for(var i=0;i<this._U.length;i++){var _f=_d;var _g=this._V(this._U[i]);var _h=_f.match(/(<!--\s)?@[^@]*@(\s-->)?/gm);if(_h!=null){for(var j=0;j<_h.length;j++){var _i=_g[_h[j].replace(/(<!--\s)|(\s-->)/g,"").replace(/@/g,"")];_i=typeof _i=="undefined"?"--":_i;_f=_f.replace(_h[j],_i);}}_c+=_f.replace(/_style=/g,"style=");}this._S.innerHTML=_c+_e;};this.boot=function(_j,_k,_l,_m,_n){this._S=document.getElementById(_j);this._T=this._S.innerHTML;this._U=_k;this._V=_l;this._W=ScriptCtrl.load(this._U,this._X.Bind(this),_m);};};function fillZPHQ(){var _o=new HQLoader();var _p={"EUR":"欧元兑美元","GBP":"英镑兑美元","AUD":"澳元兑美元","CHF":"美元兑瑞郎","CAD":"美元兑加元","HKD":"美元兑港币","JPY":"美元兑日元","USDCNY":"美元兑人民币","NZDUSD":"新西兰元兑美元"};var _n={"USDCNY":"http://finance.sina.com.cn/money/forex/hq/USDCNY.shtml","EUR":"http://finance.sina.com.cn/money/forex/hq/EUR.shtml","GBP":"http://finance.sina.com.cn/money/forex/hq/GBP.shtml","AUD":"http://finance.sina.com.cn/money/forex/hq/AUD.shtml","CHF":"http://finance.sina.com.cn/money/forex/hq/CHF.shtml","CAD":"http://finance.sina.com.cn/money/forex/hq/CAD.shtml","HKD":"http://finance.sina.com.cn/money/forex/hq/HKD.shtml","JPY":"http://finance.sina.com.cn/money/forex/hq/JPY.shtml","NZDUSD":"http://finance.sina.com.cn/money/forex/hq/NZDUSD.shtml"};_o.boot("divZPHQ",["USDCNY","HKD","EUR","GBP","AUD","CHF","CAD","JPY","NZDUSD"],function(_q){if("hq_str_"+_q in window){var _g=window["hq_str_"+_q].split(",");var _r=_g[8]-_g[3];_g[8]=(_g[8]*1).toFixed(_q.indexOf("JPY")==-1?4:2);_g[10]=_r.toFixed(_q.indexOf("JPY")==-1?4:2);_g[11]=_r>0?"#F00":(_r<0?"#008000":"#000");_g[12]=_p[_q];if(typeof _n!="undefined"&&_q in _n&&_n[_q]!=""){_g[12]='<a href="'+_n[_q]+'" target="_blank">'+_g[12]+'</a>';}return _g;}else{return[];}},10000);}function fillJCPHQ(){var _o=new HQLoader();var _p={"ERYN":"欧元兑日元","UKYN":"英镑兑日元","ERUK":"欧元兑英镑","AUYN":"澳元兑日元","ERCA":"欧元兑加元","ERSF":"欧元兑瑞郎","SFYN":"瑞郎兑日元","AUCA":"澳元兑加元"};var _n={"ERYN":"http://finance.sina.com.cn/money/forex/hq/ERYN.shtml","UKYN":"http://finance.sina.com.cn/money/forex/hq/UKYN.shtml","ERUK":"http://finance.sina.com.cn/money/forex/hq/ERUK.shtml","AUYN":"http://finance.sina.com.cn/money/forex/hq/AUYN.shtml","ERCA":"http://finance.sina.com.cn/money/forex/hq/ERCA.shtml","ERSF":"http://finance.sina.com.cn/money/forex/hq/ERSF.shtml","SFYN":"http://finance.sina.com.cn/money/forex/hq/SFYN.shtml","AUCA":"http://finance.sina.com.cn/money/forex/hq/AUCA.shtml"};_o.boot("divJCPHQ",["ERYN","UKYN","ERUK","AUYN","ERCA","ERSF","SFYN","AUCA"],function(_q){if("hq_str_"+_q in window){var _g=window["hq_str_"+_q].split(",");var _r=_g[8]-_g[3];_g[8]=(_g[8]*1).toFixed(_q.indexOf("YN")==-1?4:2);_g[10]=_r.toFixed(_q.indexOf("YN")==-1?4:2);_g[11]=_r>0?"#F00":(_r<0?"#008000":"#000");_g[12]=_p[_q];if(typeof _n!="undefined"&&_q in _n&&_n[_q]!=""){_g[12]='<a href="'+_n[_q]+'" target="_blank">'+_g[12]+'</a>';}return _g;}else{return[];}},10000);}function fillSP(){var _o=new HQLoader();var _p={"hf_GC":"黄金","hf_SI":"白银","hf_CL":"原油","hf_CAD":"LME3月铜","hf_S":"美黄豆","hf_C":"美玉米"};var _n={"hf_GC":"http://finance.sina.com.cn/money/future/quote_hf.html?GC","hf_SI":"http://finance.sina.com.cn/money/future/quote_hf.html?SI","hf_CL":"http://finance.sina.com.cn/money/future/quote_hf.html?CL","hf_CAD":"http://finance.sina.com.cn/money/future/quote_hf.html?CAD","hf_S":"http://finance.sina.com.cn/money/future/quote_hf.html?S","hf_C":"http://finance.sina.com.cn/money/future/quote_hf.html?C"};_o.boot("divSP",["hf_GC","hf_SI","hf_CL","hf_CAD","hf_S","hf_C"],function(_q){if("hq_str_"+_q in window){var _g=window["hq_str_"+_q].split(",");_g[0]=(_g[0]*1).toFixed(2);var _r=_g[0]-_g[7];_g[12]=_r.toFixed(2);_g[13]=_r>0?"#F00":(_r<0?"#008000":"#000");_g[14]=_p[_q];if(typeof _n!="undefined"&&_q in _n&&_n[_q]!=""){_g[14]='<a href="'+_n[_q]+'" target="_blank">'+_g[14]+'</a>';}return _g;}else{return[];}},10000);}function fillZS(){var _o=new HQLoader();var _p={"DINI":"美元指数","gb_dji":"道琼斯","gb_ixic":"纳斯达克","int_hangseng":"恒生指数","int_nikkei":"日经指数"};var _n={"DINI":"http://finance.sina.com.cn/money/forex/hq/DINI.shtml","gb_dji":"http://finance.sina.com.cn/stock/usstock/US100_DJI.shtml","gb_ixic":"http://finance.sina.com.cn/stock/usstock/US100_IXIC.shtml","int_hangseng":"http://finance.sina.com.cn/stock/hkstock/quote.html?code=HSI"};_o.boot("divZS",["DINI","gb_dji","gb_ixic","int_hangseng","int_nikkei"],function(_q){if("hq_str_"+_q in window){var _g=window["hq_str_"+_q].split(",");if(/^gb_.*/.test(_q)){_g[50]=_g[1];_g[51]=_g[4];var _r=_g[4]*1;_g[52]=_r>0?"#F00":(_r<0?"#008000":"#000");_g[53]=_p[_q];}else if(/^int_.*/.test(_q)){_g[50]=_g[1];_g[51]=_g[2];var _r=_g[2]*1;_g[52]=_r>0?"#F00":(_r<0?"#008000":"#000");_g[53]=_p[_q];}else if(_q=="DINI"){_g[50]=(_g[8]*1).toFixed(2);var _r=_g[8]-_g[3];_g[51]=_r.toFixed(2);_g[52]=_r>0?"#F00":(_r<0?"#008000":"#000");_g[53]=_p[_q];}if(typeof _n!="undefined"&&_q in _n&&_n[_q]!=""){_g[53]='<a href="'+_n[_q]+'" target="_blank">'+_g[53]+'</a>';}return _g;}else{return[];}},10000);}function submitWQCX(_s){var _t=_s["selectWQCX"].value*1;document.getElementById("divImageWQCX").src=["http://image.sinajs.cn/newchart/v5/forex/rate/USA.gif","http://image.sinajs.cn/newchart/v5/forex/rate/Japan.gif","http://image.sinajs.cn/newchart/v5/forex/rate/Europe.gif","http://image.sinajs.cn/newchart/v5/forex/rate/UK.gif","http://image.sinajs.cn/newchart/v5/forex/rate/Australia.gif","http://image.sinajs.cn/newchart/v5/forex/rate/NewZealand.gif","http://image.sinajs.cn/newchart/v5/forex/rate/Canada.gif","http://image.sinajs.cn/newchart/v5/forex/rate/China.gif","http://image.sinajs.cn/newchart/v5/forex/rate/Switzerland.gif","http://image.sinajs.cn/newchart/v5/forex/rate/HongKong.gif"][_t];var _u=0;var _v=document.getElementById("divListWQCX").childNodes;for(var i=0;i<_v.length;i++){if(_v[i].nodeType==1){_v[i].style.display=_t==_u?"":"none";_u++;}};return false;}function loadScript(_w,_x,_y){var _z=document.createElement("script");_z.type="text/javascript";_z._Y=typeof _y!="undefined"?_y:new Function();_z[document.all?"onreadystatechange":"onload"]=function(){if(document.all&&this.readyState!="loaded"&&this.readyState!="complete"){return;}this._Y(this);this._Y=null;this[document.all?"onreadystatechange":"onload"]=null;this.parentNode.removeChild(this);};_z.src=_x;(typeof _w=="string"?document.getElementById(_w):_w).appendChild(_z);}function submitZCZL(_s){var _A=_s["selectZCZL_money_pair"].value;var _B=_s["selectZCZL_period"].value;if(_A!=""&&_B!=""){window["forex_resistance"]="";loadScript("for_loader","http://biz.finance.sina.com.cn/forexcount/forex_interface.php?money_pair="+_A+"&period="+_B,callbackZCZL);}return false;}function callbackZCZL(){var _C=["--","--┊--┊--","--┊--┊--"];if("forex_resistance" in window&&window["forex_resistance"]!=""){_D=window["forex_resistance"].split(",");_C=[_D[0],_D[2]+"┊"+_D[4]+"┊"+_D[6],_D[1]+"┊"+_D[3]+"┊"+_D[5]];}var _E=["jj","zc","zl"];for(var i=0;i<_E.length;i++){document.getElementById("spanZCZL_"+_E[i]).innerHTML=_C[i];}}function autosubmitZCZL(){submitZCZL(document.getElementById("formZCZL"));}function submitRLCX(_s){document.getElementById("imageRLCX").src="http://image.sinajs.cn/newchart/v5/forex/indexes/"+_s["selectRLCX_"+_s["selectRLCX"].value].value+".gif";return false;}function changeRLCX(_s){var _F=["mg","oy","dg","rb","yg","rs","az","jnd"];var _G=_s["selectRLCX"].value;for(var i=0;i<_F.length;i++){_s["selectRLCX_"+_F[i]].style.display=_G==_F[i]?"":"none";}}function submitWHJUQ(_s){var _H=["JPY","CHF","GBP","EUR","HKD","AUD","CAD","USDCNY"];var _I=_s["selectWHJUQ_from"].value;var _J=_s["selectWHJUQ_to"].value;var _K="USD"==_I?1:(window["hq_str_"+_I].split(","))[8]*1;var _L="USD"==_I?"美元":(window["hq_str_"+_I].split(","))[9];if(("_EUR_GBP_AUD_").indexOf(_I)!=-1){_K=1/_K;}var _J=_s["selectWHJUQ_to"].value;var _M="USD"==_J?1:(window["hq_str_"+_J].split(","))[8]*1;var _N="USD"==_J?"美元":(window["hq_str_"+_J].split(","))[9];if("_EUR_GBP_AUD_".indexOf(_J)!=-1){_M=1/_M;}_s["inputWHJUQ_to"].value=(_s["inputWHJUQ_from"].value*1/_K*_M).toFixed(4);document.getElementById("spanWHJUQ").innerHTML=_L+"兑"+_N+" "+(_M/_K).toFixed(4);return false;}var ImageHqHSZS=function(){this._Z=null;this._00=null;this._T="";this._01="";this._02=-1;this._03=-1;this._04=function(){return(new Date()).getTime();};this._X=function(){var _O=this._T;if("hq_str_"+this._01 in window){var _g=window["hq_str_"+this._01].split(",");var _r=_g[8]-_g[3];var _P="_DINI_JPY_SFYN_ERYN_UKYN_CAYN_HKYN_AUYN_".indexOf("_"+this._01+"_")!=-1;_g[8]=(_g[8]*1).toFixed(_P?2:4);_g[3]=(_g[3]*1).toFixed(_P?2:4);_g[5]=(_g[5]*1).toFixed(_P?2:4);_g[10]=(_r/_g[3]*100).toFixed(4);_g[11]=_r>0?"#F00":(_r<0?"#008000":"#000");var _h=_O.match(/(<!--\s)?@[^@]*@(\s-->)?/gm);if(_h!=null){for(var j=0;j<_h.length;j++){var _i=_g[_h[j].replace(/(<!--\s)|(\s-->)/g,"").replace(/@/g,"")];_i=typeof _i=="undefined"?"--":_i;_O=_O.replace(_h[j],_i);}}_O=_O.replace(/_style=/g,"style=");this._00.innerHTML=_O;}};this._05=function(){this._Z.src="http://image.sinajs.cn/newchart/v5/forex/min"+(this._01=="USDCNY"?"30":"")+"_m/"+this._01+".gif?"+this._04();};this._06=function(){loadScript("for_loader","http://hq.sinajs.cn/rn="+this._04()+"&list="+this._01,this._X.Bind(this));};this._07=function(_Q){if(typeof _Q=="undefined"){_Q=document.getElementById("selectHSZS").value;}this._01=_Q;document.getElementById("linkHSZS").href="http://finance.sina.com.cn/money/forex/hq/"+this._01+".shtml";if(this._02!=-1){clearInterval(this._02);}this._05();this._02=setInterval(this._05.Bind(this),60000);if(this._03!=-1){clearInterval(this._03);}this._06();this._03=setInterval(this._06.Bind(this),10000);return false;};this.boot=function(){this._Z=document.getElementById("imageHSZS");this._00=document.getElementById("divHSZS");this._T=this._00.innerHTML;this._07("DINI");window['submitHSZS']=this._07.Bind(this);};};function fillHSZS(){(new ImageHqHSZS()).boot();}function submitRMBPJCX(_s){_s.action="http://biz.finance.sina.com.cn/forex/forex.php?flag=0&money_code="+_s["selectRMBPJCX_money"].value+"&type="+_s["selectRMBPJCX_type"].value+"&startdate="+_s["inputRMBPJCX_from_year"].value+"-"+_s["inputRMBPJCX_from_month"].value+"-"+_s["inputRMBPJCX_from_date"].value+"&enddate="+_s["inputRMBPJCX_to_year"].value+"-"+_s["inputRMBPJCX_to_month"].value+"-"+_s["inputRMBPJCX_to_date"].value;}var GlobalTime=function(){this._08=["BeiJing","London","NewYork","Sydney"];this._09=[0,getGlobalTimezone("UK"),getGlobalTimezone("US"),getGlobalTimezone("AU")];this._0a=null;this._0b=[];this._03=-1;this._04=function(){return(new Date()).getTime();};this._X=function(){this._0a=new Date(this._0a.getTime()+1000);for(var i=0;i<this._09.length;i++){var _R=new Date(this._0a.getTime()+this._09[i]*3600000);this._0b[i].innerHTML=_R.toString().match(/\d{2}:\d{2}:\d{2}/)[0];}};this._0c=function(){if("StandardBJTime" in window){this._0a=new Date(window["StandardBJTime"]*1000);if(this._03!=-1){clearInterval(this._03);}this._X();this._03=setInterval(this._X.Bind(this),1000);}};this.boot=function(){for(var i=0;i<this._08.length;i++){this._0b.push(document.getElementById(this._08[i]));}loadScript("for_loader","http://counter.sina.com.cn/time?fm=JS&rn="+this._04(),this._0c.Bind(this));};};function fillTime(){var globalTime=new GlobalTime();globalTime.boot();}

