posts - 431,  comments - 344,  trackbacks - 0

          <style type="text/css">
          <!--
          body
          {
           margin-left: 0px;
           margin-top: 0px;
           margin-right: 0px;
           margin-bottom: 0px;
           background-image: url(images/bg_page.gif);
          }
          -->
          </style>
          <link href="Style_all.css" rel="stylesheet" type="text/css" />
          <script type='text/javascript' src='/dwr/interface/DWRIndex.js'></script>
          <script type='text/javascript' src='/dwr/engine.js'></script>
          <script type='text/javascript' src='/dwr/util.js'></script>

          <STYLE type="text/css">
                #imgTitle
                {
                 FILTER: ALPHA(opacity=70); LEFT: 0px; OVERFLOW: hidden; POSITION: relative; TEXT-ALIGN: left
                }

                #imgTitle_up
                {
                 LEFT: 0px; HEIGHT: 1px; TEXT-ALIGN: left
                }
                #imgTitle_down
                {
                 LEFT: 0px; TEXT-ALIGN: right
                }
                  
                .imgClass
                {
                 BORDER-RIGHT: gray 1px solid; BORDER-TOP: gray 1px solid; BORDER-LEFT: gray 1px solid; BORDER-BOTTOM: gray 0px solid
                }
                #txtFrom
                {
                 VERTICAL-ALIGN: middle; TEXT-ALIGN: center
                }
                .button
                {
                 PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: #7b7b63; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: bold 9px sans-serif; BORDER-LEFT: #fff 1px solid; PADDING-TOP: 0px; TEXT-DECORATION: none;width:20;
                }
                A.button
                {
                 COLOR: #ffffff; FONT-FAMILY: sans-serif; BACKGROUND-COLOR: #000000; TEXT-DECORATION: none
                }
                A.button:link
                {
                 COLOR: #ffffff; FONT-FAMILY: sans-serif; BACKGROUND-COLOR: #000000; TEXT-DECORATION: none
                }
                A.button:visited
                {
                 COLOR: #ffffff; FONT-FAMILY: sans-serif; BACKGROUND-COLOR: #000000; TEXT-DECORATION: none
                }
                A.button:hover
                {
                 BACKGROUND: #fff; COLOR: #fff; FONT-FAMILY: sans-serif; TEXT-DECORATION: none
                }
                .buttonDiv
                {
                 BACKGROUND: #000000; FLOAT: left; VERTICAL-ALIGN: middle; WIDTH: 21px; HEIGHT: 1px; TEXT-ALIGN: center
                }
                .trans
                {
                 FILTER: progid:DXImageTransform.Microsoft.Alpha(startX=0, startY=0, finishX=100, finishY=100,style=1,opacity=0,finishOpacity=40); WIDTH: 90px; BACKGROUND-COLOR: #000
                }
                </STYLE>

               <SCRIPT language="javascript" type="text/javascript">
               var imgWidth=199;              //圖片寬
               var imgHeight=139;             //圖片高
               var textFromHeight=0;         //焦點字框高度 (單位為px)
               var textStyle="f12";           //焦點字class style (不是連接class)
               var textLinkStyle="p1"; //焦點字連接class style
               var buttonLineOn="#f60";           //button下劃線on的顏色
               var buttonLineOff="#000";          //button下劃線off的顏色
               var TimeOut=5000;              //每張圖切換時間 (單位毫秒);
               var imgUrl=new Array();
               var imgLink=new Array();
               var imgtext=new Array();
               var imgAlt=new Array();
                              var adNum=0;
                                     
                             
                              var topcount=5;
                              var ItemID=430;
                             
                              function rebackAlt(){
                             
                              }
                              function setAlt(data){
                    
                                 for(var i=1;i<=topcount;i++){
                                  imgAlt[i]=data[i-1];
                                 }
                              }
                              function setTitle(data){
                                 for(var i=1;i<=topcount;i++){
                                  imgtext[i]=data[i-1];
                                 }
                                
                              }
               function setLink(data){
                 
                  for(var i=1;i<=topcount;i++){
                                  imgLink[i]=data[i-1];
                                 }
               }
               function setbContent(data){
                 
                  for(var i=1;i<=topcount;i++){
                                  imgUrl[i]=data[i-1];
                                 }
               }
               
               //焦點字框高度樣式表 開始
               document.write('<style type="text/css">');
               document.write('#focuseFrom{width:'+(imgWidth+2)+';margin: 0px; padding:0px;height:'+(imgHeight+textFromHeight)+'px; overflow:hidden;}');
               document.write('#txtFrom{height:'+textFromHeight+'px;line-height:'+textFromHeight+'px;width:'+imgWidth+'px;overflow:hidden;}');
               document.write('#imgTitle{width:'+imgWidth+';top:-'+(textFromHeight+26)+'px;height:18px}');

               document.write('</style>');
               document.write('<div id="focuseFrom">');
               //焦點字框高度樣式表 結束
               
                  DWRIndex.getPicNewsAlt(ItemID,topcount,setAlt);
                 
                                 DWRIndex.getPicNewsTitle(ItemID,topcount,setTitle);
                                
                                 DWRIndex.getPicNewsLink(ItemID,topcount,setLink);
                                
                                 DWRIndex.getPicNewsbimgUrl(ItemID,topcount,setbContent);

               function changeimg(n)
               {
                adNum=n;
                window.clearInterval(theTimer);
                adNum=adNum-1;
                nextAd();
               }
               function goUrl(){
                
                 window.open(imgLink[adNum],'_blank');
               }
               //NetScape開始
               if (navigator.appName == "Netscape")
               {
               document.write('<style type="text/css">');
               document.write('.buttonDiv{height:4px;width:21px;}');
               document.write('</style>');
               function nextAd(){
                                 
                if(adNum<(imgUrl.length-1)){
                adNum++;
                }
                else {
                adNum=1;
                }
                if (imgUrl[adNum]==null){
                                   adNum--;
                                   document.images.imgInit.src="images/load.gif";
                                   document.images.imgInit.alt="正在加載..."
                                   setTimeout("nextAd()", 0);
                                   return;
                                  } 
                theTimer=setTimeout("nextAd()", TimeOut);
                document.images.imgInit.src=imgUrl[adNum];
                
                document.images.imgInit.alt=imgAlt[adNum]; 
                document.getElementById('focustext').innerHTML=imgtext[adNum];
                document.getElementById('imgLink').href=imgLink[adNum];
                                  document.getElementById("imgtext").innerHTML=imgtext[adNum];//////////////////
               }
                document.write('<a id="imgLink" href="'+imgLink[1]+'" target=_blank class="p1"><img src="'+imgUrl[1]+'" name="imgInit" width='+imgWidth+' height='+imgHeight+' border=1 alt="'+imgAlt[1]+'" class="imgClass"></a><div id="txtFrom"><span id="focustext" class="'+textStyle+'">'+imgtext[1]+'</span></div>')
                document.write('<div id="imgTitle">');
                document.write('<div id="imgTitle_down">');
               //數字按鈕代碼開始
               for(var i=1;i<imgUrl.length;i++){document.write('<a href="javascript:changeimg('+i+')" class="button" style="cursor:hand" title="'+imgAlt[i]+'">'+i+'</a>');}
               //數字按鈕代碼結束
                document.write('</div>');
                document.write('</div>');
                document.write('</div>');
                nextAd();
               }
               //NetScape結束
               //IE開始
               else
               {
              
               function playTran(){
                if (document.all)
                    imgInit.filters.revealTrans.play(); 
           
               }
               var key=0;
               function nextAd(){

                //alert(adNum+"-----"+key);
                
                if(adNum<topcount){
                  adNum++ ;
                 
                }
                else {
                  adNum=1;
                 
                }
                                  if (imgUrl[adNum]==null){
                                   adNum--;
                                   document.images.imgInit.src="images/load.gif";
                                   document.images.imgInit.alt="正在加載..."
                                   setTimeout("nextAd()", 0);
                                   return;
                                  }      
                if( key==0 ){
                 key=1;
                } else if (document.all){
                 imgInit.filters.revealTrans.Transition=23;
                 imgInit.filters.revealTrans.apply();
                      playTran();
                }
                
                //alert(adNum);
                //alert(imgAlt[adNum]);
                document.images.imgInit.src=imgUrl[adNum];
                document.images.imgInit.alt=imgAlt[adNum]; 
                document.getElementById('link'+adNum).style.background=buttonLineOn;
                for (var i=1;i<=topcount;i++)
                {
                   if (i!=adNum){document.getElementById('link'+i).style.background=buttonLineOff;}
                } 
                focustext.innerHTML=imgtext[adNum];
                theTimer=setTimeout("nextAd()", TimeOut);
                                  document.getElementById("imgtext").innerHTML=imgtext[adNum];//////////////////
               }
               document.write('<a target=_self href="javascript:goUrl()"><img style="FILTER: revealTrans(duration=1,transition=5);" src="javascript:nextAd()" width='+imgWidth+' height='+imgHeight+' border=0 vspace="0" name=imgInit class="imgClass"></a>');
               document.write('<div id="txtFrom"><span id="focustext" class="'+textStyle+'"></span></div>');
               document.write('<div id="imgTitle">');
               document.write(' <div id="imgTitle_down"> <a class="trans"></a>');
               //數字按鈕代碼開始
               for(var i=1;i<topcount+1;i++)
                {
                document.write('<a id="link'+i+'"  href="javascript:changeimg('+i+')" class="button" style="cursor:hand" title="'+imgAlt[i]+'" onFocus="this.blur()">'+i+'</a>');
                                 
                }
               //數字按鈕代碼結束
           
               document.write('</div>');
               document.write('</div>');
               document.write('</div>');
                              document.write("<div id='imgtext'></div>");//////////////////
               
               }
               //IE結束---
               </SCRIPT> 

          posted on 2006-10-17 14:29 周銳 閱讀(209) 評論(0)  編輯  收藏 所屬分類: Ajax
          主站蜘蛛池模板: 南投市| 林口县| 师宗县| 汝阳县| 安丘市| 沁水县| 东港市| 西青区| 浦东新区| 威信县| 报价| 满洲里市| 葫芦岛市| 舟山市| 布拖县| 兴海县| 南溪县| 鱼台县| 东明县| 寿宁县| 广宗县| 汉阴县| 隆回县| 阿拉善盟| 荥经县| 东阿县| 晋城| 安宁市| 鞍山市| 八宿县| 上蔡县| 大城县| 从化市| 藁城市| 嵊州市| 宁远县| 新乡县| 全州县| 稻城县| 镇安县| 镇原县|