function isIE(){var A=navigator.appName;if(A.indexOf("Microsoft")!=-1){return true}return false}var IsIE=isIE();var showPopupWindowFlag=false;var popupWindowFlag=false;var popupObj=$("popupwindow");function popupWindowWidth(){var A=$("popupwindow");myoffset=25;A.style.top=(parseInt(document.documentElement.scrollTop,10)+(document.documentElement.clientHeight-A.offsetHeight)-myoffset)+"px";A.style.left=parseInt((document.documentElement.clientWidth-A.offsetWidth-40),10)+"px";if($("popupwindow").style.display!="block"){if(showPopupWindowFlag==true){$("popupwindow").style.display="block"}}if($("showfunddiv").className!="show"){$("showfunddiv").className="show"}}function popupWindow(B,C){popupObj=$("popupwindow");if(popupObj!=null){popupObj.parentNode.removeChild(popupObj)}showPopupWindowFlag=true;var A=document.createElement("ul");document.body.appendChild(A);A.className="popupwindow";A.id="popupwindow";A.innerHTML='<div style="color:#fff;font-size:14px;background:#2097CA;border:1px solid #FFF;" id="showall"><img border="0" style="margin-right:0;cursor:pointer;float:right;" align="absmiddle" onclick="closeWindow();" title="关闭" src="http://i.66fund.com/i/images/closeWindow.gif" /><span id="productTitle">您要比较的基金</span></div><div id="showfunddiv" style="color:#ff0000;font-size:14px;background:#F3FCFE;border:1px solid #FFF;"><ol id="fundList"></ol></div><div><span style="text-align:center;display:block;"><a href="javascript:compare_fund(this)" ><img src="http://i.66fund.com/i/images/fundCompare.jpg" /></a></span></div>';setInterval("popupWindowWidth()",100)}function setCompare(A,B){if(this.IsIE&&document.readyState!="complete"){setTimeout(setCompare,1000,A,fundName);return }var D=document.getElementById("check"+A);var C=D.checked;if(!popupWindowFlag){popupWindow(A,B);popupWindowFlag=true;addOrDel(A,B,C)}else{if(!showPopupWindowFlag){popupWindow.style.display="block"}addOrDel(A,B,C)}}function addOrDel(B,D,E){var G=$("fundList").childNodes;if(E){if(G.length>=5){alert("您最多选择5支基金进行比较");var F=document.getElementById("check"+B);F.checked=false;return }var A=document.createElement("li");A.style.color="#FF6600";$("fundList").insertBefore(A,$("fundList").firstChild);A.id=B;A.innerHTML="<img border='0' style='margin-right:5px;width:10px;height:10px;cursor:pointer;' onclick='delSelectFund(this)' title='删除此行' src='http://i.66fund.com/i/images/closeFund.jpg' />&nbsp;"+D}else{for(var C=0;C<G.length;C++){if(G[C].id==B){G[C].parentNode.removeChild(G[C]);return }}}}function addfund(B,C){var A=document.createElement("li");A.style.color="#FF6600";$("fundList").appendChild(A);A.id=B;A.innerHTML="<img border='0' style='margin-right:5px;width:10px;height:10px;cursor:pointer;' onclick='delSelectFund(this)' title='删除此行' src='http://i.66fund.com/i/images/close.jpg' />&nbsp;"+C}function closeWindow(){showPopupWindowFlag=false;popupWindow=$("popupwindow");popupWindow.style.display="none";objs=$("fundList").childNodes;var B;if(objs.length>0){B=$("fundList")}for(var A=0;A<objs.length;A++){var C=objs[A].id;$("check"+C).checked=false;B.removeChild(objs[A]);A--}}function delSelectFund(B){var A=B.parentNode;A.parentNode.removeChild(A);var C=A.id;$("check"+C).checked=false}function compare_fund(C){var A=[];objs=$("fundList").childNodes;if(objs.length<1){alert("请在列表中选择您要比较的基金。");return }for(var B=0;B<objs.length;B++){A.push(objs[B].id)}var D=A.join(";");window.location.href="http://i.66fund.com/fund/chart/growthDay!fundcompare.uu?param1="+D};