var OldRowBgColor;var NewRowBgColor="#f0f8ff";var MarkRowBgColor="#fff3da";function ChangeRowBg(c,d){var a=d||window.event;if(a.type=="mouseover"){OldRowBgColor=c.style.backgroundColor;c.style.backgroundColor=NewRowBgColor}else{if(a.type=="mouseout"){c.style.backgroundColor=OldRowBgColor}else{if(a.type=="mousedown"){if(rgbToHex(c.style.backgroundColor)!=MarkRowBgColor){c.style.backgroundColor=MarkRowBgColor;c.onmouseout=function(){return false};c.onmouseover=function(){return false}}else{if(c.className=="td3"){c.style.backgroundColor="#FFFFFF"}else{if(c.className=="td4"){c.style.backgroundColor="#FAFAFA"}}c.onmouseover=function(){c.style.backgroundColor="#f0f8ff"};c.onmouseout=function(){if(c.className=="td3"){c.style.backgroundColor="#FFFFFF"}else{if(c.className=="td4"){c.style.backgroundColor="#FAFAFA"}}}}}}}}function rgbToHex(a){if(a.indexOf("rgb")!=-1){a=a.replace("rgb(","");a=a.replace(")","");a=a.split(",");r=parseInt(a[0]);g=parseInt(a[1]);b=parseInt(a[2]);r=r.toString(16);if(r.length==1){r="0"+r}g=g.toString(16);if(g.length==1){g="0"+g}b=b.toString(16);if(b.length==1){b="0"+b}return("#"+r+g+b).toLowerCase()}else{return a}}function TrimWhiteSpace(a){a=a.replace(/(^\s*)|(\s*$)/g,"");return a}function IsNumber(d){var c=/^\d+$/;var a=new RegExp(c);if(!a.test(d)){return false}return true}function checkPage(a,d){if(TrimWhiteSpace(document.getElementById("pagenum").value)==""){window.alert("请输入查询页数！");document.getElementById("pagenum").focus();return false}else{if(IsNumber(TrimWhiteSpace(document.getElementById("pagenum").value))==false){window.alert("请输入查询页数,必须为数字！");document.getElementById("pagenum").value="";document.getElementById("pagenum").focus();return false}else{if(parseInt(TrimWhiteSpace(document.getElementById("pagenum").value))>parseInt(a)){window.alert("请输入查询页数,最多为"+a+"页！");document.getElementById("pagenum").focus();return false}else{var c=document.getElementById("pagefrm").action;c+="?pagenum="+TrimWhiteSpace(document.getElementById("pagenum").value);c+=d;document.getElementById("pagefrm").action=c;document.getElementById("pagefrm").submit();return true}}}}function serachrank61(){var d=document.getElementById("reporttype").value;var c=document.getElementById("col").value;var e=c.split("_");var a=e[1];e=e[0];if(window.location.href.indexOf("external_rank_list")==-1){document.getElementById("frmrank61").target="_blank"}else{document.getElementById("frmrank61").target="_self"}document.getElementById("frmrank61").action="external_rank_list.aspx?reporttype="+d+"&col="+a+"&part="+e;document.getElementById("frmrank61").submit()}function serachrank61index(){var d=document.getElementById("reporttype").value;var c=document.getElementById("col").value;var e=c.split("_");var a=e[1];e=e[0];if(window.location.href.indexOf("rankinfo")==-1){document.getElementById("frmrank61").target="_blank"}else{document.getElementById("frmrank61").target="_self"}document.getElementById("frmrank61").action="rank/rankinfo.aspx?reporttype="+d+"&col="+a+"&type="+e;document.getElementById("frmrank61").submit()}function searchBlockPerformance(){document.getElementById("frmblockperformance").target="_blank";document.getElementById("frmblockperformance").action="/stock/blockperformance.aspx?groupid="+document.getElementById("stockgrouplist").value;document.getElementById("frmblockperformance").submit()}function isIE(){if(window.navigator.userAgent.indexOf("MSIE")>=1){return true}else{return false}}if(!isIE()){HTMLElement.prototype.__defineGetter__("innerText",function(){return this.textContent});HTMLElement.prototype.__defineSetter__("innerText",function(a){this.textContent=a})}function layer_show(c,a){if(a=="show"){document.getElementById(c).style.display=""}else{if(a=="hide"){document.getElementById(c).style.display="none"}}}function changeGlobalQuoteColor(a){document.domain="stockstar.com";document.getElementById("console").src="http://www.stockstar.com/setglobalcolor.ashx?colortype="+a+"&d="+new Date().getTime()}function getCookie(c){var a=document.cookie.match(new RegExp("(^| )"+c+"=([^;]*)(;|$)"));if(a!=null){return unescape(a[2])}return null}function setGlobalColor(e){var c=getCookie("globalquotecolor");if(c!=null&&TrimWhiteSpace(c)=="cn"){var a=document.getElementById(e).getElementsByTagName("span");for(var d=0;d<a.length;d++){if(a[d].className=="font_color_green"){a[d].className="font_color_red"}else{if(a[d].className=="font_color_red"){a[d].className="font_color_green"}}}}};
function displayObj(thisobj,flag)
{
    if(parseInt(flag)==0)
        document.getElementById(thisobj).style.display = "block";
    else
        document.getElementById(thisobj).style.display = "none";    
}
