側邊加入迷你水族箱

忘了是從何處知悉這個水族箱的網站了,今天改寫了一下程式,依進入首頁時的秒數來顯示不同的水族
箱,總共有十種不同的水族箱或魚群。雖然改寫了程式,但仍保留原有的連結,應該是沒有侵犯到該網站的智慧財產權吧 :-) Xuite的自由欄位怪怪的,若有興趣則請至http://blog.yam.com/emisjerry看範例。

程式在後,請將全形的小於換成半形的小於後,加入自由/插入欄位。

<script>

var d = new Date();

var s = d.getSeconds();

var aFishes = ["mini_neon","mini_neon2","mini_neon3","mini_neon4",

"mini_platinum","mini_discus","mini_discus2",

"mini_clown","mini_clown2","mini_clown3"];

var iType= s %
(aFishes.length);

thefile=aFishes[iType];

document.write(thefile);

if (typeof(ma_BackgroundColor) =="undefined") ma_BackgroundColor =
"#444444″;

if (typeof(ma_FishNum) =="undefined") ma_FishNum = "2″;

var plugin = (navigator.mimeTypes &&
navigator.mimeTypes["application/x-director"]) ?
navigator.mimeTypes["application/x-director"].enabledPlugin : 0;

if( plugin ){

var words
= navigator.plugins["Shockwave for Director"].description.split(" ");

for (var
i = 0; i < words.length; ++i)

{

if
(isNaN(parseInt(words[i])))

continue;

var
swPluginVersion =parseFloat(words[i]);

}

var swCanPlay = swPluginVersion
>= 8.5;

} else if (navigator.userAgent &&
navigator.userAgent.indexOf("MSIE")>=0 &&
(navigator.userAgent.indexOf("Windows 95″)>=0 ||
navigator.userAgent.indexOf("Windows 98″)>=0 ||
navigator.userAgent.indexOf("Windows NT")>=0 )) {

var tVersionString = "";

document.write(‘<SCRIPT
LANGUAGE=VBScript> n’);

document.write(‘on error resume next
n’);

document.write(‘set tSWControl =
CreateObject("SWCtl.SWCtl") n’);

document.write(‘if IsObject(tSWControl)
then n’);

document.write(‘tVersionString =
tSWControl.ShockwaveVersion("") n’);

document.write(‘end if’);

document.write(‘</SCRIPT> n’);

if (tVersionString != "") {

tVersionIndex = tVersionString.indexOf(".")

var
tMajorVersionString = tVersionString.substring(tVersionIndex-2,
tVersionIndex);

var
tMinorVersionString = tVersionString.substring(tVersionIndex+1,
tVersionIndex+2);

if
(parseInt(tMajorVersionString) > 8) {

swCanPlay
= 1;

}else if
(parseInt(tMajorVersionString) == 8) {

if (tMinorVersion > 0) {

if
(parseInt(tMinorVersionString) >= 5) {

swCanPlay
= 1;

}

} else {

swCanPlay
= 1;

}

}

}

}

if(swCanPlay){

document.write(‘<object
classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000″‘);

document.write(‘
codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,0,0″‘);

document.write(‘ ID=miniaqua width=140 height=130><param
name=src value="http://m-aqua.com/’+thefile+’.dcr">’);

document.write("<param name=swRemote value="swSaveEnabled=’false’
swVolume=’false’ swRestart=’false’ swPausePlay=’false’
swFastForward=’false’ swContextMenu=’true’ ">");

document.write(‘<param name=swStretchStyle value=meet><PARAM
NAME=bgColor VALUE=’+ma_BackgroundColor+’><PARAM NAME=sw1
VALUE=’+ma_BackgroundColor+’><PARAM NAME=sw2
VALUE=’+ma_FishNum+’>');

document.write(‘<PARAM NAME=logo VALUE=FALSE><PARAM
NAME=swStretchHAlign VALUE=Center><PARAM NAME=swStretchVAlign
VALUE=Center>’);

document.write("<embed src="http://m-aqua.com/"+thefile+".dcr"
bgColor="+ma_BackgroundColor+" sw1="+ma_BackgroundColor+"
sw2="+ma_FishNum+" logo=FALSE swStretchHAlign=Center
swStretchVAlign=Center width=140 height=130
swRemote="swSaveEnabled=’false’ swVolume=’false’ swRestart=’false’
swPausePlay=’false’ swFastForward=’false’ swContextMenu=’true’ "
swStretchStyle=meet type="application/x-director"
pluginspage="http://www.macromedia.com/shockwave/download/">
</embed></object>");

}else{

document.write(‘<img src="http://m-aqua.com/img/noplugin4.gif" alt=""
width="140″ height="130″ border="0″ usemap="#miniaquaMap3″>’);

document.write(‘<map name="miniaquaMap3″><area shape="rect"
coords="7,86,127,101″
href="http://www.macromedia.com/jp/shockwave/download/index.cgi?Lang=Japanese&P1_Prod_Version=Shockwave"
target="_blank">’);

document.write(‘<area shape="rect" coords="52,42,114,58″
href="http://m-aqua.com/miniaqua.html" target="_blank"><area
shape="rect" coords="0,102,140,130″
href="http://www.accesstrade.net/at/c.html?rk=01000w7n000y1z"
target="_blank"></map>’);

}

</script>

##

您可能也會有興趣的類似文章

3 則留言 »側邊加入迷你水族箱

填寫回應

 

 

 

您可使用這些HTML標籤

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

隨機文章

  1. 如何初步分析Blog變慢的原因? 
  2. 網路升級光世代50M/3M與設定ZyXEL P874 (15)
  3. SoftCAT: 登錄軟體紀錄的軟體 
  4. [Windows] 用mklink與junction建立資料夾連結 (6)
  5. [iReport] 兩個文字元件:Static Text與Text Field 
  6. 自製WordPress-mu 2.7的繁體中文語言檔[修訂] (10)
  7. 超值的iPad分頁式瀏覽器:Mercury Browser (3)
  8. [轉貼e天下] Blog風潮 企業愛恨交加 (1)
  9. [Sites] 歐展嘉老師的線上教學與台北縣電腦軟體教學網 
  10. DBDesigner 4: Open source的資料庫建模工具 (2)

歷史熱門文章

  1. 如何手動輸入Plurk的表情圖示? (368,200 點擊/2008-09-29)
  2. 啟用&關閉中華電信ZyXEL P874的無線網路連線功能的步驟[修訂] (119,941 點擊/2011-06-01)
  3. Plurk CSS樣式自訂修改全攻略 (89,381 點擊/2009-07-04)
  4. 簡單放大Plurk輸入區的方法[修訂] (88,863 點擊/2008-09-29)
  5. 網路升級光世代50M/3M與設定ZyXEL P874 (71,871 點擊/2011-05-28)
  6. 輕鬆學會彈指神功-揭露AutoHotkey絕技 (50,786 點擊/2008-04-10)
  7. iPad新手入門技巧 (49,251 點擊/2011-02-05)
  8. iPad鍵盤輸入全攻略 (42,710 點擊/2011-01-01)
  9. 分享世博台灣館主題曲『台灣的心跳聲』MV(附歌詞+下載連結+新歌詞) (40,865 點擊/2010-04-27)
  10. 調整Windows 7環境: 加回工作列的「顯示桌面」圖示 (40,744 點擊/2010-01-02)