/*========================================
  无限股票插件
  Web:http://www.czie.com   */
  var ExHome="无限股票"/*请务删除版权
==========================================
var cmenuOffX=15*/
var cmenuOffY=20
var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
var ns4=document.layers
var ns6=document.getElementById&&!document.all
var DOM2=document.getElementById
var i_mescolor=0
var i_messages=0
var messages=new Array()
var mescolor=new Array()
function Announcement()
{
	if (DOM2)
	if (i_messages>=messages.length)
	i_messages=0
	if (DOM2)
	{
		document.getElementById("Announc").style.color="rgb(255,255,255)"
		document.getElementById("Announc").innerHTML="<a id='NewsExid' href=Exsm_Plus_News.asp?action=glance>"+messages[i_messages]+"</a>"
		ExColor()
	}
	else if (ie4)
		document.all.Announc.innerHTML="<a id='NewsExid' href=Exsm_Plus_News.asp?action=glance>"+messages[i_messages]+"</a>"
	else if (ns4)
	{
		document.fscrollerns.document.AnnouncNs.document.write("<a id='NewsExid' href=Exsm_Plus_News.asp?action=glance>"+messages[i_messages]+"</a>")
	}
	i_messages++
	setTimeout("Announcement()",6000)
}
frame=10;
hex=255
function ExColor()
{
	if(frame>0)
	{	
		hex-=12;
		document.getElementById("Announc").style.color="rgb("+hex+","+hex+","+hex+")";
		if(document.getElementById("NewsExid"))
		{
			document.getElementById("NewsExid").style.color="rgb("+hex+","+hex+","+hex+")";
		}
		frame--;
		setTimeout("ExColor()",20);	
	}
	else
	{
		document.getElementById("Announc").style.color=mescolor[i_mescolor];
		if(document.getElementById("NewsExid"))
		{
			document.getElementById("NewsExid").style.color=mescolor[i_mescolor];
			if (i_mescolor>=messages.length-1)
			{
				i_mescolor=0
			}
			else
			{
				i_mescolor++
			}
		}
	frame=10;
	hex=255
	}
}
function Gp_Time()
{
Stamp=new Date();
var Hours;
var Mins;
var seconds;
var Time;
var date;
var month;
var year;
date=Stamp.getDate();
month=Stamp.getMonth()+1 ;
year=Stamp.getYear();
seconds=Stamp.getSeconds();
Hours=Stamp.getHours();
	if (Hours>=12)
	{
		Time=" P.M.";
	}
	else
	{
		Time=" A.M.";
	}
	if (Hours>12)
	{
		Hours-=12;
	}
	if (Hours==0)
	{
		Hours=12;
	}
	Mins=Stamp.getMinutes();
	if (Mins<10)
	{
		Mins="0"+Mins;
	}
	document.getElementById("TimeCzIe").innerHTML='<font color=#333399>' + year + "年" + month + "月" + date + "日&nbsp;" + Hours + ":" + Mins + ":" + seconds + Time + '</font>'
	setTimeout("Gp_Time()",1000)
}
function cziemenu(ce,cvmenu,cmod,cmenuOffX)
{
	which=cvmenu
	cmenuobj=document.getElementById("cpopmenu")
	cmenuobj.thestyle=cmenuobj.style
	cmenuobj.innerHTML=which
	cmenuobj.contentwidth=cmenuobj.offsetWidth
	eventX=ce.clientX
	eventY=ce.clientY
	var rightedge=document.body.clientWidth-eventX
	var bottomedge=document.body.clientHeight-eventY
		if (rightedge<cmenuobj.contentwidth)
			cmenuobj.thestyle.left=document.body.scrollLeft+eventX-cmenuobj.contentwidth+cmenuOffX
		else
			cmenuobj.thestyle.left=ie4? cie_x(event.srcElement)+cmenuOffX : ns6? window.pageXOffset+eventX : eventX
		
		if (bottomedge<cmenuobj.contentheight&&cmod!=0)
			cmenuobj.thestyle.top=document.body.scrollTop+eventY-cmenuobj.contentheight-event.offsetY+cmenuOffY-23
		else
			cmenuobj.thestyle.top=ie4? cie_y(event.srcElement)+cmenuOffY : ns6? window.pageYOffset+eventY+10 : eventY
	cmenuobj.thestyle.visibility="visible"
}
function cie_y(ce)
{
	var t=ce.offsetTop;
	while(ce=ce.offsetParent)
	{
		t+=ce.offsetTop;
	}
	return t;
}
function cie_x(ce)
{
	var cl=ce.offsetLeft;
	while(ce=ce.offsetParent)
	{
		cl+=ce.offsetLeft;
	}
	return cl;
}
function chighlightmenu(ce,cstate)
{
	if (document.all)
		csource_el=event.srcElement
		while(csource_el.id!="cpopmenu")
	{
		csource_el=document.getElementById? csource_el.parentNode : csource_el.parentElement
		if (csource_el.className=="menuitems")
		{
			csource_el.id=(cstate=="on")? "mouseoverstyle" : ""
		}
	}
}
function chidemenu()
{
	if (window.cmenuobj)cmenuobj.thestyle.visibility="hidden"
}
function cdynamichide(ce)
{
	if ((ie4||ns6)&&!cmenuobj.contains(ce.toElement))chidemenu()
}
document.onclick=chidemenu
document.write("<div class=menuskin id=cpopmenu style='filter: Alpha(Opacity=75);' onmouseover=chighlightmenu(event,'on') onmouseout=chighlightmenu(event,'off');cdynamichide(event)></div>")
function submitonce(theform)
{
	if (document.all||document.getElementById)
	{
		for (i=0;i<theform.length;i++)
		{
		var tempobj=theform.elements[i]
		if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
			tempobj.disabled=true
		}
	}
}
function ContentFilter(Content)
{
	allValid=false;
	for (i=0;  i<Content.length; i++)
	{
		for (j=0; j<Filter.length; j++)
		{
			if (Content.charAt(i)==Filter.charAt(j))
			{
				allValid=true;
				break;
			}
		}
		if (Content.charAt(i)=="")
		{
			allValid=true;
			break;
		}
	}
	return allValid;
}
function Compute(MyBeg,Mantissa)
{
	if (Mantissa==0)
		return parseFloat(Math.round(MyBeg));
	else
	{
		var cutNumber=Math.pow(10,Mantissa);
		return parseFloat(Math.round(MyBeg*cutNumber)/cutNumber);
	}
}
function Formatnumber(ex)
{
	//if(/[^0-9\.]/.test(ex)) return "no";
	var negative="";
	var num=new RegExp("-","")
	if (ex.search(num)>=0)
	{
		ex=ex.replace("-","");
		negative="-";
	}
	ex=ex.replace(/^(\d*)$/,"$1.");
	ex=(ex+"00").replace(/(\d*\.\d\d)\d*/,"$1");
	ex=ex.replace(".",",");
	var exre=/(\d)(\d{3},)/;
	while(exre.test(ex))
	ex=ex.replace(exre,"$1,$2");
	ex=ex.replace(/,(\d\d)$/,".$1");
	return negative+ex.replace(/^\./,"0.");
}
function ExReload()
{
	if (!document.images)
		return
	if (WinReload==1)
	{
		window.location.reload()
	}
	else
	{
		WinReload-=1
		setTimeout("ExReload()",1000)
	}
}
function DispPageNum(CurPage,PageCount,URLPrefix,URLPostfix,urltarget)
{
	var Tmpstr=''
	if (PageCount==0)
	{
		Tmpstr+='无';
	}
	else
	{
		if (CurPage==1)
		{
			Tmpstr+='<font face=webdings color="#A5C300">9</font> ';
		}
		else
		{
			Tmpstr+='<a href="'+URLPrefix+'1'+URLPostfix+'" target="'+urltarget+'" title="首页"><font face=webdings>9</font></a> ';
		}
		var p;
		if ((CurPage-1)%10==0) 
		{
			p=(CurPage-1) /10
		}
		else
		{
			p=(((CurPage-1)-(CurPage-1)%10)/10)
		}
		if (p*10>0) {Tmpstr+='<a href="'+URLPrefix+(p*10)+URLPostfix+'" target="'+urltarget+'" title="上十页"><font face=webdings>7</font></a> ';}
		Tmpstr+='<b>';
		for (var ii=p*10+1;ii<p*10+11;ii++)
		{
			if (ii==CurPage)
			{
				Tmpstr+='<b><font color="#A5C300">'+ii+'</font></b> ';
			}
			else
			{
				Tmpstr+='<a href="'+URLPrefix+(ii)+URLPostfix+'" target="'+urltarget+'">'+ii+'</a> ';
			}
			if (ii==PageCount) break;
		}
		if (ii>p*10+10) {ii=ii-1}
			Tmpstr+='</b>';
		if (ii<PageCount) {Tmpstr+='<a href="'+URLPrefix+(ii+1)+URLPostfix+'" target="'+urltarget+'" title="下十页"><font face=webdings>8</font></a>';}
		if (CurPage==PageCount)
		{
			Tmpstr+='<font face=webdings color="#A5C300">:</font>';
		}
		else
		{
			Tmpstr+='<a href="'+URLPrefix+(PageCount)+URLPostfix+'" target="'+urltarget+'" title="尾页"><font face=webdings>:</font></a>';
		}
	}
	return(Tmpstr)
}