//最快加入tracker的方法
var headID = document.getElementsByTagName("head")[0]; 
var tracker_Js = document.createElement('script');
tracker_Js.type = 'text/javascript';
tracker_Js.src= "/publish_news/tracker/tracker.js";
headID.appendChild(tracker_Js);

var special = '0'; // 0:normal, 1:special
var fontcolor = 'b'; // b:black, w:white
/* --------------------------------
資源網 HEADER
(logo, top, Search, menu, index_19.jpg)
----------------------------------- */

function Search3() { // 全文檢索
	if(window.ActiveXObject) { document.charset="Big5"; }
	document.form3.action = "http://dlsearch1.iis.sinica.edu.tw/scripts/ASDR/dispatcher.asp";
	document.form3.method = "GET";
	document.form3.target = "top";
	document.form3.submit();
}

function digiarch_header(href) {
document.write('			<table width="882" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#041780" bgcolor="#041780">')
document.write('				<tr>')
if(special=='0') {
	document.write('					<td height="100" background="images/logo_back.jpg">')
} else {
	document.write('					<td height="100" background="images/special/2010_head.jpg">')
}
document.write('						<table width="882" border="0" cellspacing="0" cellpadding="0">')
document.write('							<tr>')
document.write('								<td width="22">&nbsp;</td>')
												// 資源網LOGO
document.write('								<td width="489" align="left">')
document.write('									<script language="javascript">')
document.write('										if (AC_FL_RunContent == 0) {')
document.write('											alert("This page requires AC_RunActiveContent.js.");')
document.write('										} else {')
document.write('											AC_FL_RunContent( "codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0","name","logo","width","386","height","94","align","middle","id","logo","src","swf/logo","quality","high","wmode","transparent","allowscriptaccess","sameDomain","allowfullscreen","false","pluginspage","http://www.macromedia.com/go/getflashplayer","movie","swf/logo" );') //end AC code
document.write('										}')
document.write('									</script>')
document.write('									<noscript>')
document.write('										<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" name="logo" width="386" height="94" align="middle" id="logo">')
document.write('										<param name="allowScriptAccess" value="sameDomain" />')
document.write('										<param name="allowFullScreen" value="false" />')
document.write('										<param name="movie" value="swf/logo.swf" />')
document.write('										<param name="quality" value="high" />')
document.write('										<param name="wmode" value="transparent" />')
document.write('										<embed src="swf/logo.swf" quality="high" wmode="transparent" width="386" height="94" name="logo" align="middle" allowscriptaccess="sameDomain" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />')                
document.write('										</object>')
document.write('									</noscript>')
document.write('								</td>')

document.write('								<td width="360" valign="top">')
document.write('									<table width="360" border="0" cellpadding="0" cellspacing="0">')
														// 資源網TOP選單
document.write('										<tr>')
document.write('											<td width="360" align="right">')
document.write('												<script language="javascript">')
document.write('													if (AC_FL_RunContent == 0) {')
document.write('														alert("This page requires AC_RunActiveContent.js.");')
document.write('													} else {')
document.write('														AC_FL_RunContent( "codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0","width","360","height","20","align","middle","id","top_2","src","swf/top_2","quality","high","wmode","transparent","bgcolor","#091c83","name","top_2","allowscriptaccess","sameDomain","allowfullscreen","false","pluginspage","http://www.macromedia.com/go/getflashplayer","movie","swf/top_2" );') //end AC code
document.write('													}')
document.write('												</script>')
document.write('												<noscript>')
document.write('													<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="360" height="20" id="top" align="middle">')
document.write('													<param name="allowScriptAccess" value="sameDomain" />')
document.write('													<param name="allowFullScreen" value="false" />')
document.write('													<param name="movie" value="swf/top_2.swf" />')
document.write('													<param name="quality" value="high" />')
document.write('													<param name="wmode" value="transparent" />')
document.write('													<param name="bgcolor" value="#091c83" />')
document.write('													<embed src="swf/top_2.swf" quality="high" wmode="transparent" bgcolor="#091c83" width="360" height="20" name="top_2" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />')
document.write('													</object>')
document.write('												</noscript>')
document.write('											</td>')
document.write('										</tr>')

// 資源網 全文檢索
/*document.write('										<tr>')
document.write('											<td height="22" align="right">')
document.write('											<form name="form3" accept-charset="Big5" onSubmit="Search3()" method="get" target="top">')
document.write('												<label>')
document.write('													<input type="text" name="Q" size="25" class="style11">')
document.write('													<input type="image" src="images/btn_search.gif" width="64" height="22">')
document.write('													<input type="hidden" value="15" name="Menu">')
document.write('													<input type="hidden" value="/scripts/ASDR/Search.asp" name="Search">')
document.write('													<input type="hidden" value="all" name="Reserved">')
document.write('													<input type="hidden" value="0" name="CID">')
document.write('												</label>')
document.write('											</form>')
document.write('											</td>')
document.write('										</tr>')*/
document.write('									</table>')
document.write('								</td>')
document.write('								<td width="11">&nbsp;</td>')
document.write('							</tr>')
document.write('						</table>')
document.write('					</td>')
document.write('				</tr>')
document.write('			</table>')

// MENU選單
document.write('			<table width="882" border="0" cellspacing="0" cellpadding="0">')
document.write('				<tr>')
document.write('					<td>')
document.write('						<script type="text/javascript">')
document.write('							if (AC_FL_RunContent == 0) {')
document.write('								alert("This page requires AC_RunActiveContent.js.");')
document.write('							} else {')
document.write('								AC_FL_RunContent( "codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0","width","882","height","30","src","swf/menu","quality","high","pluginspage","http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash","movie","swf/menu" );') //end AC code
document.write('							}')
document.write('						</script>')
document.write('						<noscript>')
document.write('							<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="882" height="30">')
document.write('							<param name="movie" value="swf/menu.swf">')
document.write('							<param name="quality" value="high">')
document.write('							<embed src="swf/menu.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="882" height="30"></embed>')
document.write('							</object>')
document.write('						</noscript>')
document.write('					</td>')
document.write('				</tr>')
document.write('			</table>')

document.write('			<table width="882" border="0" cellpadding="0" cellspacing="0">')
document.write('				<tr>')
document.write('					<td height="10" background="images/index_19.jpg">&nbsp;</td>')
document.write('				</tr>')
document.write('			</table>')
}


