<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title><![CDATA[史考特部落格園地 - JavaScript]]></title>
<link>http://www.pro-soho.com/Blog/</link>
<description><![CDATA[生命就該浪費在美好的事物上]]></description>
<language>zh-cn</language>
<copyright><![CDATA[Copyright 2005 PBlog2 v2.4]]></copyright>
<webMaster><![CDATA[scooter.tw@gmail.com(Scott)]]></webMaster>
<generator>PBlog2 v2.4</generator> 
<image>
	<title>史考特部落格園地</title> 
	<url>http://www.pro-soho.com/Blog/images/logos.gif</url> 
	<link>http://www.pro-soho.com/Blog/</link> 
	<description>史考特部落格園地</description> 
</image>

			<item>
			<link>http://www.pro-soho.com/Blog/default.asp?id=281</link>
			<title><![CDATA[Google 地圖API 實作範例 (教你回何將Google地圖放到網頁中.)]]></title>
			<author>scooter.tw@gmail.com(admin)</author>
			<category><![CDATA[JavaScript]]></category>
			<pubDate>Mon,14 Jul 2008 20:55:33 +0800</pubDate>
			<guid>http://www.pro-soho.com/Blog/default.asp?id=281</guid>	
		<description><![CDATA[<img src="http://www.pro-soho.com/Blog/attachments/month_0802/Map.gif" border="0" alt=""/><br/><br/>今天興致來朝玩了一下Google的Map，覺得還真的不錯，尤其開放了API之後，受益最多的應該是牽涉到旅遊、休閒..等涉及地圖服務相關網站，真的挺方便的喔！小弟就簡單的介紹一下如何利用Google所提供之 Maps API 將 Google 地圖服務內嵌到你的網頁中，並且將座標定至你所要標記的地點。<br/><br/>步驟1：先至 Google Maps 申請一組 API Key (網址：<a href="http://www.google.com/apis/maps/signup.html" target="_blank">http://www.google.com/apis/maps/signup.html</a>)<br/><br/>1. 將核取控制項打勾(I have read and agree with the terms and conditions的那個按鈕)，並將欲申請Google Maps API的網址填入(例如像本站就輸入：<a href="http://www.pro-soho.com" target="_blank">http://www.pro-soho.com</a> )。<br/><br/>2. 按 &#34;Generate API Key&#34; 取得 Key。<br/><br/>3. 最後會出現三個方塊，分別是你取得的 Key (Your key is)，你設定之URL(This key is good for all URLs in this directory:)，以及一個範例(Here is an example web page to get you started on your way to mapping glory)。<br/><br/>範例中會有如下的片段：<br/><div class="UBBPanel"><div class="UBBTitle"><img src="http://www.pro-soho.com/Blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代碼"/> 程序代碼</div><div class="UBBContent">&lt;script src=&#34;<a href="http://maps.google.com/maps?file=api" target="_blank">http://maps.google.com/maps?file=api</a>&amp;v=2&amp;key=ABQIAAAAU42K6cZiPBspSseDAjgVrxRepqq5VEHxc05H62box0rt476kmhQ0nk6V2K6RWEv9xHr3ovELZDXswA&#34;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type=&#34;text/javascript&#34;&gt;&lt;/script&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;script type=&#34;text/javascript&#34;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;//&lt;![CDATA[<br/>&nbsp;&nbsp;&nbsp;&nbsp;function load() {<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (GBrowserIsCompatible()) {<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var map = new GMap2(document.getElementById(&#34;map&#34;));<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;map.setCenter(new GLatLng(24.854726,121.232184), 13);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;//]]&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/script&gt;<br/></div></div><br/>此段中(key=ABQIAAAAU42K6cZiPBspSseDAjgVrxRepqq5VEHxc05H62box0rt476kmhQ0nk6V2K6RWEv9xHr3ovELZDXswA)<br/>等於後面的這串ABQ......swA就是你的key，整段JavaScript需放至HTML中之&lt;head&gt;&lt;/head&gt;之間。<br/><br/>步驟2：取得欲標記的地點的經緯座標值<br/><br/><br/>1. 進入 Google Maps搜尋頁面：<a href="http://maps.google.com/maps/ms?ie=UTF8" target="_blank">http://maps.google.com/maps/ms?ie=UTF8</a>&amp;hl=zh-TW&amp;msa=2<br/>2. 輸入欲標記的地點的地址或名稱，並按&#34;搜尋地圖&#34;(例如：桃園大飯店)。<br/>3. 確認搜尋結果無誤後，請按&#34;連結至此網頁&#34;，取得地圖的連結。<br/>連結如下：<br/><div class="UBBPanel"><div class="UBBTitle"><img src="http://www.pro-soho.com/Blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代碼"/> 程序代碼</div><div class="UBBContent">http://maps.google.com/maps?f=q&amp;hl=zh-TW&amp;geocode=&amp;q=%E6%A1%83%E5%9C%92%E5%A4%A7%E9%A3%AF%E5%BA%97&amp;ie=UTF8&amp;ll=24.853419,121.231384&amp;spn=0.255451,0.422974&amp;z=11</div></div><br/><br/>步驟3：將以下範例程式片段copy到&lt;body&gt;&lt;/body&gt;之間：<br/><div class="UBBPanel"><div class="UBBTitle"><img src="http://www.pro-soho.com/Blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代碼"/> 程序代碼</div><div class="UBBContent">&lt;!--Google Map 顯示的位置，可自由決定大小--&gt;<br/>&lt;div id=&#34;mymap&#34; style=&#34;width: 500px; height: 500px&#34;&gt;&lt;/div&gt;<br/><br/>&lt;!--以下為控制Google Maps的JavaScript--&gt;<br/>&lt;script type=&#34;text/javascript&#34;&gt;<br/><br/>//&lt;![CDATA[<br/>var map = new GMap(document.getElementById(&#34;mymap&#34;));<br/><br/>//設定要顯示的控制項<br/>map.addControl(new GSmallMapControl());<br/>map.addControl(new GMapTypeControl());<br/><br/>//決定你 Google 地圖的中心點位置和縮放大小<br/>map.setCenter(new GLatLng(24.853419,121.231384), 16);<br/><br/>//標記在 Google 地圖上的經緯度<br/>var point = new GLatLng(24.853419,121.231384);<br/>var marker = new GMarker(point);<br/>map.addOverlay(marker);<br/><br/>//在地圖上放置標點說明<br/>var html = &#34;桃園大飯店&#34;;<br/>map.openInfoWindowHtml (map.getCenter(), html);<br/><br/>//]]&gt;<br/>&lt;/script&gt; <br/></div></div><br/><br/>範例網址：<a target="_blank" href="http://www.pro-soho.com/Blog/GoogleMap.htm">http://www.pro-soho.com/Blog/GoogleMap.htm</a><br/><br/><br/>相關參數說明：<br/><div class="UBBPanel"><div class="UBBTitle"><img src="http://www.pro-soho.com/Blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代碼"/> 程序代碼</div><div class="UBBContent">//設定要顯示的控制項<br/>map.addControl(new GSmallMapControl());<br/>map.addControl(new GMapTypeControl<br/>()); </div></div><br/><br/>Google Maps API 內建四種控制項：<br/><br/>1. GLargeMapControl : 適合給大型地圖的控制項。<br/>2. GSmallMapControl : 適合給小型地圖的控制項。<br/>3. GSmallZoomControl : 只有 Zoom Level 的調整，沒有地圖移動控制。<br/>4. GMapTypeControl : 顯示地圖型態切換的控制項。 <br/><br/><div class="UBBPanel"><div class="UBBTitle"><img src="http://www.pro-soho.com/Blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代碼"/> 程序代碼</div><div class="UBBContent">//決定你 Google 地圖的中心點位置和縮放大小<br/>map.setCenter(new GLatLng(24.853419,121.231384), 16);</div></div><br/><br/>設定 Google 地圖的中心點位置和縮放大小：<br/><br/>1. setCenter(GLatLng(經度, 緯度), [+ 放大(近)] -&gt; [- 縮小(遠)]); <br/><div class="UBBPanel"><div class="UBBTitle"><img src="http://www.pro-soho.com/Blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代碼"/> 程序代碼</div><div class="UBBContent">//標記在 Google 地圖上的經緯度<br/>var point = new GLatLng(24.853419,121.231384);<br/>var marker = new GMarker(point);<br/>map.addOverlay(marker);<br/><br/>//在此標記所要顯示的資訊<br/>var html = &#34;桃園大飯店&#34;;<br/>map.openInfoWindowHtml (map.getCenter(), html);</div></div><br/><br/>在地圖上標記地點：<br/><br/>1. 設定座標值：<br/>var point = new GLatLng(24.853419,121.231384);<br/>var marker = new GMarker(point);<br/><br/>2. 在地圖上放置標點 :<br/>map.addOverlay(marker);<br/><br/>3. 在地圖上放置標點說明 :<br/>var html = &#34;桃園大飯店&#34;;<br/>map.openInfoWindowHtml (map.getCenter(), html ]]></description>
		</item>
		
			<item>
			<link>http://www.pro-soho.com/Blog/default.asp?id=282</link>
			<title><![CDATA[輸入框高度自動增加]]></title>
			<author>scooter.tw@gmail.com(admin)</author>
			<category><![CDATA[JavaScript]]></category>
			<pubDate>Mon,14 Jul 2008 20:39:25 +0800</pubDate>
			<guid>http://www.pro-soho.com/Blog/default.asp?id=282</guid>	
		<description><![CDATA[一個文字輸入框，若輸入內容超過寬度換行後，輸入框的高度隨之改變，增加一行高，像gtalk的輸入框一樣。<br/>想了想用css的overflow控制&lt;textarea&gt;，好像不能達到這效果。不知各位能否用js做出來？<br/><br/><br/>[html]&lt;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&#34;&gt;<br/>&lt;html xmlns=&#34;<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>&#34;&gt;<br/>&lt;head&gt;<br/>&lt;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=utf-8&#34; /&gt;<br/>&lt;title&gt;nothing is impossible&lt;/title&gt;<br/>&lt;style type=&#34;text/css&#34; media=&#34;screen&#34;&gt;<br/>* {margin:0;padding:0;}<br/>body {font-family:Arial,Helvetica,sans-serif;font-size:12px;}<br/>ul {list-style-type:none;}<br/>&lt;/style&gt;<br/>&lt;/head&gt;<br/>&lt;body&gt;<br/>&lt;textarea cols=&#34;40&#34; rows=&#34;4&#34;&gt;&lt;/textarea&gt;<br/>&lt;/body&gt;<br/>&lt;script type=&#34;text/javascript&#34;&gt;<br/>var ta=document.getElementsByTagName(&#39;textarea&#39;)[0];<br/>ta.onkeyup=function(ev) {<br/>var e=ev||window.event;<br/>if (e.keyCode==13) {<br/>var ar=ta.getAttribute(&#39;rows&#39;);<br/>ar++;<br/>ta.setAttribute(&#39;rows&#39;,ar);<br/>}<br/>}<br/>&lt;/script&gt;<br/>&lt;/html&gt;[html]]]></description>
		</item>
		
			<item>
			<link>http://www.pro-soho.com/Blog/default.asp?id=279</link>
			<title><![CDATA[解決 Flash 蓋住彈出目錄的方法]]></title>
			<author>scooter.tw@gmail.com(admin)</author>
			<category><![CDATA[JavaScript]]></category>
			<pubDate>Fri,07 Mar 2008 21:08:31 +0800</pubDate>
			<guid>http://www.pro-soho.com/Blog/default.asp?id=279</guid>	
		<description><![CDATA[無論是 CSS 下拉式目錄，或是 Javascript 製作出來的彈出式清單，一旦遇到 Flash 時，就被 Flash 遮蓋住，這個問題困擾了不少設計人員，原則上有兩種解決方法，一種是在圖層中使用 IFRAME，另一種則是改變 Flash 嵌入方式。<br/><br/>以下提供改變Flash嵌入方式的語法：<br/><div class="UBBPanel"><div class="UBBTitle"><img src="http://www.pro-soho.com/Blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代碼"/> 程序代碼</div><div class="UBBContent">&lt;script type=&#34;text/javascript&#34; src=&#34;images/swfobject.js&#34;&gt;&lt;/script&gt;<br/>&lt;div id=&#34;flashcontent&#34;&gt;無法播放 Flash 時替代的文字內容&lt;/div&gt;<br/>&lt;script type=&#34;text/javascript&#34;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp; var fo = new FlashObject(&#34;images/flash.swf&#34;, &#34;mymovie&#34;, &#34;200&#34;, &#34;200&#34;, &#34;7&#34;, &#34;#ff00ff&#34;);<br/>&nbsp;&nbsp;&nbsp;&nbsp; fo.addParam(&#34;wmode&#34;, &#34;transparent&#34;);<br/>&nbsp;&nbsp;&nbsp;&nbsp; fo.write(&#34;flashcontent&#34;);<br/>&lt;/scrip&gt;</div></div><br/><br/>步驟是先連結 swfobject.js 這個檔案，檔案的官方下載位置是：<br/><br/><a href="http://download.macromedia.com/pub/developer/swfobj&#101;ct_1.4.zip" target="_blank">http://download.macromedia.com/pub/developer/swfobj&#101;ct_1.4.zip</a><br/><br/>壓縮檔中檔案很多，是範例及說明，要用到的只有 swfobject.js一個檔案。 <br/><br/>然後宣告一個放置 flash 的區塊，這個例子的識別名稱為 flashcontent，接下來，建立 FlashObject 物件，語法是：<br/><div class="UBBPanel"><div class="UBBTitle"><img src="http://www.pro-soho.com/Blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代碼"/> 程序代碼</div><div class="UBBContent">var fo=new FlashObject(swf檔,識別元,寬度,高度,Flash版本,背景色);</div></div><br/><br/>如果需要加其他屬性，例如透明，則使用 fo.addParam 加入，語法為：<br/><div class="UBBPanel"><div class="UBBTitle"><img src="http://www.pro-soho.com/Blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代碼"/> 程序代碼</div><div class="UBBContent">fo.addParam(&#34;wmode&#34;, &#34;transparent&#34;); </div></div><br/><br/>最後，把物件寫到 flashcontent 區塊中，語法為：<br/><div class="UBBPanel"><div class="UBBTitle"><img src="http://www.pro-soho.com/Blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代碼"/> 程序代碼</div><div class="UBBContent">fo.write(&#34;flashcontent&#34;);</div></div><br/><br/>如此就完成了，原文刊載於：<br/><a href="http://www.adobe.com/devnet/flash/articles/swfobj&#101;ct.html" target="_blank">http://www.adobe.com/devnet/flash/articles/swfobj&#101;ct.html</a><br/>]]></description>
		</item>
		
			<item>
			<link>http://www.pro-soho.com/Blog/default.asp?id=275</link>
			<title><![CDATA[超酷的圖片輪換漸變效果]]></title>
			<author>scooter.tw@gmail.com(admin)</author>
			<category><![CDATA[JavaScript]]></category>
			<pubDate>Wed,20 Feb 2008 20:17:14 +0800</pubDate>
			<guid>http://www.pro-soho.com/Blog/default.asp?id=275</guid>	
		<description><![CDATA[在騰訊女性頻道上看到一個很酷的圖片漸變輪換效果·····於是乎····整理下來了···分享···<br/><div class="UBBPanel"><div class="UBBTitle"><img src="http://www.pro-soho.com/Blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代碼"/> 程序代碼</div><div class="UBBContent">&lt;style type=&#34;text/css&#34;&gt;<br/>.woon{border:1px solid #fff;}<br/>.wooff{border:1px solid #ffffff;filter:progid:DXImagetransform.Microsoft.Alpha(style=1,opacity=1500,finishOpacity=1);}<br/>&lt;/style&gt;<br/>&lt;script language=&#34;JavaScript&#34; type=&#34;text/JavaScript&#34;&gt;<br/>&lt;!--<br/>window.onerror = function(){return true}<br/>function MM_openBrWindow(theURL,winName,features) { //v2.0<br/>&nbsp;&nbsp;window.open(theURL,winName,features);<br/>}<br/>//--&gt;<br/>&lt;/script&gt;<br/>&lt;table width=252 border=0 align=center cellPadding=0 cellSpacing=0&nbsp;&nbsp;background=&#34;<a href="http://img1.qq.com/lady/pics/3931/3931550.jpg" target="_blank">http://img1.qq.com/lady/pics/3931/3931550.jpg</a>&#34;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td height=&#34;470&#34; align=&#34;center&#34;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=fc style=&#34;filter:progid:DXImagetransform.Microsoft.GradientWipe(duration=3,gradientSize=0.5,motion=forward ); WIDTH:240px; HEIGHT:454px; border:1px solid #D85C8A&#34;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div style=&#34;display:block&#34;&gt;&lt;A <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;href=&#34;<a href="http://lady.qq.com/a/20071007/000003.htm" target="_blank">http://lady.qq.com/a/20071007/000003.htm</a>&#34; target=_blank&gt;&lt;img onmouseover=clearAuto(); <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onmouseout=setAuto() height=454 <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;src=&#34;<a href="http://mat1.qq.com/lady/images/index/2007/10/07/hot1.jpg" target="_blank">http://mat1.qq.com/lady/images/index/2007/10/07/hot1.jpg</a>&#34; width=240 border=0&gt;&lt;/A&gt;&lt;/div&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div style=&#34;display: none&#34;&gt;&lt;a href=&#34;<a href="http://lady.qq.com/a/20071007/000009.htm" target="_blank">http://lady.qq.com/a/20071007/000009.htm</a>&#34; target=&#34;_blank&#34;&gt;&lt;img onmouseover=clearAuto(); <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onmouseout=setAuto() height=454 <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;src=&#34;<a href="http://mat1.qq.com/lady/images/index/2007/10/07/hot2.jpg" target="_blank">http://mat1.qq.com/lady/images/index/2007/10/07/hot2.jpg</a>&#34; width=240 border=0&gt;&lt;/a&gt;&lt;/div&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div style=&#34;display: none&#34;&gt;&lt;A href=&#34;<a href="http://lady.qq.com/a/20071007/000005.htm" target="_blank">http://lady.qq.com/a/20071007/000005.htm</a>&#34; target=_blank&gt;&lt;img onmouseover=clearAuto(); <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onmouseout=setAuto() height=454 <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;src=&#34;<a href="http://mat1.qq.com/lady/images/index/2007/10/07/hot3.jpg" target="_blank">http://mat1.qq.com/lady/images/index/2007/10/07/hot3.jpg</a>&#34; width=240 border=0&gt;&lt;/A&gt;&lt;/div&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div style=&#34;display: none&#34;&gt;&lt;a href=&#34;<a href="http://lady.qq.com/a/20071007/000006.htm" target="_blank">http://lady.qq.com/a/20071007/000006.htm</a>&#34; target=_blank&gt;&lt;img onmouseover=clearAuto(); <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onmouseout=setAuto() height=454 <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;src=&#34;<a href="http://mat1.qq.com/lady/images/index/2007/10/07/hot4.jpg" target="_blank">http://mat1.qq.com/lady/images/index/2007/10/07/hot4.jpg</a>&#34; width=240 border=0&gt;&lt;/a&gt;&lt;/div&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;&lt;/td&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/tr&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td height=99 valign=&#34;top&#34;&gt; &lt;table border=0 align=center cellPadding=0 cellSpacing=1 id=num&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td class=woon onmouseover=clearAuto();onclick=Mea(0); onmouseout=setAuto()<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&lt;img src=&#34;<a href="http://mat1.qq.com/lady/images/index/2007/10/07/hot01.jpg" target="_blank">http://mat1.qq.com/lady/images/index/2007/10/07/hot01.jpg</a>&#34; width=&#34;57&#34; height=&#34;90&#34; style=&#34;cursor: hand&#34; onDblClick=&#34;MM_openBrWindow(&#39;<a href="http://lady.qq.com/a/20071007/000003.htm" target="_blank">http://lady.qq.com/a/20071007/000003.htm</a>&#39;,&#39;&#39;,&#39;&#39;)&#34;&gt;&lt;/td&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td class=wooff onmouseover=clearAuto(); <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onclick=Mea(1); onmouseout=setAuto()<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&lt;img src=&#34;<a href="http://mat1.qq.com/lady/images/index/2007/10/07/hot02.jpg" target="_blank">http://mat1.qq.com/lady/images/index/2007/10/07/hot02.jpg</a>&#34; width=&#34;57&#34; height=&#34;90&#34; border=&#34;0&#34; style=&#34;cursor: hand&#34; onDblClick=&#34;MM_openBrWindow(&#39;<a href="http://lady.qq.com/a/20071007/000009.htm" target="_blank">http://lady.qq.com/a/20071007/000009.htm</a>&#39;,&#39;&#39;,&#39;&#39;)&#34;&gt;&lt;/td&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td class=wooff onmouseover=clearAuto(); <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onclick=Mea(2); onmouseout=setAuto() <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;&lt;img src=&#34;<a href="http://mat1.qq.com/lady/images/index/2007/10/07/hot03.jpg" target="_blank">http://mat1.qq.com/lady/images/index/2007/10/07/hot03.jpg</a>&#34; width=&#34;57&#34; height=&#34;90&#34; style=&#34;cursor: hand&#34; onDblClick=&#34;MM_openBrWindow(&#39;<a href="http://lady.qq.com/a/20071007/000005.htm" target="_blank">http://lady.qq.com/a/20071007/000005.htm</a>&#39;,&#39;&#39;,&#39;&#39;)&#34;&gt;&lt;/td&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td class=wooff onmouseover=clearAuto(); <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onclick=Mea(3); onmouseout=setAuto() <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&lt;img src=&#34;<a href="http://mat1.qq.com/lady/images/index/2007/10/07/hot04.jpg" target="_blank">http://mat1.qq.com/lady/images/index/2007/10/07/hot04.jpg</a>&#34; width=&#34;57&#34; height=&#34;90&#34; style=&#34;cursor: hand&#34; onDblClick=&#34;MM_openBrWindow(&#39;<a href="http://lady.qq.com/a/20071007/000006.htm" target="_blank">http://lady.qq.com/a/20071007/000006.htm</a>&#39;,&#39;&#39;,&#39;&#39;)&#34;&gt;&lt;/td&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/td&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/tr&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/table&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>&lt;script&gt; <br/>var n=0;<br/>var showNum = document.getElementById(&#34;num&#34;);<br/>function Mea(value){<br/>&#160;&#160;&#160;&#160;n=value;<br/>&#160;&#160;&#160;&#160;setBg(value);<br/>&#160;&#160;&#160;&#160;plays(value);<br/>&#160;&#160;&#160;&#160;}<br/>function setBg(value){<br/>&#160;&#160;&#160;&#160;for(var i=0;i&lt;4;i++)<br/>&nbsp;&nbsp; if(value==i){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;showNum.getElementsByTagName(&#34;td&#34;)[i].className=&#39;woon&#39;;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;} <br/>&#160;&#160;&#160;&#160;else{&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;showNum.getElementsByTagName(&#34;td&#34;)[i].className=&#39;wooff&#39;;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}&nbsp;&nbsp;<br/>&#160;&#160;&#160;&#160;} <br/>function plays(value){<br/>&#160;&#160;&#160;&#160;with (fc){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;filters[0].Apply();<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;for(i=0;i&lt;4;i++)i==value?children[i].style.display=&#34;block&#34;:children[i].style.display=&#34;none&#34;; <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;filters[0].play(); &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}&#160;&#160;&#160;&#160;<br/>}<br/>function clearAuto(){clearInterval(autoStart)}<br/>function setAuto(){autoStart=setInterval(&#34;auto(n)&#34;, 5000)}<br/>function auto(){<br/>&#160;&#160;&#160;&#160;n++;<br/>&#160;&#160;&#160;&#160;if(n&gt;3)n=0;<br/>&#160;&#160;&#160;&#160;Mea(n);<br/>} <br/>function sub(){<br/>&#160;&#160;&#160;&#160;n--;<br/>&#160;&#160;&#160;&#160;if(n&lt;0)n=3;<br/>&#160;&#160;&#160;&#160;Mea(n);<br/>} <br/>setAuto(); <br/>&lt;/script&gt;<br/>&lt;/body&gt;<br/>&lt;/html&gt;</div></div>]]></description>
		</item>
		
			<item>
			<link>http://www.pro-soho.com/Blog/default.asp?id=269</link>
			<title><![CDATA[MS SQL 使用 SQL 取得日期部份數值]]></title>
			<author>scooter.tw@gmail.com(admin)</author>
			<category><![CDATA[JavaScript]]></category>
			<pubDate>Sat,28 Jul 2007 14:58:49 +0800</pubDate>
			<guid>http://www.pro-soho.com/Blog/default.asp?id=269</guid>	
		<description><![CDATA[在 MS SQL 中使用 getDate() 系統函數會取到精度達微秒的時間值，<br/>所以若是只想取得只有 yyyymmdd 部分或是 yyyymmdd hh:mm:ss 部分的時間值就需要加工處理<br/>我們可以利用 Convert 型別轉換函數來處理<br/><br/>語法：CONVERT ( data_type [ ( length ) ] , expression [ , style ] )<br/><br/>sel&#101;ct GetDate()<br/>,CONVERT(datetime,CONVERT(char(10), GetDate(),111),111) as YMD<br/>,CONVERT(datetime,CONVERT(char(11), GetDate(),111) + CONVERT(char(8), GetDate(),108),111) as YMDHMS<br/><br/>其中若是 GetDate() = 2005-02-06 11:22:33.456<br/>則 YMD = 2005-02-06<br/>而 YMDHMS = 2005-02-06 11:22:33<br/><br/>另外在 MS SQL 2000 支援較多的 style 格式參數，可參考線上手冊。<br/><br/>如果在 SQL 2000 Server 環境經常使用的話，可以建立成使用者自定函數<br/><br/>Cr&#101;ate FUNCTION dbo.getDateYMD<br/>(@dt datetime )<br/>RETURNS datetime<br/>AS<br/>BEGIN<br/>RETURN ( CONVERT(datetime,CONVERT(char(10), @dt,111),111) )<br/>END<br/><br/>go<br/><br/>Cr&#101;ate FUNCTION dbo.getDateYMDHMS<br/>(@dt datetime )<br/>RETURNS datetime<br/>AS<br/>BEGIN<br/>RETURN ( CONVERT(datetime,CONVERT(char(11), @dt,111) + CONVERT(char(8), @dt,108),111) )<br/>END<br/><br/>這樣就可以用下列語法查詢<br/><br/>sel&#101;ct getDate(), dbo.getDateYMD(getDate()), dbo.getDateYMDHMS(getDate())<br/><br/>]]></description>
		</item>
		
			<item>
			<link>http://www.pro-soho.com/Blog/default.asp?id=245</link>
			<title><![CDATA[完美的WEB友善列印]]></title>
			<author>scooter.tw@gmail.com(admin)</author>
			<category><![CDATA[JavaScript]]></category>
			<pubDate>Fri,19 Jan 2007 16:48:45 +0800</pubDate>
			<guid>http://www.pro-soho.com/Blog/default.asp?id=245</guid>	
		<description><![CDATA[相信用B/S方式做過應用的人都可能會遇到這樣一個問題，如何方便、美觀地實現報表列印。如果使用瀏覽器的列印菜單列印的話，將把網頁上的一些無用的東西打到報表上，比如應用菜單等。因為選擇列印菜單列印網頁將會把網頁中的所有內容全部列印出來，如果你的應用有分幀則列印內容將包括各幀中的內容，而你實際要的內容只是其中一部分。所以有很多應用就只能把列印功能放到後台完成了。 　　針對這種情況，我們該怎麼辦？其實可以有多種方法實現網頁列印功能。<br/><br/>一種方法就是使用專業的列印工具，如Crystal Reports(水晶報表)。用過Visual Studio 5.0的朋友肯定記得這個工具，不過那時的版本只有4.幾。現在的最新版本已達9了，近幾個版本的水晶報表都支援WEB列印。最簡單的方法是先用水晶報表製作好模板，然後使用ASP帶參數呼叫製作好的模板即可。水晶報表在網頁上產生報表後，可以直接列印，也可以轉存為其它的比較通過的檔案如Excel檔案。使用水晶報表可以製作出非常漂亮的樣式，關鍵在你對水晶報表的開發能力上，但由於水晶報表價格較高，只有當項目很賺錢時才買得起。<br/><br/>第二種方法是購買第三方的網上列印控件，費用同水晶報表相比便宜，但效果性能到底如何則仁者見仁了。<br/><br/>第三種方法是利用樣式表及JavaScript自定義函數實現。通過樣式表及JavaScript，實現網頁列印，效果也還可以。在此有一個實例請大家看看。下面是列印函數實現詳解：<br/><br/><div class="UBBPanel"><div class="UBBTitle"><img src="http://www.pro-soho.com/Blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代碼"/> 程序代碼</div><div class="UBBContent">&lt;script language=&#34;JavaScript&#34; type=&#34;text/JavaScript&#34;&gt;<br/>&lt;!--<br/>function DP() {<br/>if (window.print)<br/>{ <br/>var Div1 = document.all.Div1.innerHTML; <br/>var Div2 = document.all.Div2.innerHTML;<br/>// *****************************************************<br/>// Div1、Div2即為你在列印的區域<br/>// 這裡根據你要列印的哪些內容，從原顯示頁面中用<br/>// &lt;div id=Div1&gt;Div1....&lt;/div&gt;&lt;div id=Div2&gt;Div2...&lt;/div&gt;<br/>// 等標示出來,要列印多少項目就標示多少<br/>// ***************************************************** var css = &#39;&lt;style type=&#34;text/css&#34; media=all&gt;&#39; +<br/>&#39;p { line-height: 120%}&#39; +<br/>&#39;.ftitle { line-height: 120%; font-size: 18px; color: #000000}&#39; +<br/>&#39;td { font-size: 10px; color: #000000}&#39; +<br/>&#39;&lt;/style&gt;&#39; ;<br/>// *****************************************************<br/>// 定義列印用的CSS，實現你想列印出什麼樣的格式全看你自己<br/>// 了，但要注意：如果此處有什麼同網頁中不一致的，可能列印<br/>// 出來的頁面同網頁格式、字體可能會有所不同<br/>// ***************************************************** <br/><br/>var body =&#39;&lt;table width=&#34;640&#34; border=&#34;0&#34; cellspacing=&#34;0&#34; cellpadding=&#34;5&#34;&gt;&#39; +<br/>&#39; &lt;tr&gt; &#39; +<br/>&#39; &lt;td class=&#34;fbody&#34;&gt; &#39; +<br/>&#39; &lt;div align=&#34;center&#34; class=ftitle&gt;&#39; + Div1 + &#39;&lt;/div&gt;&#39; + Div2 +<br/>&#39; &lt;/td&gt;&#39; +<br/>&#39; &lt;/tr&gt;&#39; +<br/>&#39;&lt;/table&gt;&#39;;<br/>// ******************************************************<br/>// 在此處重新設定的列印格式，根據你的列印要求，將原顯示的<br/>// 網頁的DIV內容重新群組合，可以根據你原來的表格內容，去掉<br/>// 不要列印的，你也可以能下面定義的noprint忽略掉你不想打<br/>// 印的東西，只呼叫你要列印的內容，但這樣被忽略掉的地方將<br/>// 列印出空，不是很美觀。表格寬度要同列印的紙張寬度匹配。<br/>// ****************************************************** <br/><br/>document.body.innerHTML = &#39;<br/>&#39; + css + body + &#39;<br/>&#39;;<br/>// ******************************************************<br/>// 重設document.body，列印文檔準備就緒<br/>// ****************************************************** <br/><br/>window.print();<br/>window.history.go(0);<br/>// ******************************************************<br/>// 呼叫列印命令，列印當前窗口內容。當你列印時其實是一張新<br/>// 的網頁了，但網頁檔案還是原先的。緊接著呼叫<br/>// window.history.go(0)，再回到列印前的頁面，效果相當不差<br/>// ******************************************************<br/>}<br/>}<br/>--&gt; <br/>&lt;/script&gt;<br/><br/>&lt;style&gt;<br/>@media print {<br/>.noprint {display:none}<br/>}<br/>&lt;/style&gt;<br/>&lt;!--//.noprint 定義了noprint，在以下不需要列印的地方加入 class=&#34;noprint&#34;後，用window.print()列印就會忽略--&gt;<br/><br/>好了，一切就緒了，現在要做的就是呼叫DP函數，如果你將實現呼叫的按鈕設計在同一張網頁上，則直接呼叫即可；如果你用了分幀方法，實現呼叫的按鈕是在另一張網頁上，則在DP函數的第一行加入window.focus()命令，否則列印的只是有按鈕的網頁。</div></div><br/><br/>第四種方法，實現是一種取巧的方法。一樣還是通過呼叫window.print()實現，只是將你要列印的內容專門產生一張網頁，而 列印按鈕在另一幀上。假設報表網頁在mainFrame上，按鈕在topFrame上，按鈕呼叫PrintReports()函數，PrintReports()函數如下即可實現列印工作。<br/><br/><div class="UBBPanel"><div class="UBBTitle"><img src="http://www.pro-soho.com/Blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代碼"/> 程序代碼</div><div class="UBBContent"><br/>function PrintReports() //topFrame網頁中的函數<br/>{<br/>try<br/>// *******************************************************<br/>// 錯誤處理，如果在mainFrame中的網頁沒有DP函數則不列印<br/>// *******************************************************<br/>{ <br/>window.parent.frames(&#34;mainFrame&#34;).DP();<br/>}<br/>catch(e)<br/>{<br/>alert(&#34;no object to print!&#34;);<br/>}<br/>}<br/>function DP() // mainFrame網頁中函數<br/>{<br/>window.focus();<br/>if (window.print)<br/>{<br/>window.print();<br/>}<br/>}<br/><br/><br/></div></div><br/>]]></description>
		</item>
		
			<item>
			<link>http://www.pro-soho.com/Blog/default.asp?id=237</link>
			<title><![CDATA[讓Flash載入時不需按一下就產生作用]]></title>
			<author>scooter.tw@gmail.com(admin)</author>
			<category><![CDATA[JavaScript]]></category>
			<pubDate>Mon,06 Nov 2006 22:13:03 +0800</pubDate>
			<guid>http://www.pro-soho.com/Blog/default.asp?id=237</guid>	
		<description><![CDATA[相信會在網頁建置Flash的設計者都曾經遇過一個擾人問題就是當Flash載入時如果想按Flash上面的按鈕<br/>必須先按一下Flash區塊(讓Flash產品作用)才能去點選所要的按鈕。<br/><br/>例如(以雲科大網頁為例)：<br/><img src="http://www.pro-soho.com/Blog/attachments/month_0611/o2006116214835.gif" border="0" alt=""/><br/>如果你要點選學術單位必須<strong>先按一下整個Flash</strong>，目的在讓Flash產生作用<br/><br/><img src="http://www.pro-soho.com/Blog/attachments/month_0611/n2006116215042.gif" border="0" alt=""/><br/>再把滑鼠移過去，才會出現子分類的各學院<br/><br/>這樣做或許有它的安全考量，但其實對於網頁的操作是蠻麻煩的，畢竟要讓使用者先點一下，才能正式點選所要功能，不免讓有些使用者會因為點選一下感覺無效而放棄操作，如果只是閒來逛逛那還好，如果因此遺失件大生意可就得不償失囉！<br/><br/>為了解決以上的困擾，看了一下其他有Flash先進的網站，發現可以透過 JavaScript 方式來解決<br/><br/><span style="color:Red"><strong>步驟一：將以下程式碼copy存成AC_RunActiveContent.js</strong></span><br/><br/>//Copyright 2006 Adobe Systems, Inc. All rights reserved.<br/>var requiredMajorVersion = 8;<br/>// 需要 Flash 的次要版本<br/>var requiredMinorVersion = 0;<br/>// 需要的 Flash 版本<br/>var requiredRevision = 0;<br/>// 支援的 Javascript 版本<br/>var jsVersion = 1.0;<br/><br/>function AC_AddExtension(src, ext)<br/>{<br/>&nbsp;&nbsp;if (src.indexOf(&#39;?&#39;) != -1)<br/>&nbsp;&nbsp;&nbsp;&nbsp;return src.replace(/\?/, ext+&#39;?&#39;); <br/>&nbsp;&nbsp;else<br/>&nbsp;&nbsp;&nbsp;&nbsp;return src + ext;<br/>}<br/><br/>function AC_Generateobj(objAttrs, params, embedAttrs) <br/>{ <br/>&nbsp;&nbsp;var str = &#39;&lt;object &#39;;<br/>&nbsp;&nbsp;for (var i in objAttrs)<br/>&nbsp;&nbsp;&nbsp;&nbsp;str += i + &#39;=&#34;&#39; + objAttrs[i] + &#39;&#34; &#39;;<br/>&nbsp;&nbsp;str += &#39;&gt;&#39;;<br/>&nbsp;&nbsp;for (var i in params)<br/>&nbsp;&nbsp;&nbsp;&nbsp;str += &#39;&lt;param name=&#34;&#39; + i + &#39;&#34; value=&#34;&#39; + params[i] + &#39;&#34; /&gt; &#39;;<br/>&nbsp;&nbsp;str += &#39;&lt;embed &#39;;<br/>&nbsp;&nbsp;for (var i in embedAttrs)<br/>&nbsp;&nbsp;&nbsp;&nbsp;str += i + &#39;=&#34;&#39; + embedAttrs[i] + &#39;&#34; &#39;;<br/>&nbsp;&nbsp;str += &#39; &gt;&lt;/embed&gt;&lt;/object&gt;&#39;;<br/><br/>&nbsp;&nbsp;document.write(str);<br/>}<br/><br/>function AC_FL_RunContent(){<br/>&nbsp;&nbsp;var ret = <br/>&nbsp;&nbsp;&nbsp;&nbsp;AC_GetArgs<br/>&nbsp;&nbsp;&nbsp;&nbsp;(&nbsp;&nbsp;arguments, &#34;.swf&#34;, &#34;movie&#34;, &#34;clsid:d27cdb6e-ae6d-11cf-96b8-444553540000&#34;<br/>&nbsp;&nbsp;&nbsp;&nbsp; , &#34;application/x-shockwave-flash&#34;<br/>&nbsp;&nbsp;&nbsp;&nbsp;);<br/>&nbsp;&nbsp;AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);<br/>}<br/><br/>function AC_SW_RunContent(){<br/>&nbsp;&nbsp;var ret = <br/>&nbsp;&nbsp;&nbsp;&nbsp;AC_GetArgs<br/>&nbsp;&nbsp;&nbsp;&nbsp;(&nbsp;&nbsp;arguments, &#34;.dcr&#34;, &#34;src&#34;, &#34;clsid:166B1BCA-3F9C-11CF-8075-444553540000&#34;<br/>&nbsp;&nbsp;&nbsp;&nbsp; , null<br/>&nbsp;&nbsp;&nbsp;&nbsp;);<br/>&nbsp;&nbsp;AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);<br/>}<br/><br/>function AC_GetArgs(args, ext, srcParamName, classid, mimeType){<br/>&nbsp;&nbsp;var ret = new Object();<br/>&nbsp;&nbsp;ret.embedAttrs = new Object();<br/>&nbsp;&nbsp;ret.params = new Object();<br/>&nbsp;&nbsp;ret.objAttrs = new Object();<br/>&nbsp;&nbsp;for (var i=0; i &lt; args.length; i=i+2){<br/>&nbsp;&nbsp;&nbsp;&nbsp;var currArg = args[i].toLowerCase();&nbsp;&nbsp;&nbsp;&nbsp;<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;switch (currArg){&#160;&#160;&#160;&#160;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;classid&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;pluginspage&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret.embedAttrs[args[i]] = args[i+1];<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;src&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;movie&#34;:&#160;&#160;&#160;&#160;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;args[i+1] = AC_AddExtension(args[i+1], ext);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret.embedAttrs[&#34;src&#34;] = args[i+1];<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret.params[srcParamName] = args[i+1];<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onafterup&#100;ate&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onbeforeup&#100;ate&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onblur&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;oncellchange&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onclick&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;ondblClick&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;ondrag&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;ondragend&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;ondragenter&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;ondragleave&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;ondragover&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;ondro&#112;&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onfinish&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onfocus&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onhelp&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onmousedown&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onmouseup&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onmouseover&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onmousemove&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onmouseout&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onkeypress&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onkeydown&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onkeyup&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onload&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onlosecapture&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onpropertychange&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onreadystatechange&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onrowsdel&#101;te&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onrowenter&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onrowexit&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onrowsins&#101;rted&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onstart&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onscroll&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onbeforeeditfocus&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onactivate&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;onbeforedeactivate&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;ondeactivate&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;type&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;codebase&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret.objAttrs[args[i]] = args[i+1];<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;width&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;height&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;align&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;vspace&#34;: <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;hspace&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;class&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;title&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;accesskey&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;name&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;id&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &#34;tabindex&#34;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;default:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;}<br/>&nbsp;&nbsp;ret.objAttrs[&#34;classid&#34;] = classid;<br/>&nbsp;&nbsp;if (mimeType) ret.embedAttrs[&#34;type&#34;] = mimeType;<br/>&nbsp;&nbsp;return ret;<br/>}<br/>var isIE&nbsp;&nbsp;= (navigator.appVersion.indexOf(&#34;MSIE&#34;) != -1) ? true : false;<br/>var isWin = (navigator.appVersion.toLowerCase().indexOf(&#34;win&#34;) != -1) ? true : false;<br/>var isOpera = (navigator.userAgent.indexOf(&#34;Opera&#34;) != -1) ? true : false;<br/>jsVersion = 1.1;<br/>// 需要 JavaScript 協助程式以偵測 Flash Player PlugIn 版本資訊<br/>function JSGetSwfVer(i){<br/>&#160;&#160;&#160;&#160;// NS/Opera 版本 &gt;= 3 檢查外掛程式陣列中的 Flash 外掛程式<br/>&#160;&#160;&#160;&#160;if (navigator.plugins != null &amp;&amp; navigator.plugins.length &gt; 0) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if (navigator.plugins[&#34;Shockwave Flash 2.0&#34;] || navigator.plugins[&#34;Shockwave Flash&#34;]) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;var swVer2 = navigator.plugins[&#34;Shockwave Flash 2.0&#34;] ? &#34; 2.0&#34; : &#34;&#34;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;var flashDescription = navigator.plugins[&#34;Shockwave Flash&#34; + swVer2].description;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;descArray = flashDescription.split(&#34; &#34;);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;tempArrayMajor = descArray[2].split(&#34;.&#34;);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;versionMajor = tempArrayMajor[0];<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;versionMinor = tempArrayMajor[1];<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if ( descArray[3] != &#34;&#34; ) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;tempArrayMinor = descArray[3].split(&#34;r&#34;);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;} else {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;tempArrayMinor = descArray[4].split(&#34;r&#34;);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;versionRevision = tempArrayMinor[1] &gt; 0 ? tempArrayMinor[1] : 0;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flashVer = versionMajor + &#34;.&#34; + versionMinor + &#34;.&#34; + versionRevision;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#160;&#160;&#160;&#160;} else {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;flashVer = -1;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;// MSN/WebTV 2.6 支援 Flash 4<br/>&#160;&#160;&#160;&#160;else if (navigator.userAgent.toLowerCase().indexOf(&#34;webtv/2.6&#34;) != -1) flashVer = 4;<br/>&#160;&#160;&#160;&#160;// WebTV 2.5 支援 Flash 3<br/>&#160;&#160;&#160;&#160;else if (navigator.userAgent.toLowerCase().indexOf(&#34;webtv/2.5&#34;) != -1) flashVer = 3;<br/>&#160;&#160;&#160;&#160;// 舊的 WebTV 支援 Flash 2<br/>&#160;&#160;&#160;&#160;else if (navigator.userAgent.toLowerCase().indexOf(&#34;webtv&#34;) != -1) flashVer = 2;<br/>&#160;&#160;&#160;&#160;// 在其它情況下皆無法偵測<br/>&#160;&#160;&#160;&#160;else {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;flashVer = -1;<br/>&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;return flashVer;<br/>} <br/>// 如果以沒有參數的方式呼叫，這個函數會傳回應為 Flash Player 的版本值或 0.0 的浮點值<br/>// 例如：Flash Player 7r14 會傳回 7.14<br/>// 使用 reqMajorVer、reqMinorVer 或 reqRevision 呼叫時，如果有該版本或更新的版本時，會傳回 true<br/>function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) {<br/> &#160;&#160;&#160;&#160;reqVer = parseFloat(reqMajorVer + &#34;.&#34; + reqRevision);<br/>&nbsp;&nbsp; &#160;&#160;&#160;&#160;// 往後尋找最新版本&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;for (i=25;i&gt;0;i--) {&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if (isIE &amp;&amp; isWin &amp;&amp; !isOpera) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;versionStr = VBGetSwfVer(i);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;} else {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;versionStr = JSGetSwfVer(i);&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if (versionStr == -1 ) { <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return false;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;} else if (versionStr != 0) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if(isIE &amp;&amp; isWin &amp;&amp; !isOpera) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;tempArray&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = versionStr.split(&#34; &#34;);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;tempString&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= tempArray[1];<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;versionArray&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= tempString .split(&#34;,&#34;);&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;} else {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;versionArray&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= versionStr.split(&#34;.&#34;);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;versionMajor&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= versionArray[0];<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;versionMinor&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= versionArray[1];<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;versionRevision&nbsp;&nbsp; = versionArray[2];<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;versionString&nbsp;&nbsp;&nbsp;&nbsp; = versionMajor + &#34;.&#34; + versionRevision;&nbsp;&nbsp; // 7.0r24 == 7.24<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;versionNum&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= parseFloat(versionString);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#160;&#160;&#160;&#160;// 是否主版本 &gt;= 需要的主版本，而且次版本 &gt;= 需要的次版本<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if ( (versionMajor &gt; reqMajorVer) &amp;&amp; (versionNum &gt;= reqVer) ) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return true;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;} else {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return ((versionNum &gt;= reqVer &amp;&amp; versionMinor &gt;= reqMinorVer) ? true : false );&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br/>&#160;&#160;&#160;&#160;}&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;return (reqVer ? false : 0.0);<br/>}<br/><br/><br/><span style="color:Red"><strong>二、在需載入Flash的網頁貼上以下語法</strong></span><br/>&lt;script type=&#34;text/javascript&#34; src=&#34;../js/AC_RunActiveContent.js&#34;&gt;&lt;/script&gt;<br/>&lt;script language=&#34;VBScript&#34; type=&#34;text/vbscript&#34;&gt;<br/>&lt;!-- // 需要 Visual basic 協助程式以偵測 Flash Player ActiveX Control 版本資訊<br/>Function VBGetSwfVer(i)<br/>&nbsp;&nbsp;on error resume next<br/>&nbsp;&nbsp;Dim swControl, swVersion<br/>&nbsp;&nbsp;swVersion = 0<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;set swControl = Cr&#101;ateObject(&#34;ShockwaveFlash.ShockwaveFlash.&#34; + CStr(i))<br/>&nbsp;&nbsp;if (IsObject(swControl)) then<br/>&nbsp;&nbsp;&nbsp;&nbsp;swVersion = swControl.GetVariable(&#34;$version&#34;)<br/>&nbsp;&nbsp;end if<br/>&nbsp;&nbsp;VBGetSwfVer = swVersion<br/>End Function<br/>// --&gt;<br/>&lt;/script&gt;<br/><br/><span style="color:White">[color=White][color=White][color=White][color=White][color=White][color=Red]<strong>三、載入Flash的程式改為以下方式表示：</strong></span>[/color][/color][/color][/color][/color][/color]<br/><br/>&lt;script language=&#34;JavaScript&#34; type=&#34;text/javascript&#34;&gt;<br/>&lt;!-- <br/> var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if(hasRightVersion) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;AC_FL_RunContent(&#39;codebase&#39;,&#39;<a href="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" target="_blank">http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab</a>#version=8,0,24,0&#39;,&#39;width&#39;,&#39;Flash<span style="color:Blue">寬度</span>&#39;,&#39;height&#39;,&#39;<span style="color:Blue">Flash高度&#39;</span>,&#39;src&#39;,&#39;<span style="color:Blue">Flash目錄路徑(不需檔名)</span>&#39;,&#39;quality&#39;,&#39;high&#39;,&#39;pluginspage&#39;,&#39;<a href="http://www.macromedia.com/go/getflashplayer" target="_blank">http://www.macromedia.com/go/getflashplayer</a>&#39;,&#39;movie&#39;,&#39;<span style="color:Blue">Flash目錄路徑(不需檔名)</span>&#39;); <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&nbsp;&nbsp;} else {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;var alt&#101;rnateContent = &#39;這個內容需要 Macromedia Flash Player。&#39;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;+ &#39;&lt;a href=http://www.macromedia.com/go/getflash/&gt;取得最新版本的 Flash Player&lt;/a&gt;&#39;;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;document.write(alt&#101;rnateContent);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&nbsp;&nbsp;}<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;// --&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;/script&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;noscript&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;object classid=&#34;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&#34; codebase=&#34;<a href="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" target="_blank">http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab</a>#version=8,0,24,0&#34;&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;param name=&#34;movie&#34; value=&#34;<span style="color:Blue">Flash路徑</span>&#34; /&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;param name=&#34;quality&#34; value=&#34;high&#34; /&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;embed src=&#34;<span style="color:Blue">Flash路徑</span>&#34; quality=&#34;high&#34; pluginspage=&#34;<a href="http://www.macromedia.com/go/getflashplayer" target="_blank">http://www.macromedia.com/go/getflashplayer</a>&#34; type=&#34;application/x-shockwave-flash&#34; &gt;&lt;/embed&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;/object&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;/noscript&gt;<br/><br/><br/>大功告成囉！^_^ 祝大家測試成功]]></description>
		</item>
		
			<item>
			<link>http://www.pro-soho.com/Blog/default.asp?id=194</link>
			<title><![CDATA[讓Iframe隨內容自動調整大小]]></title>
			<author>scooter.tw@gmail.com(admin)</author>
			<category><![CDATA[JavaScript]]></category>
			<pubDate>Tue,08 Aug 2006 15:30:07 +0800</pubDate>
			<guid>http://www.pro-soho.com/Blog/default.asp?id=194</guid>	
		<description><![CDATA[<div class="UBBPanel"><div class="UBBTitle"><img src="http://www.pro-soho.com/Blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代碼"/> 程序代碼</div><div class="UBBContent"><br/>&lt;script&gt;<br/>var myI,myW,myH<br/>function ResizeIframe(i) {<br/>&#160;&#160;&#160;&#160;i.height = 10;<br/>&#160;&#160;&#160;&#160;i.width = 10;<br/>&#160;&#160;&#160;&#160;var b = i.contentWindow.document.body;&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;myI = i;<br/>&#160;&#160;&#160;&#160;myW = b.scrollWidth;<br/>&#160;&#160;&#160;&#160;myH = b.scrollHeight;<br/>&#160;&#160;&#160;&#160;setTimeout(&#34;ResizeIframe2(myI,myW,myH)&#34;,100);<br/>}<br/>function ResizeIframe2(i,w,h) {<br/>&#160;&#160;&#160;&#160;i.height = h;<br/>&#160;&#160;&#160;&#160;i.width = w;<br/>}<br/>&lt;/script&gt;<br/><br/><br/>&lt;iframe name=&#34;I1&#34; width=&#34;10&#34; height=&#34;10&#34; src=&#34;開啟網頁路徑&#34; onload=&#34;ResizeIframe(this)&#34;&gt;&lt;/iframe&gt;<br/></div></div><br/><br/>]]></description>
		</item>
		
			<item>
			<link>http://www.pro-soho.com/Blog/default.asp?id=193</link>
			<title><![CDATA[彈出小視窗，並自動調整成適合圖片的視窗大小]]></title>
			<author>scooter.tw@gmail.com(admin)</author>
			<category><![CDATA[JavaScript]]></category>
			<pubDate>Tue,08 Aug 2006 11:54:52 +0800</pubDate>
			<guid>http://www.pro-soho.com/Blog/default.asp?id=193</guid>	
		<description><![CDATA[<div class="UBBPanel"><div class="UBBTitle"><img src="http://www.pro-soho.com/Blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代碼"/> 程序代碼</div><div class="UBBContent"><br/>&lt;body onload=&#34;test()&#34;&gt;<br/>&lt;SCRIPT LANGUAGE=&#34;JavaScript&#34;&gt;<br/>&lt;!--<br/>function test(){<br/><br/>window.resizeTo(document.all[&#34;myimg&#34;].width+50,document.all[&#34;myimg&#34;].height+130);<br/>}<br/>//--&gt;<br/>&lt;/SCRIPT&gt;<br/><br/>&lt;img src=&#34;/photos/xxx.jpg&#34; name=myimg&gt; <br/></div></div>]]></description>
		</item>
		
			<item>
			<link>http://www.pro-soho.com/Blog/default.asp?id=190</link>
			<title><![CDATA[利用JS+CSS實現圓角]]></title>
			<author>scooter.tw@gmail.com(admin)</author>
			<category><![CDATA[JavaScript]]></category>
			<pubDate>Sun,06 Aug 2006 16:01:27 +0800</pubDate>
			<guid>http://www.pro-soho.com/Blog/default.asp?id=190</guid>	
		<description><![CDATA[&lt;H1&gt;&lt;IMG title=&#34;nifty corners cube - rounded corners without images&#34; alt=&#34;nifty corners cube&#34; src=&#34;<a href="http://www.html.it/articoli/niftycube/NiftyLogo.png" target="_blank">http://www.html.it/articoli/niftycube/NiftyLogo.png</a>&#34;&gt;&lt;/H1&gt;<br/>&lt;ADDRESS&gt;by &lt;A href=&#34;mailto:a.fulciniti@html.it&#34;&gt;&lt;FONT color=#4286f4&gt;Alessandro Fulciniti&lt;/FONT&gt;&lt;/A&gt;&lt;/ADDRESS&gt;<br/>&lt;P&gt;More than one year has passed from the &lt;A href=&#34;<a href="http://www.html.it/articoli/nifty/index.html" target="_blank">http://www.html.it/articoli/nifty/index.html</a>&#34;&gt;&lt;FONT color=#4286f4&gt;first version&lt;/FONT&gt;&lt;/A&gt; of Nifty Corners. While it was more of a proof of concept, and the &lt;A title=&#34;more nifty corners&#34; href=&#34;<a href="http://pro.html.it/articoli/id_599/idcat_31/pro.html" target="_blank">http://pro.html.it/articoli/id_599/idcat_31/pro.html</a>&#34;&gt;&lt;FONT color=#4286f4&gt;second version&lt;/FONT&gt;&lt;/A&gt; presented some big improvements, there was still something missing. So here I present Nifty Corners Cube, that are simpler and more flexible than the previous versions. Let&#39;s start.&lt;/P&gt;<br/>&lt;H2&gt;New features&lt;/H2&gt;<br/>&lt;P&gt;If you&#39;re new to Nifty Corners, I suggest to look in particular at the article on the &lt;A href=&#34;<a href="http://www.html.it/articoli/nifty/index.html" target="_blank">http://www.html.it/articoli/nifty/index.html</a>&#34;&gt;&lt;FONT color=#4286f4&gt;first version&lt;/FONT&gt;&lt;/A&gt; to understand the concept behind them. Basically, Nifty Corners are a solution based on CSS and Javascript to get rounded corners &lt;EM&gt;without images&lt;/EM&gt;.&lt;/P&gt;<br/>&lt;P&gt;There are several improvements and new features introduced in Nifty Corners Cube which make it more versatile and simpler to use than the previous versions:&lt;/P&gt;<br/>&lt;UL&gt;<br/>&lt;LI&gt;The &lt;EM&gt;numbers of parameters&lt;/EM&gt; has been reduced from four of the first version and five of the second version to just two, of which one is optional. <br/>&lt;LI&gt;It&#39;s not necessary specify the colors anymore, since they are detected automatically. <br/>&lt;LI&gt;They&#39;re easier to integrate into the design process, since the padding (both horizontal and vertical) of elements to round is preserved <br/>&lt;LI&gt;It&#39;s easier to use them with other scripts <br/>&lt;LI&gt;The support of CSS sel&#101;ctors has been improved and expanded <br/>&lt;LI&gt;Just a single line in the &lt;CODE&gt;head&lt;/CODE&gt; section is now needed for the whole library: even if they&#39;re still based on both CSS and javascript, the presentational CSS for Nifty Corners is loaded automatically by js <br/>&lt;LI&gt;They&#39;re now released under GPL licence. &lt;/LI&gt;&lt;/UL&gt;<br/>&lt;P&gt;Together with the many novelties, that we&#39;ll discover through several examples, two features of the previous version has been abandoned. First, the support in Internet Explorer 5.0/Win has been totally dro&#112;ped. Users of this browser will simply see squared corners, just as users with javascript disabled. The support remains very good however: the examples of the articles have all been tested successfully in IE5.5, IE6 and IE7 beta 2 preview, Opera 8.5, Firefox 1.5 and Safari 2.0. I had to dro&#112; even Nifty Corners with borders for compatibility issues I&#39;ve had with IE and the new approach of the script.&lt;/P&gt;<br/>&lt;H2&gt;Nifty Corners Cube: introduction&lt;/H2&gt;<br/>&lt;P&gt;Nifty Corners Cube are a solution to get rounded corners without images, and this third version is build by three main components:&lt;/P&gt;<br/>&lt;UL&gt;<br/>&lt;LI&gt;A javascript file, named &#34;niftycornerscube.js&#34; <br/>&lt;LI&gt;A CSS file, named &#34;niftycorners.css&#34; <br/>&lt;LI&gt;The javascript calls specific for the pages &lt;/LI&gt;&lt;/UL&gt;<br/>&lt;P&gt;Now we&#39;re now ready to look at the &lt;A href=&#34;<a href="http://www.html.it/articoli/niftycube/nifty1.html" target="_blank">http://www.html.it/articoli/niftycube/nifty1.html</a>&#34;&gt;&lt;FONT color=#55a628&gt;first example&lt;/FONT&gt;&lt;/A&gt;: it&#39;s a &lt;CODE&gt;div&lt;/CODE&gt; with big rounded corners thanks to Nifty Corners. As I said before, the CSS file it&#39;s added automatically by javascript. In fact, the only reference to an external file in the example is the following:&lt;/P&gt;<br/>&lt;P class=codice&gt;&amp;lt;script type=&#34;text/javascript&#34; src=&#34;niftycube.js&#34;&amp;gt;&amp;lt;/script&amp;gt; &lt;/P&gt;<br/>&lt;P&gt;Regarding the third point, as is the javascript calls needed for the page, the code for the &lt;A href=&#34;<a href="http://www.html.it/articoli/niftycube/nifty1.html" target="_blank">http://www.html.it/articoli/niftycube/nifty1.html</a>&#34;&gt;&lt;FONT color=#55a628&gt;example&lt;/FONT&gt;&lt;/A&gt; is the following:&lt;/P&gt;<br/>&lt;P class=codice&gt;&amp;lt;script type=&#34;text/javascript&#34;&amp;gt;&lt;BR&gt;window.onload=function(){&lt;BR&gt;&lt;STRONG&gt;Nifty(&#34;div#box&#34;,&#34;big&#34;);&lt;/STRONG&gt;&lt;BR&gt;}&lt;BR&gt;&amp;lt;/script&amp;gt; &lt;/P&gt;<br/>&lt;P&gt;In bold I&#39;ve reported the part of the script that depends on the page, and that is the call for the function &lt;STRONG&gt;Nifty&lt;/STRONG&gt;. This function is the core of the whole library, and receives two parameters that are the strength point of the script. Parameters have to be specified between quotes and separated by a comma. The first parameter is for the &lt;STRONG&gt;CSS sel&#101;ctor&lt;/STRONG&gt; that targets the elements to round, while the second parameter is for &lt;STRONG&gt;options&lt;/STRONG&gt; for default cases could be omitted. Let&#39;s see them in depth.&lt;/P&gt;<br/>&lt;H2&gt;The parameters&lt;/H2&gt;<br/>&lt;P&gt;The first parameter is for the &lt;STRONG&gt;CSS sel&#101;ctor&lt;/STRONG&gt; to targets the elements on which apply Nifty Corners. The CSS sel&#101;ctors accepted are: tag sel&#101;ctor, id sel&#101;ctor, descendant sel&#101;ctor (with id o&#114; class) and grouping. The following table show some example:&lt;/P&gt;<br/>&lt;TABLE&gt;<br/>&lt;THEAD&gt;<br/>&lt;TR&gt;<br/>&lt;TH&gt;Sel&#101;ctor&lt;/TH&gt;<br/>&lt;TH&gt;Example&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;<br/>&lt;TBODY&gt;<br/>&lt;TR&gt;<br/>&lt;TH&gt;tag sel&#101;ctor&lt;/TH&gt;<br/>&lt;TD&gt;&#34;p&#34;&lt;BR&gt;&#34;h2&#34;&lt;/TD&gt;&lt;/TR&gt;<br/>&lt;TR&gt;<br/>&lt;TH&gt;id sel&#101;ctor&lt;/TH&gt;<br/>&lt;TD&gt;&#34;div#header&#34;&lt;BR&gt;&#34;h2#about&#34;&lt;/TD&gt;&lt;/TR&gt;<br/>&lt;TR&gt;<br/>&lt;TH&gt;class sel&#101;ctor&lt;/TH&gt;<br/>&lt;TD&gt;&#34;div.news&#34;&lt;BR&gt;&#34;span.date&#34;&lt;BR&gt;&#34;p.comment&#34;&lt;/TD&gt;&lt;/TR&gt;<br/>&lt;TR&gt;<br/>&lt;TH&gt;descendant sel&#101;ctor (with id)&lt;/TH&gt;<br/>&lt;TD&gt;&#34;div#content h2&#34;&lt;BR&gt;&#34;div#menu a&#34;&lt;/TD&gt;&lt;/TR&gt;<br/>&lt;TR&gt;<br/>&lt;TH&gt;descendant sel&#101;ctor (with class)&lt;/TH&gt;<br/>&lt;TD&gt;&#34;ul.news li&#34;&lt;BR&gt;&#34;div.entry h4&#34;&lt;/TD&gt;&lt;/TR&gt;<br/>&lt;TR&gt;<br/>&lt;TH&gt;grouping (any number and combination of the previous sel&#101;ctors)&lt;/TH&gt;<br/>&lt;TD&gt;&#34;h2,h3&#34;&lt;BR&gt;&#34;div#header,div#content,div#footer&#34;&lt;BR&gt;&#34;ul#menu li,div.entry li&#34;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;<br/>&lt;P&gt;Talking about options: they&#39;re identified by keywords and they can be specified in any o&#114;der and number. Let&#39;s see them:&lt;/P&gt;<br/>&lt;TABLE&gt;<br/>&lt;THEAD&gt;<br/>&lt;TR&gt;<br/>&lt;TH&gt;keyword&lt;/TH&gt;<br/>&lt;TH&gt;meaning&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;<br/>&lt;TBODY&gt;<br/>&lt;TR&gt;<br/>&lt;TH&gt;tl&lt;/TH&gt;<br/>&lt;TD&gt;top left corner&lt;/TD&gt;&lt;/TR&gt;<br/>&lt;TR&gt;<br/>&lt;TH&gt;tr&lt;/TH&gt;<br/>&lt;TD&gt;top right corner&lt;/TD&gt;&lt;/TR&gt;<br/>&lt;TR&gt;<br/>&lt;TH&gt;bl&lt;/TH&gt;<br/>&lt;TD&gt;bottom left corner&lt;/TD&gt;&lt;/TR&gt;<br/>&lt;TR&gt;<br/>&lt;TH&gt;br&lt;/TH&gt;<br/>&lt;TD&gt;bottom right corner&lt;/TD&gt;&lt;/TR&gt;<br/>&lt;TR&gt;<br/>&lt;TH&gt;top&lt;/TH&gt;<br/>&lt;TD&gt;upper corners&lt;/TD&gt;&lt;/TR&gt;<br/>&lt;TR&gt;<br/>&lt;TH&gt;bottom&lt;/TH&gt;<br/>&lt;TD&gt;lower corners&lt;/TD&gt;&lt;/TR&gt;<br/>&lt;TR&gt;<br/>&lt;TH&gt;left&lt;/TH&gt;<br/>&lt;TD&gt;left corners&lt;/TD&gt;&lt;/TR&gt;<br/>&lt;TR&gt;<br/>&lt;TH&gt;right&lt;/TH&gt;<br/>&lt;TD&gt;right corners&lt;/TD&gt;&lt;/TR&gt;<br/>&lt;TR&gt;<br/>&lt;TH&gt;all &lt;EM&gt;(default)&lt;/EM&gt;&lt;/TH&gt;<br/>&lt;TD&gt;all the four corners&lt;/TD&gt;&lt;/TR&gt;<br/>&lt;TR&gt;<br/>&lt;TH&gt;none&lt;/TH&gt;<br/>&lt;TD&gt;no corners will be rounded (to use for nifty columns)&lt;/TD&gt;&lt;/TR&gt;<br/>&lt;TR&gt;<br/>&lt;TH&gt;small&lt;/TH&gt;<br/>&lt;TD&gt;small corners (2px)&lt;/TD&gt;&lt;/TR&gt;<br/>&lt;TR&gt;<br/>&lt;TH&gt;normal &lt;EM&gt;(default)&lt;/EM&gt;&lt;/TH&gt;<br/>&lt;TD&gt;normal size corners (5px)&lt;/TD&gt;&lt;/TR&gt;<br/>&lt;TR&gt;<br/>&lt;TH&gt;big&lt;/TH&gt;<br/>&lt;TD&gt;big size corners (10px)&lt;/TD&gt;&lt;/TR&gt;<br/>&lt;TR&gt;<br/>&lt;TH&gt;transparent&lt;/TH&gt;<br/>&lt;TD&gt;inner transparent, alias corners will be obtained. This option activates automatically if the element to round does not have a background-color specified.&lt;/TD&gt;&lt;/TR&gt;<br/>&lt;TR&gt;<br/>&lt;TH&gt;fixed-height&lt;/TH&gt;<br/>&lt;TD&gt;to be applied when a fixed height is set via CSS&lt;/TD&gt;&lt;/TR&gt;<br/>&lt;TR&gt;<br/>&lt;TH&gt;same-height&lt;/TH&gt;<br/>&lt;TD&gt;Parameter for &lt;EM&gt;nifty columns&lt;/EM&gt;: all elements identified by the CSS sel&#101;ctor of the first parameter will have the same height. If the effect is needed without rounded corners, simply use this parameter in conjuction with the keyword &lt;EM&gt;none&lt;/EM&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;<br/>&lt;P&gt;We&#39;ll meet the sel&#101;ctors and options through the many examples I&#39;ve prepared. Let&#39;s start.&lt;/P&gt;<br/>&lt;H2&gt;Example 1: a single div&lt;/H2&gt;<br/>&lt;P&gt;The &lt;A href=&#34;<a href="http://www.html.it/articoli/niftycube/nifty1.html" target="_blank">http://www.html.it/articoli/niftycube/nifty1.html</a>&#34;&gt;&lt;FONT color=#55a628&gt;first example&lt;/FONT&gt;&lt;/A&gt; has been already presented. The code to round the div with &lt;CODE&gt;id=&#34;box&#34;&lt;/CODE&gt; is the following:&lt;/P&gt;<br/>&lt;P class=codice&gt;&amp;lt;script type=&#34;text/javascript&#34; src=&#34;niftycube.js&#34;&amp;gt;&amp;lt;/script&amp;gt;&lt;BR&gt;&amp;lt; script type=&#34;text/javascript&#34;&amp;gt;&lt;BR&gt;window.onload=function(){&lt;BR&gt;&lt;STRONG&gt;Nifty(&#34;div#box&#34;,&#34;big&#34;);&lt;/STRONG&gt;&lt;BR&gt;}&lt;BR&gt;&amp;lt;/script&amp;gt; &lt;/P&gt;<br/>&lt;P&gt;The first line is needed to link the nifty corners library, while the others are for the specific page. Background colors of the page and the div id=&#34;box&#34; are detected automatically by the script. Another thing to note is that the padding of the div (20px on vertical sides in this case) is preserved.&lt;/P&gt;<br/>&lt;P&gt;The part reported in bold is the call to the &lt;STRONG&gt;Nifty&lt;/STRONG&gt; function. For the sake of brevity, starting from the next example, I&#39;ll report just the calls for this function, but please keep in mind that these have to be incorportated in an embedded script tag o&#114;, even better, in an external js file.&lt;/P&gt;<br/>&lt;H2&gt;Example 2: two divs&lt;/H2&gt;<br/>&lt;P&gt;In the &lt;A href=&#34;<a href="http://www.html.it/articoli/niftycube/nifty2.html" target="_blank">http://www.html.it/articoli/niftycube/nifty2.html</a>&#34;&gt;&lt;FONT color=#55a628&gt;second example&lt;/FONT&gt;&lt;/A&gt; nifty corners were used to round two divs with one single call:&lt;/P&gt;<br/>&lt;P class=codice&gt;Nifty(&#34;div#content,div#nav&#34;); &lt;/P&gt;<br/>&lt;P&gt;In this case just the first parameter has been used, as is the CSS sel&#101;ctor with grouping: the two id sel&#101;ctor are separated by a comma. The second parameter hasn&#39;t been used, therefore nifty corners will be of medium size (5px) and with antialias by default.&lt;/P&gt;<br/>&lt;H2&gt;Example 3: transparency&lt;/H2&gt;<br/>&lt;P&gt;In the &lt;A href=&#34;<a href="http://www.html.it/articoli/niftycube/nifty3.html" target="_blank">http://www.html.it/articoli/niftycube/nifty3.html</a>&#34;&gt;&lt;FONT color=#55a628&gt;example three&lt;/FONT&gt;&lt;/A&gt; nifty corners were applied on a div with a gradient background. In such cases the use of inner transparency could be really useful, and will be obtained via the &lt;EM&gt;transparent&lt;/EM&gt; option. Let&#39;s see the javascript call:&lt;/P&gt;<br/>&lt;P class=codice&gt;Nifty(&#34;div#box&#34;,&#34;transparent&#34;); &lt;/P&gt;<br/>&lt;P&gt;The transparency option is compatible with all others, and is used by default on elements with no background-color set.&lt;/P&gt;<br/>&lt;H2&gt;Example 4: nifty tabs&lt;/H2&gt;<br/>&lt;P&gt;The &lt;A href=&#34;<a href="http://www.html.it/articoli/niftycube/nifty4.html" target="_blank">http://www.html.it/articoli/niftycube/nifty4.html</a>&#34;&gt;&lt;FONT color=#4286f4&gt;fourth example&lt;/FONT&gt;&lt;/A&gt; is one of the major request on nifty corners: a tabbed menu without images. The javascript call is the following:&lt;/P&gt;<br/>&lt;P class=codice&gt;Nifty(&#34;ul#nav a&#34;,&#34;small transparent top&#34;); &lt;/P&gt;<br/>&lt;P&gt;Links are rounded on the top side, with small and transparent inside corners. Inner transparency is essential for the rollover effect. In the case rollover with background-color is not needed, here&#39;s a &lt;A href=&#34;<a href="http://www.html.it/articoli/niftycube/nifty4bis.html" target="_blank">http://www.html.it/articoli/niftycube/nifty4bis.html</a>&#34;&gt;&lt;FONT color=#4286f4&gt;small variant&lt;/FONT&gt;&lt;/A&gt; wh&#101;re each tab is smooth-rounded and has got a different color. The js call in this case is:&lt;/P&gt;<br/>&lt;P class=codice&gt;Nifty(&#34;ul#nav a&#34;,&#34;top&#34;); &lt;/P&gt;<br/>&lt;P&gt;There&#39;s a thing to highlight, as is the fact that in both examples the tabs are perfectly elastic, since they&#39;re em-dimensioned.&lt;/P&gt;<br/>&lt;H2&gt;Example 5: nifty buttons&lt;/H2&gt;<br/>&lt;P&gt;In the &lt;A href=&#34;<a href="http://www.html.it/articoli/niftycube/nifty5.html" target="_blank">http://www.html.it/articoli/niftycube/nifty5.html</a>&#34;&gt;&lt;FONT color=#4286f4&gt;fifth example&lt;/FONT&gt;&lt;/A&gt; a mini-navigation, suitable for blogs and such, is obtained with nifty corners. The code is the following:&lt;/P&gt;<br/>&lt;P class=codice&gt;Nifty(&#34;ul.postnav a&#34;,&#34;transparent&#34;); &lt;/P&gt;<br/>&lt;P&gt;In this markup, a class for the buttons has been used, so it would be possible to get several sets of of link-buttons in the same page. On the nifty corners side, the descendant sel&#101;ctor with a class has been therefore used.&lt;/P&gt;<br/>&lt;H2&gt;Example 6: boxes&lt;/H2&gt;<br/>&lt;P&gt;In the &lt;A href=&#34;<a href="http://www.html.it/articoli/niftycube/nifty6.html" target="_blank">http://www.html.it/articoli/niftycube/nifty6.html</a>&#34;&gt;&lt;FONT color=#4286f4&gt;sixth example&lt;/FONT&gt;&lt;/A&gt; nifty corners are used to round six divs with fixed height and bold corners. Each of div has a different color, even the lower-right one which is white like the background of the page. Antialias is automatically done, and padding of the list-items, both vertical and horizontal, has been preserved. But in o&#114;der to honour the fixed height specified via CSS, the &lt;CODE&gt;fixed-height&lt;/CODE&gt; keyword has to be specified. Here&#39;s the only js call used:&lt;/P&gt;<br/>&lt;P class=codice&gt;Nifty(&#34;div#about li&#34;,&#34;tl bottom big fixed-height&#34;); &lt;/P&gt;<br/>&lt;H2&gt;Example 7: nifty columns&lt;/H2&gt;<br/>&lt;P&gt;With the &lt;A href=&#34;<a href="http://www.html.it/articoli/niftycube/nifty7.html" target="_blank">http://www.html.it/articoli/niftycube/nifty7.html</a>&#34;&gt;&lt;FONT color=#4286f4&gt;seventh example&lt;/FONT&gt;&lt;/A&gt; we introduce one of the biggest new features of nifty corners: nifty columns. This feature allow to get a &lt;EM&gt;faux-column&lt;/EM&gt; effect without background. The option that does the trick is &lt;STRONG&gt;same-height&lt;/STRONG&gt;, and the elements must be specified within the first parameter. The call for the example is:&lt;/P&gt;<br/>&lt;P class=codice&gt;Nifty(&#34;div#content,div#nav&#34;,&#34;same-height&#34;); &lt;/P&gt;<br/>&lt;P&gt;The option &lt;CODE&gt;same-height&lt;/CODE&gt; tells the script to detect the height of the elements targetted by the css sel&#101;ctor and to assign them the same height, as is the maximum value detected, without the need for background-images.&lt;/P&gt;<br/>&lt;H2&gt;Example 8,9 and 10: more nifty columns&lt;/H2&gt;<br/>&lt;P&gt;The examples &lt;A href=&#34;<a href="http://www.html.it/articoli/niftycube/nifty8.html" target="_blank">http://www.html.it/articoli/niftycube/nifty8.html</a>&#34;&gt;&lt;FONT color=#4286f4&gt;eight&lt;/FONT&gt;&lt;/A&gt;, &lt;A href=&#34;<a href="http://www.html.it/articoli/niftycube/nifty9.html" target="_blank">http://www.html.it/articoli/niftycube/nifty9.html</a>&#34;&gt;&lt;FONT color=#4286f4&gt;nine&lt;/FONT&gt;&lt;/A&gt; and &lt;A href=&#34;<a href="http://www.html.it/articoli/niftycube/nifty10.html" target="_blank">http://www.html.it/articoli/niftycube/nifty10.html</a>&#34;&gt;&lt;FONT color=#4286f4&gt;ten&lt;/FONT&gt;&lt;/A&gt; are built on the same markup, which is the following:&lt;/P&gt;<br/>&lt;P class=codice&gt;&amp;lt;ul id=&#34;split&#34;&amp;gt;&lt;BR&gt;&amp;lt;li id=&#34;one&#34;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;lt;h3&amp;gt;Title&amp;lt;/h3&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;lt;div&amp;gt;Content&amp;lt;/div&amp;gt;&lt;BR&gt;&amp;lt;/li&amp;gt;&lt;BR&gt;&amp;lt;li id=&#34;two&#34;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;lt;h3&amp;gt;Title&amp;lt;/h3&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;lt;div&amp;gt;Content&amp;lt;/div&amp;gt;&amp;lt;/li&amp;gt;&lt;BR&gt;&amp;lt;li id=&#34;three&#34;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;lt;h3&amp;gt;Title&amp;lt;/h3&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;lt;div&amp;gt;Content&amp;lt;/div&amp;gt;&lt;BR&gt;&amp;lt;/li&amp;gt;&lt;BR&gt;&amp;lt;/ul&amp;gt; &lt;/P&gt;<br/>&lt;P&gt;The only things that vary are in fact CSS and the calls to nifty corners, which use nifty columns in the three cases. In the &lt;A href=&#34;<a href="http://www.html.it/articoli/niftycube/nifty8.html" target="_blank">http://www.html.it/articoli/niftycube/nifty8.html</a>&#34;&gt;&lt;FONT color=#4286f4&gt;example height&lt;/FONT&gt;&lt;/A&gt; the javascript call is the following:&lt;/P&gt;<br/>&lt;P class=codice&gt;Nifty(&#34;ul#split li&#34;,&#34;same-height&#34;); &lt;/P&gt;<br/>&lt;P&gt;In &lt;A href=&#34;<a href="http://www.html.it/articoli/niftycube/nifty9.html" target="_blank">http://www.html.it/articoli/niftycube/nifty9.html</a>&#34;&gt;&lt;FONT color=#4286f4&gt;example 9&lt;/FONT&gt;&lt;/A&gt; two calls were used: one for the headings, and one, with the &lt;CODE&gt;same-height&lt;/CODE&gt; options, for lower divs:&lt;/P&gt;<br/>&lt;P class=codice&gt;Nifty(&#34;ul#split h3&#34;,&#34;top&#34;);&lt;BR&gt;Nifty(&#34;ul#split div&#34;,&#34;bottom same-height&#34;); &lt;/P&gt;<br/>&lt;P&gt;If you don&#39;t need rounded corners on the lower part, but you&#39;d like to get anyway elements with the same height, as in the &lt;A href=&#34;<a href="http://www.html.it/articoli/niftycube/nifty10.html" target="_blank">http://www.html.it/articoli/niftycube/nifty10.html</a>&#34;&gt;&lt;FONT color=#4286f4&gt;example 10&lt;/FONT&gt;&lt;/A&gt;, simply specify the &lt;CODE&gt;none&lt;/CODE&gt; option:&lt;/P&gt;<br/>&lt;P class=codice&gt;Nifty(&#34;ul#split h3&#34;,&#34;top&#34;);&lt;BR&gt;Nifty(&#34;ul#split div&#34;,&#34;none same-height&#34;); &lt;/P&gt;<br/>&lt;H2&gt;Example 11 and 12: Nifty Corners Layout&lt;/H2&gt;<br/>&lt;P&gt;We&#39;ve arrived to two major examples of the article, as is Nifty Corners Layouts. In the example &lt;A href=&#34;<a href="http://www.html.it/articoli/niftycube/nifty11.html" target="_blank">http://www.html.it/articoli/niftycube/nifty11.html</a>&#34;&gt;&lt;FONT color=#4286f4&gt;eleven&lt;/FONT&gt;&lt;/A&gt; and &lt;A href=&#34;<a href="http://www.html.it/articoli/niftycube/nifty12.html" target="_blank">http://www.html.it/articoli/niftycube/nifty12.html</a>&#34;&gt;&lt;FONT color=#4286f4&gt;twelve&lt;/FONT&gt;&lt;/A&gt; nifty corners are used extensively for layout and page elements.&lt;/P&gt;<br/>&lt;P&gt;In &lt;A href=&#34;<a href="http://www.html.it/articoli/niftycube/nifty11.html" target="_blank">http://www.html.it/articoli/niftycube/nifty11.html</a>&#34;&gt;&lt;FONT color=#4286f4&gt;example eleven&lt;/FONT&gt;&lt;/A&gt;, as in the previous examples, I left for ease of consultation the CSS and the script embedded in the page. The javascript section is the following:&lt;/P&gt;<br/>&lt;P class=codice&gt;window.onload=function(){&lt;BR&gt;Nifty(&#34;div#container&#34;);&lt;BR&gt;Nifty(&#34;div#content,div#nav&#34;,&#34;same-height small&#34;);&lt;BR&gt;Nifty(&#34;div#header,div#footer&#34;,&#34;small&#34;);&lt;BR&gt;} &lt;/P&gt;<br/>&lt;P&gt;When the page has loaded, Nifty Corners are applied on container, small and with faux columns on content and sidebar for navigation, and just small on the footer. The effect o a white border around all the page is achieved with a padding on the container.&lt;/P&gt;<br/>&lt;P&gt;The &lt;A href=&#34;<a href="http://www.html.it/articoli/niftycube/nifty12.html" target="_blank">http://www.html.it/articoli/niftycube/nifty12.html</a>&#34;&gt;&lt;FONT color=#4286f4&gt;example twelve&lt;/FONT&gt;&lt;/A&gt; represent a two-column layout, tabbed navigation and some elements (like dates and comments) common in blog design. In this case CSS and javascript are kept in external files, here is the regarding code in the &lt;CODE&gt;head&lt;/CODE&gt; section:&lt;/P&gt;<br/>&lt;P class=codice&gt;&amp;lt;link rel=&#34;stylesheet&#34; type=&#34;text/css&#34; href=&#34;NiftyLayout.css&#34; media=&#34;screen&#34;&amp;gt;&lt;BR&gt;&amp;lt;script type=&#34;text/javascript&#34; src=&#34;niftycube.js&#34;&amp;gt;&amp;lt;/script&amp;gt;&lt;BR&gt;&amp;lt;script type=&#34;text/javascript&#34; src=&#34;NiftyLayout.js&#34;&amp;gt;&amp;lt;/script&amp;gt; &lt;/P&gt;<br/>&lt;P&gt;Apart from the CSS, two javascript files are linked in; one is the library for nifty corners, while the second one contain the specific call for the page:&lt;/P&gt;<br/>&lt;P class=codice&gt;window.onload=function(){&lt;BR&gt;Nifty(&#34;div#menu a&#34;,&#34;small transparent top&#34;);&lt;BR&gt;Nifty(&#34;ul#intro li&#34;,&#34;same-height&#34;);&lt;BR&gt;Nifty(&#34;div.date&#34;);&lt;BR&gt;Nifty(&#34;div#content,div#side&#34;,&#34;same-height&#34;);&lt;BR&gt;Nifty(&#34;div.comments div&#34;);&lt;BR&gt;Nifty(&#34;div#footer&#34;);&lt;BR&gt;Nifty(&#34;div#container&#34;,&#34;bottom&#34;);&lt;BR&gt;} &lt;/P&gt;<br/>&lt;P&gt;The option &lt;CODE&gt;same-height&lt;/CODE&gt; has been used in two cases: on the three boxes of introduction and between content and navigation. In this second case, rounded corners are not visible, since they&#39;re done with transparency inside because the content has not a background-color specified.&lt;/P&gt;<br/>&lt;H2&gt;Example 13: NiftyLoad&lt;/H2&gt;<br/>&lt;P&gt;We&#39;ve finally arrived at the last example. One of the frequent reported question is in fact how to make coexist Nifty Corners with other script, given the fact only one assignation to &lt;CODE&gt;window.onload&lt;/CODE&gt; is possible.&lt;/P&gt;<br/>&lt;P&gt;In the &lt;A href=&#34;<a href="http://www.html.it/articoli/niftycube/nifty13.html" target="_blank">http://www.html.it/articoli/niftycube/nifty13.html</a>&#34;&gt;&lt;FONT color=#4286f4&gt;example 13&lt;/FONT&gt;&lt;/A&gt; an alert message, attached to window.onload, is shown before nifty corners proceed. This is done thanks to the function NiftyLoad, that will preserve a previous window.onload function. The javascript section, embedded on the page this time, is the following:&lt;/P&gt;<br/>&lt;P class=codice&gt;NiftyLoad=function(){&lt;BR&gt;Nifty(&#34;div#box&#34;,&#34;big&#34;);&lt;BR&gt;} &lt;/P&gt;<br/>&lt;P&gt;In o&#114;der to make nifty corners work together with other script, you just have to use &lt;CODE&gt;NiftyLoad&lt;/CODE&gt; instead of &lt;CODE&gt;window.onload&lt;/CODE&gt;. Obviously the function could go even in an external file, the only important thing is that the two script blocks for nifty corners, as is the library and the page-centric calls, are the last two script blocks of head section of the page. The &lt;CODE&gt;NiftyLoad&lt;/CODE&gt; function can also be used when nifty corners are the only script of the page, as is in any of the previous examples we&#39;ve seen.&lt;/P&gt;<br/>&lt;H2&gt;Troubleshooting and problem solving&lt;/H2&gt;<br/>&lt;P&gt;While making Nifty Corners Cube I&#39;ve tried to mantain the script as simple and robust as possible, and I hope to have inspired readersthrough the many example,.&lt;/P&gt;<br/>&lt;P&gt;The examples was also a way to test cross-browser compatibility, but this doesn&#39;t mean one might never get problems.&lt;/P&gt;<br/>&lt;P&gt;Even if javascript knowledge is not necessary, a working knowledge of CSS and HTML is, and it&#39;s also good practice to use always validate the code. If you do encounter problems, the first thing is to remove temporarily nifty corners and see if they persist. A general approach of development, that I&#39;ve used on preparing the examples of this article, is getting the HTML and CSS entirely written before adding Nifty Corners to the page.&lt;/P&gt;<br/>&lt;P&gt;Two features introduced in this version should simplify Nifty Corners usage. Colors are detected automatically, and could be changed in the CSS without the need to up&#100;ate the javascript calls. Padding, both vertical and horizontal, is now preserved. Especially for vertical padding, it&#39;s suggested to specify a pixel value at least equal to the size of the corners.&lt;/P&gt;<br/>&lt;P&gt;The examples should be a good starting point: one thing to keep in mind is that in some case I&#39;ve used ID, but if you&#39;d need more than one element on a page you should use class o&#114; descendant sel&#101;ctor, since an id in a page, according to HTML specification, should be unique.&lt;/P&gt;<br/>&lt;H2&gt;Credits, licencing and download&lt;/H2&gt;<br/>&lt;P&gt;I&#39;d like to thanks David Lindquist for his help in getting things right in Safari. The idea of nifty columns was inspired by &lt;A href=&#34;<a href="http://www.paulbellows.com/getsmart/balance_columns/" target="_blank">http://www.paulbellows.com/getsmart/balance_columns/</a>&#34;&gt;&lt;FONT color=#4286f4&gt;CSS balanced Columns&lt;/FONT&gt;&lt;/A&gt;, a very clever way to get faux columns without background.&lt;/P&gt;<br/>&lt;P&gt;Nifty Corners Cube are released under the &lt;A href=&#34;<a href="http://www.gnu.org/copyleft/gpl.html" target="_blank">http://www.gnu.org/copyleft/gpl.html</a>&#34;&gt;&lt;FONT color=#4286f4&gt;GNU GPL licence&lt;/FONT&gt;&lt;/A&gt; and were published on the 22 March 2006 both in italian and english.&lt;/P&gt;<br/>&lt;P&gt;The examples and code the code is available for &lt;A href=&#34;<a href="http://www.html.it/articoli/niftycube/NiftyCube.zip" target="_blank">http://www.html.it/articoli/niftycube/NiftyCube.zip</a>&#34;&gt;&lt;FONT color=#4286f4&gt;download&lt;/FONT&gt;&lt;/A&gt;. Enjoy!&lt;/P&gt;&lt;FONT color=#000000&gt;&lt;/FONT&gt;]]></description>
		</item>
		
</channel>
</rss>