側邊加入迷你水族箱

忘了是從何處知悉這個水族箱的網站了,今天改寫了一下程式,依進入首頁時的秒數來顯示不同的水族
箱,總共有十種不同的水族箱或魚群。雖然改寫了程式,但仍保留原有的連結,應該是沒有侵犯到該網站的智慧財產權吧 :-) 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. 使用TiddlyWiki做為Blog的書寫工具 (1)
  2. [HTML&CSS] 鎖定左側功能選單,不隨頁面捲動 
  3. [Xuite] 讓「我的心情」圖形消失 
  4. 解決Thunderbird讀取大附件速度緩慢的方法 
  5. 運行在TS-109上的ccTiddly設定調整 (2)
  6. [Plurk] 如何顯示12個噗浪朋友圖示?(結論:別人的是12個,自己的只會顯示8個) 
  7. [轉貼電腦報] 部落格調查:男性玩家佔7成,學生及老師族群最龐大 (1)
  8. Descript.ion: 幫檔案加上註解文字 (11)
  9. [Site] 電子地圖網站 (2)
  10. [Xuite] 變更Banner樣式 (3)

歷史熱門文章

  1. 如何手動輸入Plurk的表情圖示? (353,059 點擊/2008-09-29)
  2. 簡單放大Plurk輸入區的方法[修訂] (86,924 點擊/2008-09-29)
  3. 啟用&關閉中華電信ZyXEL P874的無線網路連線功能的步驟[修訂] (83,963 點擊/2011-06-01)
  4. Plurk CSS樣式自訂修改全攻略 (83,109 點擊/2009-07-04)
  5. 網路升級光世代50M/3M與設定ZyXEL P874 (53,284 點擊/2011-05-28)
  6. 輕鬆學會彈指神功-揭露AutoHotkey絕技 (43,160 點擊/2008-04-10)
  7. iPad新手入門技巧 (40,417 點擊/2011-02-05)
  8. 分享世博台灣館主題曲『台灣的心跳聲』MV(附歌詞+下載連結+新歌詞) (38,149 點擊/2010-04-27)
  9. 把HTC Touch HD操作介面換成Spb Mobile Shell,美觀又便利! (37,954 點擊/2009-02-18)
  10. 另一套適用手機的影片轉檔工具:WinAVI 3GP/MP4/PSP/iPod Video Converter (35,920 點擊/2009-04-18)