/* --------------------------------
展示中心 HEADER
(top, Search, logo, index_19.jpg)
----------------------------------- */

function ex_header() {
document.write('			<table width="882" border="0" cellpadding="3" cellspacing="0" bgcolor="#091C83">')
document.write('				<tr>')
									// 展示中心TOP選單
document.write('					<td>')
document.write('						<script type="text/javascript">')
document.write('							if (AC_FL_RunContent == 0) {')
document.write('								alert("This page requires AC_RunActiveContent.js.");')
document.write('							} else {')
document.write('							AC_FL_RunContent( "codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0","width","440","height","20","src","swf/topB","quality","high","pluginspage","http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash","movie","swf/topB" );') //end AC code
document.write('							}')
document.write('						</script>')
document.write('						<noscript>')
document.write('							<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="440" height="20">')
document.write('							<param name="movie" value="swf/topB.swf">')
document.write('							<param name="quality" value="high">')
document.write('							<embed src="swf/topB.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="440" height="20"></embed>')
document.write('							</object>')
document.write('						</noscript>')
document.write('					</td>')
									// 全文檢索
document.write('					<!--<td width="342" valign="middle" align="right">')
document.write('					<form name="form1" action="http://dlsearch1.iis.sinica.edu.tw/scripts/ASDR/dispatcher.asp" method="get" accept-charset="Big5" target="top">')
document.write('						<label>')
document.write('							<input type="text" name="Q" size="30" class="style11">')
document.write('							<input type="image" src="images/btn_search.gif" width="64" height="22">')
document.write('							')
document.write('							<input type="hidden" value="15" name="Menu">')
document.write('							<input type="hidden" value="/scripts/ASDR/Search.asp" name="Search">')
document.write('							<input type="hidden" value="all" name="Reserved">')
document.write('							<input type="hidden" value="0" name="CID">')
document.write('						</label>')
document.write('					</form>')
document.write('					</td>-->')
document.write('				</tr>')
document.write('			</table>')
							// 展示中心LOGO
document.write('			<table width="882" height="98" border="0" cellpadding="0" cellspacing="0">')
document.write('				<tr>')
document.write('					<td width="384" height="98">')
if(special=='0') {
	document.write('						<script type="text/javascript">')
	document.write('							AC_FL_RunContent( "codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0","width","882","height","100","src","swf/logoB","quality","high","pluginspage","http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash","movie","swf/logoB" );') //end AC code
	document.write('						</script>')
	document.write('						<noscript>')
	document.write('							<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="882" height="100">')
	document.write('							<param name="movie" value="swf/logoB.swf">')
	document.write('							<param name="quality" value="high">')
	document.write('							<embed src="swf/logoB.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="882" height="100"></embed>')
	document.write('							</object>')
	document.write('						</noscript>')
} else {
	document.write('						<script type="text/javascript">')
	document.write('							AC_FL_RunContent( "codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0","width","882","height","100","src","images/special/2010_logoB","quality","high","pluginspage","http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash","movie","images/special/2010_logoB" );') //end AC code
	document.write('						</script>')
	document.write('						<noscript>')
	document.write('							<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="882" height="100">')
	document.write('							<param name="movie" value="images/2010_logoB.swf">')
	document.write('							<param name="quality" value="high">')
	document.write('							<embed src="images/special/2010_logoB.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="882" height="100"></embed>')
	document.write('							</object>')
	document.write('						</noscript>')
}
document.write('					</td>')
document.write('				</tr>')
document.write('			</table>')
document.write('			<table width="882" border="0" cellpadding="0" cellspacing="0">')
document.write('				<tr>')
document.write('					<td height="15" background="images/index_19.jpg">&nbsp;</td>')
document.write('				</tr>')
document.write('			</table>')
}

