側邊加入迷你水族箱

忘了是從何處知悉這個水族箱的網站了,今天改寫了一下程式,依進入首頁時的秒數來顯示不同的水族
箱,總共有十種不同的水族箱或魚群。雖然改寫了程式,但仍保留原有的連結,應該是沒有侵犯到該網站的智慧財產權吧 :-) 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. [Java] JavaLobby發生狀況 
  2. [Vista] 使用iCACLs.exe快速變更檔案的存取權限 
  3. [FireFox] 試用FireFox 3 Beta 3 
  4. [OOo] 一篇文章裡使用數個編號系統 
  5. [轉貼Toget] 為MSN增加更多精彩的動畫快遞&圖示 
  6. 評析三款iPad RSS Google Reader工具 (1)
  7. [NetBeans] 兩個Matisse GUI的展示 
  8. [Tools] 又一個支援多種通訊協定的IM軟體:BeeNut 
  9. 強化Windows Mobile的剪貼簿功能:Clipboard Tool 1.6 
  10. 補遺:[軟體] 超強 Windows 字型美化軟體 – GDI++ (8)

歷史熱門文章

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