﻿var marqueeContent=new Array();

marqueeContent[0]='<img src="http://www.richman.com.tw/uploads/smil48901e8f48a56.gif" align="absmiddle"> <a href="http://www.richman.com.tw/modules/smartsection/item.php?itemid=248" target="_top">中華國際專業人才網誠摯推薦您本世紀最重要的一張國際金融證照 - <a href="http://www.richman.com.tw/modules/smartsection/item.php?itemid=249" title="保險經紀人證照"><strong class="blue">保險經紀人證照</strong></a>。</a>';

marqueeContent[1]='<img src="http://www.richman.com.tw/uploads/smil48901a714f153.gif" align="absmiddle"> <a href="http://www.richman.com.tw/modules/smartsection/item.php?itemid=1" target="_top">懂得投資自己，才能在職場無往不利，擁有中國大陸國際<strong class="blue">理財規劃師證照</strong>，引領您邁向職場高峰！</a>';

marqueeContent[2]='<img src="http://www.richman.com.tw/uploads/smil48901a714f153.gif" align="absmiddle"> <a href="http://www.richman.com.tw/modules/smartsection/" target="_top">中華國際專業人才網是專業的中國大陸國際證照輔導單位，我們竭誠為您服務。</a>';

marqueeContent[3]='<img src="http://www.richman.com.tw/uploads/smil48901e8f48a56.gif" align="absmiddle"> <a href="http://www.richman.com.tw/modules/liaise/index.php?form_id=3" target="_top"><strong class="blue">證照達人</strong>免費證照咨詢服務即日起正式啟動，歡迎您有問題就發問，讓我們竭誠為您服務。</a>';

var marqueeInterval=new Array();
var marqueeId=0;
var marqueeDelay=5800;
var marqueeHeight=15;
function initMarquee() {
 var str=marqueeContent[0];
 document.write('<div id=marqueeBox style="overflow:hidden;height:'+marqueeHeight+'px" onmouseover="clearInterval(marqueeInterval[0])" onmouseout="marqueeInterval[0]=setInterval(\'startMarquee()\',marqueeDelay)"><div>'+str+'</div></div>');
 marqueeId++;
 marqueeInterval[0]=setInterval("startMarquee()",marqueeDelay);
 }
function startMarquee() {
 var str=marqueeContent[marqueeId];
  marqueeId++;
 if(marqueeId>=marqueeContent.length) marqueeId=0;
 if(marqueeBox.childNodes.length==1) {
  var nextLine=document.createElement('DIV');
  nextLine.innerHTML=str;
  marqueeBox.appendChild(nextLine);
  }
 else {
  marqueeBox.childNodes[0].innerHTML=str;
  marqueeBox.appendChild(marqueeBox.childNodes[0]);
  marqueeBox.scrollTop=0;
  }
 clearInterval(marqueeInterval[1]);
 marqueeInterval[1]=setInterval("scrollMarquee()",8);
 }
function scrollMarquee() {
 marqueeBox.scrollTop++;
 if(marqueeBox.scrollTop%marqueeHeight==marqueeHeight){
  clearInterval(marqueeInterval[1]);
  }
 }
initMarquee();