function stock120_submit(){var e=/^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;var d=/^([0][^0]\d{1,2}[\-]{0,1}){0,1}[1-9]\d{6,7}$/;var c=TrimWhiteSpace(document.getElementById("quote120_phone1").value);var h=TrimWhiteSpace(document.getElementById("quote120_phone2").value);var i=/^\d{6}$/;if(c==""||c.length<5||!i.test(c)){alert("请正确输入股票代码。");document.getElementById("quote120_phone1").focus();return false}if(h==""||h.length<8){alert("请正确输入您的联系电话号码。如：13888888888或者021-88888888");document.getElementById("quote120_phone2").focus();return false}if(!((e.test(h))||(d.test(h)))){alert("请正确输入您的联系电话号码。如：13888888888或者021-88888888");document.getElementById("quote120_phone2").focus();return false}var f="quote="+c+"&mobile="+h;var a="http://info.stockstar.com/svideo/sendUserIndex.ashx";document.domain="stockstar.com";document.getElementById("iframeProxy").contentWindow.upGgzd(a,f);return false}function post_ac(){alert("提交成功。")}function post_fa(){alert("提交失败。")}function AddFavorite(c,a){try{window.external.addFavorite(c,a)}catch(d){try{window.sidebar.addPanel(a,c,"")}catch(d){alert("加入收藏失败，请使用Ctrl+D进行添加")}}}function SetHome(d,f){try{d.style.behavior="url(#default#homepage)";d.setHomePage(f)}catch(c){if(window.netscape){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")}catch(c){alert("此操作被浏览器拒绝！请在浏览器地址栏输入“about:config”并回车然后将[signed.applets.codebase_principal_support]设置为'true'")}var a=Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);a.setCharPref("browser.startup.homepage",f)}}}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}}}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 getURLTimeStamp(){var c=new Date();var e=c.getHours();var a=c.getMinutes();var d=c.getSeconds();if(e<=9){e="0"+e}if(a<=9){a="0"+a}if(d<=9){d="0"+d}return e+""+a+""+d}function getPageList(){var a='<form onSubmit="checkCommentPage();return false;" target="_self" id="pagefrm" name="pagefrm"><ul><li class="lis1"><div class="searchinput2" onclick="checkCommentPage();"></div></li><li class="lis1">页</li><li><input name="pagenum" type="text" id="pagenum" value="'+pagenum+'" size="3"/></li><li class="lis1">共<b>'+total+"</b>条记录 ";a+='<a target="_self" href="javascript:void(\'0\')" onclick="goPage('+firstpage+')">第一页</a>';a+='<a target="_self" href="javascript:void(\'0\')" onclick="goPage('+(pagenum>1?pagenum-1:pagenum)+')">上一页</a> ';a+='<a target="_self" href="javascript:void(\'0\')" onclick="goPage('+(pagenum>=pagecount?pagecount:pagenum+1)+')">下一页</a> ';a+='<a target="_self" href="javascript:void(\'0\')" onclick="goPage('+pagecount+')">最后一页</a> 共<b>'+pagecount+"</b>页 到第</li></ul></form>";document.getElementById("pagelist").innerHTML=a}function getSortTag(a){var c;switch(orderby){case"desc":c='<span class="gray_sort" onclick="sortField(\''+a+'\',1)"></span><span class="desc_sort" onclick="sortField(\''+a+"',2)\"></span>";break;case"asc":c='<span class="up_sort" onclick="sortField(\''+a+'\',1)"></span><span class="down_sort" onclick="sortField(\''+a+"',2)\"></span>";break}document.getElementById("el_"+a).innerHTML=c;setSortColumnColor(a,max)}function setSortColumnColor(d,c){for(var a=0;a<=c;a++){if(document.getElementById("el_"+d+"_"+a)){document.getElementById("el_"+d+"_"+a).style.backgroundColor="#f0f8ff"}}}function goPage(a){pagenum=a;skip=(a-1)*pagesize;reGetData()}function sortField(c,a){sort=c;pagenum=1;skip=0;pagesize=30;switch(parseInt(a)){case 1:orderby="asc";break;case 2:orderby="desc";break}reGetData()}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 checkCommentPage(){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(pagecount)){window.alert("请输入查询页数,最多为"+pagecount+"页！");document.getElementById("pagenum").focus();return false}else{goPage(document.getElementById("pagenum").value)}}}return false}function getURLTimeStamp(){var c=new Date();var e=c.getHours();var a=c.getMinutes();var d=c.getSeconds();if(e<=9){e="0"+e}if(a<=9){a="0"+a}if(d<=9){d="0"+d}return e+""+a+""+d}function setCookie(a,d){var c=365;var e=new Date();e.setTime(e.getTime()+c*24*60*60*1000);document.cookie=a+"="+escape(d)+";expires="+e.toGMTString()+";path=/;domain=.stockstar.com"}function getCookie(c){var a=document.cookie.match(new RegExp("(^| )"+c+"=([^;]*)(;|$)"));if(a!=null){return unescape(a[2])}return null}function changeGlobalColor(a){setCookie("globalquotecolor",a);setColor();setTopColor()}function setColor(){var e=getCookie("globalquotecolor");var h=document.getElementById("tblglobalquote");var d,a;if(e!=null&&TrimWhiteSpace(e)=="cn"){if(document.getElementById("cn_pattern")){document.getElementById("cn_pattern").checked="checked"}for(var f=1;f<h.rows.length;f++){d=h.rows[f];for(var c=0;c<h.rows[f].cells.length;c++){if(d.cells[2]){if(parseFloat(d.cells[2].innerText)>0){d.cells[1].className="red_color";d.cells[2].className="red_color";d.cells[3].className="red_color"}else{if(parseFloat(d.cells[2].innerText)<0){d.cells[1].className="green_color";d.cells[2].className="green_color";d.cells[3].className="green_color"}else{d.cells[1].className="";d.cells[2].className="";d.cells[3].className=""}}break}}}}else{if(document.getElementById("us_pattern")){document.getElementById("us_pattern").checked="checked"}for(var f=1;f<h.rows.length;f++){d=h.rows[f];for(var c=0;c<h.rows[f].cells.length;c++){if(d.cells[2]){if(parseFloat(d.cells[2].innerText)>0){d.cells[1].className="green_color";d.cells[2].className="green_color";d.cells[3].className="green_color"}else{if(parseFloat(d.cells[2].innerText)<0){d.cells[1].className="red_color";d.cells[2].className="red_color";d.cells[3].className="red_color"}else{d.cells[1].className="";d.cells[2].className="";d.cells[3].className=""}}break}}}}}if(/firefox/.test(navigator.userAgent.toLowerCase())){HTMLElement.prototype.__defineGetter__("innerText",function(){return this.textContent});HTMLElement.prototype.__defineSetter__("innerText",function(a){this.textContent=a})}function setTopColor(){var c=getCookie("globalquotecolor");if(c!=null&&TrimWhiteSpace(c)=="cn"){var a=document.getElementById("sta_topquote").getElementsByTagName("span");for(var d=8;d<a.length;d++){if(a[d].className=="q2 green_color"){a[d].className="q2 red_color"}else{if(a[d].className=="q2 red_color"){a[d].className="q2 green_color"}}}}else{var a=document.getElementById("sta_topquote").getElementsByTagName("span");for(var d=8;d<a.length;d++){if(a[d].className=="q2 red_color"){a[d].className="q2 green_color"}else{if(a[d].className=="q2 green_color"){a[d].className="q2 red_color"}}}}}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}}}};
