﻿document.write("<script language='javascript' src='/PublicControls/Js/ShowWindow.js'></script>");
function openNews(newsid)
{
	newsfile="/CompanysWeb/NewsFile.aspx?ID="+newsid;	
	OpenWindowNO(newsfile,'News',400,300);
	
}

function openDownLoad(downid,Att)
{
	downfile="/CompanysWeb/DownLoadTextFile.aspx?ID="+downid+"&Att="+Att;
	OpenWindowNO(downfile,'DownLoad',400,300);
}

function login(CnorEn)
{
	if(CnorEn=="1")
	{
		location.href="/CN/TradeCenter/UserLogin.aspx?"+location.href;
	}else{
		location.href="/EN/TradeCenter/UserLogin.aspx?"+location.href;
	}
}

	//-----------------------------------------------------------状态条
	try
	{
		var sty=0;
		var msg=StatusName.innerHTML;
		var interval=120;
		var seq=0;
		if(msg!=null)
		{
			if(msg.indexOf(":",0)>=0)
			{
				msga=msg.split(":");
				sty=msga[0];
				msg=msga[1];
			}
			
			if (sty=="0"){
				Scroll1(msg);}
			if (sty=="1"){
				Scroll2(msg);}
			if (sty=="2"){
				Scroll3(100,msg);}
		}

		//需要显示的状态条信息
		//--****状态栏固定信息
		function Scroll1(msg) {
			window.status = msg;
		} 

		function Scroll2(msg) { 
			len = msg.length;
			window.status = msg.substring(0, seq+1);
			seq++;
			if ( seq >= len ) { 
			seq = 0; 
			window.status = '';
			window.setTimeout("Scroll2(msg);", interval);
			}
			else
			window.setTimeout("Scroll2(msg);", interval);
		} 

		//--****文字从右到左移动
		function Scroll3(seed,msg)
		{ 
			var out = " "; 
			var c = 1; 
			var speed  = 120;
			var timerTwo;
			if (seed > 100)
			{  seed-=2;
				var cmd="Scroll3(" + seed + ",'"+msg+"')";   
				timerTwo=window.setTimeout(cmd,speed);    
			} else if (seed <= 100 && seed > 0)
				{   
					for (c=0 ; c < seed ; c++)
						{       out+=" ";}   
					out+=msg; 
					seed-=2;      
					var cmd="Scroll3(" + seed + ",'"+msg+"')";       
					window.status=out;         
					timerTwo=window.setTimeout(cmd,speed);         
				}else if (seed <= 0) 
				{
					if (-seed < msg.length) 
					{      out+=msg.substring(-seed,msg.length);        
							seed-=2;                   ;
							var cmd="Scroll3(" + seed + ",'"+msg+"')";       
							window.status=out;                     
							timerTwo=window.setTimeout(cmd,speed);
					}else {
	          			seed=100;
							var cmd="Scroll3(" + seed + ",'"+msg+"')";     
							timerTwo=window.setTimeout(cmd,speed);
							}
				}
		}
	}catch(e){}
	//-----------------------------------------------------------状态条结束	