// 形象FLASH

function digiarch_flash() {
document.write('			<table width="882" border="0" cellspacing="0" cellpadding="0">')
document.write('				<tr id="FLASH">')// style="display:none;"
document.write('					<td background="images/index_loading.jpg">')
document.write('						<table width="882" border="0" cellspacing="0" cellpadding="0">')
document.write('							<tr>')
document.write('								<td>')
document.write('									<script type="text/javascript">')
document.write('										if (AC_FL_RunContent == 0) {')
document.write('											alert("This page requires AC_RunActiveContent.js.");')
document.write('										} else {')
document.write('											AC_FL_RunContent( "codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0","width","880","height","265","src","swf/index","quality","high","pluginspage","http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash","movie","swf/index" );') //end AC code
document.write('										}')
document.write('									</script>')
document.write('									<noscript>')
document.write('										<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="880" height="265">')
document.write('										<param name="movie" value="swf/index.swf">')
document.write('										<param name="quality" value="high">')
document.write('										<embed src="swf/index.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="880" height="265"></embed>')
document.write('										</object>')
document.write('									</noscript>')
document.write('								</td>')
document.write('							</tr>')
document.write('						</table>')
document.write('					</td>')
document.write('				</tr>')
/*document.write('				<tr>')
document.write('					<td class="content" align="right">')
document.write('						<span style="cursor:pointer; color:#ABABAB;" onClick="Switch(FLASH)">>>>開啟FLASH<<<</span>')
document.write('					</td>')
document.write('				</tr>')*/
document.write('				<tr>')
document.write('					<td>&nbsp;</td>')
document.write('				</tr>')
document.write('			</table>')
}


/* --------------------
資源網, 展示中心FOOTER
----------------------- */

