<!--#include file="conn.asp"-->
<link href="../image/css.css" rel="stylesheet" type="text/css">
<SCRIPT language=JAVAscript>
    <!--
	// 有待改进要用控制标签元素那种最好直接加内容就可以不用对应ID
    // ------ 定义全局变量
    var theNewsNum;
    var theAddNum;
    var totalNum;
    var CurrentPosion=0;
    var theCurrentNews;
    var theCurrentLength;
    var theNewsText;
    var theTargetLink;
    var theCharacterTimeout;
    var theNewsTimeout;
    var theBrowserVersion;
    var theWidgetOne;
    var theWidgetTwo;
    var theSpaceFiller;
    var theLeadString;
    var theNewsState;
    function startTicker()
    {
        // ------ 设置初始数值
        theCharacterTimeout = 50;//字符间隔时间
        theNewsTimeout      = 2000;//新闻间隔时间
        theWidgetOne        =  "_";//新闻前面下标符1
        theWidgetTwo        =  "-";//新闻前面下标符
        theNewsState        = 1;
        //theNewsNum        = document.body.children.incoming.children.NewsNum.innerText;//新闻总条数
        //add by lin
		var agt = navigator.userAgent.toLowerCase();
		var is_op = (agt.indexOf("opera") != -1);
		var is_ie = (agt.indexOf("msie") != -1) && document.all && !is_op;
		var is_ie5 = (agt.indexOf("msie 5") != -1) && document.all && !is_op;
		if (is_ie || is_ie5)
		{
			theNewsNum          = document.getElementById("AllNews").childNodes.length;//新闻总条数
			theAddNum           = document.getElementById("AddNews").childNodes.length;//补充条数	
		}else{

			theNewsNum          = (document.getElementById("AllNews").childNodes.length-1)/2;//新闻总条数
			theAddNum           = (document.getElementById("AddNews").childNodes.length-1)/2//补充条数
		}
        totalNum            = theNewsNum+theAddNum;
        theCurrentNews      = 0;
        theCurrentLength    = 0;
        theLeadString       = " ";
        theSpaceFiller      = " ";
        runTheTicker();
    }
    // --- 基础函数
    function runTheTicker()
    {
        if(theNewsState == 1)
        {
            if(CurrentPosion<theNewsNum)
            {
                setupNextNews();
            } else
            {
                setupAddNews();
            }
            CurrentPosion++;
            if(CurrentPosion>=totalNum||CurrentPosion>=5) CurrentPosion=0;  //最多条数不超过5条
        }
        if(theCurrentLength != theNewsText.length)
        {
            drawNews();
        } else
        {
            closeOutNews();
        }
    }
    // --- 跳转下一条新闻
    function setupNextNews()
    {
        theNewsState = 0;
        theCurrentNews = theCurrentNews % theNewsNum ;
        theNewsText = document.getElementById("Summary"+theCurrentNews).innerHTML;
        theTargetLink = document.getElementById("NewsLink"+theCurrentNews).innerHTML;          
        theCurrentLength = 0;
        document.getElementById("hottext").href = theTargetLink;
        theCurrentNews++;
    }
    
    function setupAddNews()
    {
        theNewsState = 0;
        theCurrentNews = theCurrentNews % theAddNum;     
        theNewsText = document.getElementById("AddSummary"+theCurrentNews).innerHTML;
        theTargetLink = document.getElementById("AddNewsLink"+theCurrentNews).innerHTML;           
        theCurrentLength = 0;
        document.getElementById("hottext").href = theTargetLink;
        theCurrentNews++;
    }
    
    // --- 滚动新闻
    function drawNews()
    {
        var myWidget;       
        if((theCurrentLength % 2) == 1)
        {
            myWidget = theWidgetOne;
        } else
        {
            myWidget = theWidgetTwo;
        }
        document.getElementById("hottext").innerHTML = theLeadString + theNewsText.substring(0,theCurrentLength) + myWidget + theSpaceFiller;
        theCurrentLength++;
        setTimeout("runTheTicker()", theCharacterTimeout);
    }
    
    // --- 结束新闻循环
    function closeOutNews()
    {
        document.getElementById("hottext").innerHTML = theLeadString + theNewsText + theSpaceFiller;
        theNewsState = 1;
        setTimeout("runTheTicker()", theNewsTimeout);
    }      
    window.onload = startTicker;        
    //-->
	</SCRIPT>

<META content="MSHTML 6.00.2800.1528" name=GENERATOR></HEAD>
<BODY bgcolor="#FFB71D">
<TABLE>
  <TBODY>
  <TR>
    <TD>
<DIV id=visible><A id=hottext href="" target=_blank></A></DIV></TD></TR></TBODY></TABLE>
<!--SPM_滚动:start-->
<DIV id=incoming style="DISPLAY: none">
<DIV id=AllNews>
<DIV id=0>
<DIV id=Summary0>欢迎进入本站</DIV>
<DIV id=NewsLink0> </DIV></DIV>
<DIV id=1>
<DIV id=Summary1>本站产品报价时时更新</DIV>
<DIV id=NewsLink1></DIV></DIV>
<DIV id=2>
<DIV id=Summary2>欢迎电话联系及网上定货</DIV>
<DIV id=NewsLink2> </DIV></DIV>
<DIV id=3>
<DIV id=Summary3>市内四区网上定购的产品</DIV>
<DIV id=NewsLink3> </DIV></DIV>
<DIV id=4>
<DIV id=Summary4>经过电话核实将在4小时内送到</DIV>
<DIV id=NewsLink4> </DIV></DIV>
<DIV id=5>
<DIV id=Summary5>并且拥有会员积分和礼品</DIV>
<DIV id=NewsLink5></DIV></DIV>
<DIV id=6>
<DIV id=Summary6>会员积分可以用于平台购物和对换奖品</DIV>
<DIV id=NewsLink6></DIV></DIV></DIV>
<DIV id=AddNews>
<DIV id=0>
<DIV id=AddSummary0>本公司秉承良好的信誉服务于客户</DIV>
<DIV id=AddNewsLink0></DIV></DIV></DIV></DIV><!--SPM_滚动:end--></BODY>