window.iTimeoutID=0;function FirefoxEvent(){Event.prototype.__defineGetter__("srcElement",eventSrcElement)}function windowEvent(){return windowEventConstructor()}function eventSrcElement(){return this.target}function windowEventConstructor(){if(document.all){return window.event}var b=windowEventConstructor.caller;while(b!=null){var c=b.arguments[0];if(c){var a=c.constructor;if(a.toString().indexOf("Event")!=-1){return c}}b=b.caller}return null}if(window.addEventListener){FirefoxEvent()}String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"")};function showLogonWindow(c){var a=document.getElementById("LayerLogon");a.style.position="absolute";a.style.display="block";var b=c;var g=c.clientHeight;var d=c.offsetWidth-c.clientWidth;while(b.offsetParent){g+=b.offsetTop;d+=b.offsetLeft;b=b.offsetParent}a.style.top=(g-100)+"px";if(document.all){a.style.left=(d-140)+"px"}else{a.style.left=(d-140)+"px"}}function hiddenLogonWindow(){var a=document.getElementById("LayerLogon");a.style.display="none"}function clearChangeTabPage(){window.clearTimeout(window.iTimeoutID)}function SetCookie(b,j){var c=new Date();var k=window.location.host;var l=/ifund.jrj.com.cn|ifund.jrj.com/;k=l.exec(k);var i=SetCookie.arguments;var g=SetCookie.arguments.length;var d=(g>2)?i[2]:null;var m=(g>3)?i[3]:null;var h=(g>4)?k:null;var a=(g>5)?i[5]:false;if(d!=null&&d>=0){c.setTime(c.getTime()+7*24*60*60*1000)}document.cookie=b+"="+escape(j)+((d==null||d<0)?((d==-1)?"; expires=-1":""):("; expires="+c.toGMTString()))+((m==null)?"":("; path="+m))+((h==null)?"":("; domain="+h))+((a==true)?"; secure":"")}function GetCookie(a){var b=a+"=";if(document.cookie.length>0){offset=document.cookie.indexOf(b);if(offset!=-1){offset+=b.length;end=document.cookie.indexOf(";",offset);if(end==-1){end=document.cookie.length}return unescape(document.cookie.substring(offset,end))}else{return""}}}function ClearCookie(){try{SetCookie("UserName","",-1,"/",true,false);SetCookie("UserID","",-1,"/",true,false);SetCookie("Ticket","",-1,"/",true,false)}catch(a){}}function delalert(){return confirm("\u662f\u5426\u9690\u85cf\uff1f")}function SetBgColor(c){var b=GetCookie("IstockViewBgColor");var d=document.getElementById("replyContainer");var a=document.getElementById("replyContainer2");if(c.toUpperCase()=="INIT"){d.style.backgroundColor=(b=="")?"#FFFFFF":b;a.style.backgroundColor=(b=="")?"#FFFFFF":b}else{if(c==b){d.style.backgroundColor=b;reply2Container.style.backgroundColor=b}else{d.style.backgroundColor=c;a.style.backgroundColor=c;SetCookie("IstockViewBgColor",c)}}}function SetFontSize(a){var b=document.getElementById("replayContent");b.style.fontSize=a}function setHomePage(b){if(window.netscape){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");var a=Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);a.setCharPref("browser.startup.homepage",b)}catch(c){alert("\u8bf7\u5728\u6d4f\u89c8\u5668\u5730\u5740\u680f\u8f93\u5165\u201cabout:config\u201d\u5e76\u56de\u8f66\n\u7136\u540e\u5c06[signed.applets.codebase_principal_support]\u8bbe\u7f6e\u4e3a'true'\u3002")}}else{document.body.style.behavior="url(#default#homepage)";document.body.setHomePage(b)}}function addfavorite(a,b){if(document.all){window.external.addFavorite(a,b)}else{if(window.sidebar){window.sidebar.addPanel(b,a,"")}}}function copyLink(){var a=location.href;copyToClipboard(a);alert("\u8be5\u6587\u7ae0\u5730\u5740\u5df2\u590d\u5236\u5230\u7c98\u5e16\u677f\u4e2d\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7QQ,MSN\u63a8\u8350\u7ed9\u597d\u53cb")}function copyToClipboard(b){if(window.clipboardData){window.clipboardData.clearData();window.clipboardData.setData("Text",b)}else{if(navigator.userAgent.indexOf("Opera")!=-1){window.location=b}else{if(window.netscape){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")}catch(h){alert("\u4f60\u4f7f\u7528\u7684FF\u6d4f\u89c8\u5668,\u590d\u5236\u529f\u80fd\u88ab\u6d4f\u89c8\u5668\u62d2\u7edd\uff01\n\u8bf7\u5728\u6d4f\u89c8\u5668\u5730\u5740\u680f\u8f93\u5165'about:config'\u5e76\u56de\u8f66\n\u7136\u540e\u5c06'signed.applets.codebase_principal_support'\u8bbe\u7f6e\u4e3a'true'")}var d=Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard);if(!d){return}var c=Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);if(!c){return}c.addDataFlavor("text/unicode");var i=new Object();var a=new Object();var i=Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);var j=b;i.data=j;c.setTransferData("text/unicode",i,j.length*2);var g=Components.interfaces.nsIClipboard;if(!d){return false}d.setData(c,null,g.kGlobalClipboard)}}}}function winopen(b,a,d,i,c,g){window.open(b,i,"height="+d+",width="+a+",status=no,toolbar=no,menubar=no,location=no,scrollbars="+c+",resizable="+g)}function intval(a){a=parseInt(a);return isNaN(a)?0:a}function getPos(i){var b=0;var c=0;var a=intval(i.style.width);var d=intval(i.style.height);var g=i.offsetWidth;var j=i.offsetHeight;while(i.offsetParent){b+=i.offsetLeft+(i.currentStyle?intval(i.currentStyle.borderLeftWidth):0);c+=i.offsetTop+(i.currentStyle?intval(i.currentStyle.borderTopWidth):0);i=i.offsetParent}b+=i.offsetLeft+(i.currentStyle?intval(i.currentStyle.borderLeftWidth):0);c+=i.offsetTop+(i.currentStyle?intval(i.currentStyle.borderTopWidth):0);return{x:b,y:c,w:a,h:d,wb:g,hb:j}}function getScroll(){var c,b,a,d;if(document.documentElement&&document.documentElement.scrollTop){c=document.documentElement.scrollTop;b=document.documentElement.scrollLeft;a=document.documentElement.scrollWidth;d=document.documentElement.scrollHeight}else{if(document.body){c=document.body.scrollTop;b=document.body.scrollLeft;a=document.body.scrollWidth;d=document.body.scrollHeight}}return{t:c,l:b,w:a,h:d}}function scroller(a,c){if(typeof a!="object"){a=document.getElementById(a)}if(!a){return}var d=this;d.el=a;d.p=getPos(a);d.s=getScroll();d.clear=function(){window.clearInterval(d.timer);d.timer=null};d.t=(new Date).getTime();d.step=function(){var g=(new Date).getTime();var h=(g-d.t)/c;if(g>=c+d.t){d.clear();window.setTimeout(function(){d.scroll(d.p.y,d.p.x)},13)}else{st=((-Math.cos(h*Math.PI)/2)+0.5)*(d.p.y-d.s.t)+d.s.t;sl=((-Math.cos(h*Math.PI)/2)+0.5)*(d.p.x-d.s.l)+d.s.l;d.scroll(st,sl)}};d.scroll=function(h,g){window.scrollTo(g,h)};d.timer=window.setInterval(function(){d.step()},13);var b=document.getElementById("Title");if(b&&b.type.toLowerCase()!="hidden"){b.focus()}}function objscroller(a,d,h){if(typeof a!="object"){a=document.getElementById(a)}if(!a){return}var g=this;g.el=a;g.p=getPos(a);g.s=getScroll();g.clear=function(){window.clearInterval(g.timer);g.timer=null};g.t=(new Date).getTime();g.step=function(){var i=(new Date).getTime();var j=(i-g.t)/d;if(i>=d+g.t){g.clear();window.setTimeout(function(){g.scroll(g.p.y,g.p.x)},13)}else{st=((-Math.cos(j*Math.PI)/2)+0.5)*(g.p.y-g.s.t)+g.s.t;sl=((-Math.cos(j*Math.PI)/2)+0.5)*(g.p.x-g.s.l)+g.s.l;g.scroll(st,sl)}};g.scroll=function(j,i){window.scrollTo(i,j)};g.timer=window.setInterval(function(){g.step()},13);var b=document.getElementById(h);if(b){try{b.focus()}catch(c){}}}function scrollerpost(a,b){if(typeof a!="object"){a=document.getElementById(a)}if(!a){return}var c=this;c.el=a;c.p=getPos(a);c.s=getScroll();c.clear=function(){window.clearInterval(c.timer);c.timer=null};c.t=(new Date).getTime();c.step=function(){var g=(new Date).getTime();var h=(g-c.t)/b;if(g>=b+c.t){c.clear();window.setTimeout(function(){c.scroll(c.p.y,c.p.x)},13)}else{st=((-Math.cos(h*Math.PI)/2)+0.5)*(c.p.y-c.s.t)+c.s.t;sl=((-Math.cos(h*Math.PI)/2)+0.5)*(c.p.x-c.s.l)+c.s.l;c.scroll(st,sl)}};c.scroll=function(h,g){window.scrollTo(g,h)};c.timer=window.setInterval(function(){c.step()},13);if(document.all){var d=frames.oblog_Composition}else{var d=document.getElementById("oblog_Composition").contentWindow}d.document.body.focus()}function returnpage(){var g=document.getElementById("pagevalue");var d=g.value;if(isNaN(parseInt(d))){return false}if(parseInt(d)<1){return false}if(parseInt(d)>g.getAttribute("total")){return false}var c=/(_\d*)/ig;var a=g.getAttribute("preUrl");var b=a.replace(c,"_"+parseInt(d));window.location.href=b}function checkUserProperty(b,c){var h=GetCookie("UserName");var a=GetCookie("UserID");var d=GetCookie("Ticket");if(h.trim()==""||a.trim()==""||d.trim()==""){alert("\u62b1\u6b49\uff0c\u60a8\u8fd8\u672a\u767b\u5f55\uff01");var g=document.getElementsByName("property");g[0].checked=true;return false}if(b>c){alert("\u5bf9\u4e0d\u8d77\uff0c\u60a8\u7684\u79ef\u5206\u4e0d\u8db3\uff0c\u65e0\u6cd5\u4f7f\u7528\u6b64\u9053\u5177\u3002");var g=document.getElementsByName("property");g[0].checked=true;return false}}function isToPayTopic(g,d,c){if(d.trim()==c.trim()){return true}return confirm("\u8be5\u64cd\u4f5c\u5c06\u6263\u9664"+g+"\u79ef\u5206\uff0c\u786e\u5b9a\u5417?")}var _9time=new Date().setHours(9,0,0);var _11time=new Date().setHours(11,0,0);var _13time=new Date().setHours(13,0,0);var _15time=new Date().setHours(15,0,0);var ctime;function ShowImg(a,b){window.open("http://quote.jrj.com.cn/htmdata/gifindex.asp?code="+a+"&market="+b,"","height=270,width=434,status=no,toolbar=no,menubar=no,location=no,resizable=no","replace")}function showNextLastTopic(c,b){var a="/nextlasttopic.jspa?topicid="+b+"&forumid="+c;AjaxRequest.get({url:a,onSuccess:function(d){showNextLastTopicResponse(d)}})}function showNextLastTopicResponse(a){var b=a.responseText;document.getElementById("nextlast").innerHTML=b}function setReturnUrl(){SetCookie("JRJ.IFUND.RETURNURL",window.location.href,-2,"/",true,false)}function ShowStockData(g,q){var l=document.getElementById("marketvalue_1"),k=document.getElementById("marketvalue_2"),j=document.getElementById("marketvalue_3"),m;if(q==0){m=fund_close_latest}else{if(q==3){m=fund_currency_latest}else{m=fund_open_latest}}for(var h in m){if(m[h][0]==g){var s=m[h][3],r=m[h][4],p=m[h][5],o=m[h][6],n;if(q==3){s=m[h][2];r=m[h][3];p=".";o=m[h][4];e=m[h][9];f=m[h][10];dd=m[h][11]}if(q==0){s=m[h][3];r=m[h][4];p=m[h][5];o=m[h][7]}n=(r==undefined?"desc":(r>0?"up":"down"));l.className=n;k.className="pr "+n;if(q==0){l.innerHTML=(s==undefined?"\u672a\u516c\u5e03":s);k.innerHTML=(r==undefined?"\u672a\u516c\u5e03":r)+(p==undefined?"(\u672a\u516c\u5e03)":"(%)");j.innerHTML=(o==undefined?"\u672a\u516c\u5e03":""+(o.toString()).substr(6,7)+"\u65e5\u51c0\u503c")}else{if(q==3){l.innerHTML=(s==undefined?(e==undefined?"\u672a\u516c\u5e03":(e*10).round(3)+"(\u5143)"):(s*10).round(3)+"(\u5143)");k.innerHTML=(r==undefined?"":r)+(p==undefined?"(\u672a\u516c\u5e03)":"(%)");j.innerHTML=" "+(o==undefined?"\u672a\u516c\u5e03":""+(o.toString()).substr(6,7)+"\u65e5\u51c0\u503c")}else{l.innerHTML=(s==undefined?"\u672a\u516c\u5e03":s);k.innerHTML=(p==undefined?"(\u672a\u516c\u5e03":"("+p+"%,")+(r==undefined?"\u672a\u516c\u5e03":r)+")";j.innerHTML=(o==undefined?"\u672a\u516c\u5e03":""+(o.toString()).substr(6,7)+"\u65e5\u51c0\u503c\uff1a")}}return false}}}function focusTitle(){scrollerpost("addtopic",50);document.getElementById("Title").focus()}function bodyLoad(){var a=document.getElementById("forum_type");var b=document.getElementById("forum_id");AjaxRequest.get({url:"http://"+b.value+".ifund.jrj.com.cn/topicpop.jspa?forumtype="+a.value+"&forumid="+b.value,onSuccess:function(c){pop(c)}})}Number.prototype.round=function(a){a=Math.pow(10,a||0);return Math.round(this*a)/a};function loadScript(d,b,c){var a=document.createElement("script");a.setAttribute("language","javascript");if(c){a.setAttribute("charset",c)}a.setAttribute("src",d);document.body.insertBefore(a,document.body.firstChild);if(document.all){a.onreadystatechange=function(){if(this.readyState==4||this.readyState=="complete"||this.readyState=="loaded"){if(b){b()}a.onreadystatechange=null;document.body.removeChild(a)}}}else{a.onload=function(){if(b){b()}a.onreadystatechange=null;document.body.removeChild(a)}}};