function digiarch_footer() {

document.write('  <tr>')
if(special=='0') {
	document.write('    <td height="80" align="center" valign="middle" background="images/index_38.jpg">')
} else {
	document.write('    <td height="100" align="center" valign="middle" background="images/special/2010_foot.jpg" >')
}
document.write('		<table width="835" border="0" cellspacing="0" cellpadding="0">')
document.write('			<tr>')
document.write('				<td width="220">&nbsp;</td>')
document.write('				<td>')
if(fontcolor=='b') {
	document.write('					<table width="375" border="0" cellpadding="0" cellspacing="0" class="content">')
	document.write('						<tr>')
	document.write('							<td width="2">&nbsp;</td>')
	document.write('							<td><img src="images/teldap_logo.gif" alt="數位典藏與數位學習國家型科技計畫" height="28"></td>')
	document.write('							<td width="215">&nbsp;<a href="http://teldap.tw/" target="_blank">數位典藏與數位學習國家型科技計畫</a></td>')
	document.write('							<td width="7">&nbsp;</td>')
	document.write('							<td width="30"><img src="images/AS-logo.gif" alt="中央研究院" width="30" height="30"></td>')
	document.write('							<td width="90">&nbsp;<a href="http://www.sinica.edu.tw/" target="_blank">中央研究院</a></td>')
	document.write('							<td width="3">&nbsp;</td>')
	document.write('						</tr>')
	document.write('						<tr>')
	document.write('							<td>&nbsp;</td>')
	document.write('							<td colspan="5" align="center" valign="middle">')
	document.write('								<a href="http://daal.iis.sinica.edu.tw/" target="_blank">技術支援及網站維護&nbsp;&nbsp;DAAL&nbsp;數位典藏技術發展組')
	document.write('							</td>')
	document.write('							<td>&nbsp;</td>')
	document.write('						</tr>')
	document.write('						<tr>')
	document.write('							<td>&nbsp;</td>')
	document.write('							<td colspan="5" align="center" valign="middle">')
	document.write('								版權所有 All Rights Reserved')
	document.write('							</td>')
	document.write('							<td>&nbsp;</td>')
	document.write('						</tr>')

	document.write('					</table>')
	document.write('				</td>')
	document.write('				<td width="240" align="right" valign="bottom" class="content">')
	document.write('					<a href="digiarch_privacy.html">隱私權聲明</a>&nbsp;|&nbsp;')
	document.write('					<a href="8.html">版權宣告</a>&nbsp;|&nbsp;')
	document.write('					<a href="digiarch_contact_member.html">聯絡我們</a>')
	document.write('				</td>')
	document.write('			</tr>')
	document.write('		</table>')
} else {
	document.write('					<table width="375" border="0" cellpadding="0" cellspacing="0" class="tittles02">')
	document.write('						<tr>')
	document.write('							<td width="2">&nbsp;</td>')
	document.write('							<td><img src="images/teldap_logo.gif" alt="數位典藏與數位學習國家型科技計畫" height="28"></td>')
	document.write('							<td width="215">&nbsp;<a href="http://teldap.tw/" target="_blank" class="white">數位典藏與數位學習國家型科技計畫</a></td>')
	document.write('							<td width="7">&nbsp;</td>')
	document.write('							<td width="30"><img src="images/AS-logo.gif" alt="中央研究院" width="30" height="30"></td>')
	document.write('							<td width="90">&nbsp;<a href="http://www.sinica.edu.tw/" target="_blank" class="white">中央研究院</a></td>')
	document.write('							<td width="3">&nbsp;</td>')
	document.write('						</tr>')
	document.write('						<tr>')
	document.write('							<td>&nbsp;</td>')
	document.write('							<td colspan="5" align="center" valign="middle">')
	document.write('								<a href="http://daal.iis.sinica.edu.tw/" target="_blank" class="white">技術支援及網站維護&nbsp;&nbsp;DAAL&nbsp;數位典藏技術發展組')
	document.write('							</td>')
	document.write('							<td>&nbsp;</td>')
	document.write('						</tr>')
	document.write('						<tr>')
	document.write('							<td>&nbsp;</td>')
	document.write('							<td colspan="5" align="center" valign="middle">')
	document.write('								版權所有 All Rights Reserved')
	document.write('							</td>')
	document.write('							<td>&nbsp;</td>')
	document.write('						</tr>')

	document.write('					</table>')
	document.write('				</td>')
	document.write('				<td width="240" align="right" valign="bottom" class="tittles02">')
	document.write('					<a href="digiarch_privacy.html">隱私權聲明</a>&nbsp;|&nbsp;')
	document.write('					<a href="8.html" class="white">版權宣告</a>&nbsp;|&nbsp;')
	document.write('					<a href="digiarch_contact_member.html" class="white">聯絡我們</a>')
	document.write('				</td>')
	document.write('			</tr>')
	document.write('		</table>')
}
document.write('	</td>')
document.write('  </tr>')
}

/* ------------
頁 籤 開 始  2010/4/9 Modified
--------------- */

var defaultColor = "#FFFFFF"; //預設的顏色
//var colorArray = new Array("#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF"); //各頁籤所要用的顏色值
var currentLayer = new Array("tag1","tag7","tag11","tag13"); //作用中的頁籤
var currentDiv = new Array("d1","d7","d11","d13"); //作用中頁籤的頁面

//showLayer()函式，參數為觸發該函式的元素、所屬頁面ID及顏色索引
//function showLayer(obj,div,cIndex){ //頁籤頁面顏色不同才需傳送cIndex的值
function showLayer(obj,c){ //c為不同區域類別的index值
	var div = "d"+(obj.id).substring(3,(obj.id).length); //對應頁籤的顯示頁面
	//alert(obj.id+","+div);
	if(currentLayer[c]!=obj.id) { //若目前的currentLayer不等於obj.id 表示要換頁面
		showIt(currentLayer[c],currentDiv[c],false); //先改變原本頁籤及頁面的樣式
		//重設currentLayer及currentDiv的值
		currentLayer[c] = obj.id;
		currentDiv[c] = div;
		showIt(currentLayer[c],currentDiv[c],true); //最後再改變目前頁籤及頁面的樣式
	}
}

//showIt()函式，參數為currentLayer、currentDiv、colorArray的索引及模式
//mode為true時 則表示目前作用中 所以要顯示
//mode為false時 則表示目前非作用中 所以要隱藏
//function showIt(o,d,cIndex,mode){
function showIt(o,d,mode){
	var obj = document.getElementById(o);
	var div = document.getElementById(d);
	//改變className則表示改變該元素所用的class
	obj.className = mode?"active":"inactive";
	div.style.display = mode?"block":"none";

	//改變頁籤及頁面的背景顏色
	if(o=="tag15") obj.style.backgroundImage = mode?"url(images/tab_on_2.gif)":"url(images/tab_off_2.gif)";
	else obj.style.backgroundImage = mode?"url(images/tab_on2.gif)":"url(images/tab_off.gif)";
	div.style.backgroundColor = defaultColor;
	//obj.style.backgroundColor = mode?colorArray[cIndex]:defaultColor;
	//也可以直接寫div.style.backgroundColor = mode?colorArray[cIndex]:defaultColor;
}

/* ------------
Open and Close
--------------- */

function _display_obj(obj, status) {
	if(obj.style.display!=status)
		obj.style.display=status;
}

function Switch(obj) {
	_display_obj(obj, obj.style.display=="none"?"":"none");
}

/* ------
在線統計
--------- */

function WAU_small(b) {
	var a="";
	if(document.title) {
		a=encodeURIComponent(document.title)
	}
	document.write('<a href="http://whos.amung.us/stats/'+b+'/" target="_blank"><!--<img src="http://whos.amung.us/swidget/'+b+"/"+a+'" width="80" height="15" border="0" title="Click to see how many people are online" />-->&nbsp;</a>')
};

/* -----------
檢查FLASH版本
-------------- */

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_CheckFlashVersion(reqVerStr,msg){
  with(navigator){
    var isIE  = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
    var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
    if (!isIE || !isWin){  
      var flashVer = -1;
      if (plugins && plugins.length > 0){
        var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
        desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
        if (desc == "") flashVer = -1;
        else{
          var descArr = desc.split(" ");
          var tempArrMajor = descArr[2].split(".");
          var verMajor = tempArrMajor[0];
          var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
          var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
          flashVer =  parseFloat(verMajor + "." + verMinor);
        }
      }
      // WebTV has Flash Player 4 or lower -- too low for video
      else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;

      var verArr = reqVerStr.split(",");
      var reqVer = parseFloat(verArr[0] + "." + verArr[2]);
  
      if (flashVer < reqVer){
        if (confirm(msg))
          window.location = "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
      }
    }
  } 
}

