<!--
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 NewWindow(mypage, myname, w, h, scroll,resizable) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable='+resizable+','
win = window.open(mypage, myname, winprops)
win.self.focus()
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}



function ParaOver(CaoPhong) {
  CaoPhong.style.backgroundColor=bgcolor[level0];
}
function ParaOut(CaoPhong) {
  CaoPhong.style.backgroundColor="transparent";
}

function chlang(lang, lang2){
	if (lang == "chi" && lang2 == "eng"){	
		window.location.href = window.location.href.replace("eng","chi");
	}
	if (lang == "eng" && lang2 == "chi"){	
		window.location.href = window.location.href.replace("chi","eng");
	}	
}

function callFlash(){
	document.write('          <td align="center" bgcolor="#FFFFFF">	<div id="flashcontent">This text is replaced by the Flash movie.</div>');
	var so = new SWFObject("flash/banner1.swf", "mymovie", "240", "140", "7", "#FFFFFF");
	so.write("flashcontent");
}

function title(name,name2){
	var title_alt;
	if (name2=="")		title_alt = eval("Menu_"+level1)[level2];
	else				title_alt = name2;
	
	document.write('					<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-bottom:16px; margin-top:5px;">');
	document.write('                        <tr>');
	document.write('                          <td style="background-image:url(images/title_line.gif); background-position:bottom left; background-repeat:no-repeat; padding-bottom:10px;"><img src="images/title_'+name+'.gif" alt="'+title_alt+'" hspace="16"></td>');
	document.write('                        </tr>');
	document.write('                      </table>');
}

function GetParam(name){
  var start=location.search.indexOf("?"+name+"=");
  if (start<0) start=location.search.indexOf("&"+name+"=");
  if (start<0) return '';
  start += name.length+2;
  var end=location.search.indexOf("&",start);
//var end=location.search.indexOf("&",start)-1;
  if (end<0) end=location.search.length;
  var result='';
  for(var i=start;i<end;i++) {
    var c=location.search.charAt(i);
    result=result+(c=='+'?' ':c);
  }
  return unescape(result);
}

function isset(varname){
  return(typeof(window[varname])=='undefined');
}

function forbidRightMouse(evt){
	if (evt)
		evt.preventDefault();               //dom2的事件模型，主要針對firefox/sofari
	else
		window.event.returnValue = false;   //IE的事件模型
}    
 
function validate_email(field,alerttxt){
	with (field){
		apos=value.indexOf("@")
		dotpos=value.lastIndexOf(".")
		if (value.length-1 == dotpos){
			return false
		}
		if (apos<1||dotpos-apos<2){
			return false
		} else {
			return true
		}
	}
}

/*
function check_countactus_form(thisform) {
with (thisform){
	if (document.contact_us.subject.value.length < 1){
		document.contact_us.subject.focus();
		alert("請填寫標題"); 
	} else	if (document.contact_us.name.value.length < 1){
		document.contact_us.name.focus();
		alert("請填寫你的姓名");
	} else	if (document.contact_us.m_email.value.length >= 1){
//alert(validate_email(document.contact_us.m_email));
		if (validate_email(document.contact_us.m_email) == false){
			document.contact_us.m_email.focus();
			alert("請選寫正確的電郵地址");
		}
	} else	if (document.contact_us.message.value.length < 1){
		document.contact_us.message.focus();
		alert("請填寫內容");
	} else {
		document.contact_us.submit();
	}
}
}

*/

function validate_required(field,alerttxt){
	with (field){
	  if (value==null||value==""){
		  alert(alerttxt);
		  return false
	  } else {return true}
	}
}

function validate_form(thisform){
	with (thisform){
	  if (validate_required(subject,"請填寫標題")==false){
		  subject.focus();
		  return false
	  } else if (validate_required(name,"請填寫你的姓名")==false){
		  name.focus();
		  return false
	  } else if (m_email.value.length >= 1 && validate_email(m_email) == false){
		  document.contact_us.m_email.focus();
		  alert("請選寫正確的電郵地址");
		  return false			
	  } else if (validate_required(message,"請填寫內容")==false){
		  message.focus();
		  return false
	  }
	}
}

function act_menu_bar1(group,current_n){
	var nc =new Array();
	var ny =new Array();
	var nf =new Array();
	var id=0;
	id++;	nc[id] = ["09年7-9月","activities_c.htm"];
	id++;	nc[id] = ["09年4-6月","activities_c0904.htm"];
	id++;	ny[id] = ["09年7-9月","activities_y.htm"];
	id++;	ny[id] = ["09年4-6月","activities_y0904.htm"];


	document.write('					<table width="100%"  border="0" cellspacing="0" cellpadding="0">');
	document.write('                      <tr>');
	document.write('                        <td align="right" class="content_03">選擇期數：');
	for (i=1; i<nc.length; i++){
		if (i>1)	document.write('&nbsp;|&nbsp;');
		if (i == current_n){		document.write('<span class="menu_bar_1_on">'+nc[i][0]+'</span>');
		} else {					document.write('<a href="'+nc[i][1]+'"  class="menu_bar_1">'+nc[i][0]+'</a>');
		}
	}
	document.write('	</td>');
	document.write('                      </tr>');
	document.write('                    </table>');
}


function act_menu_bar(group,current_n){
	var nc = new Array();
	var ny =new Array();
	var nf =new Array();
	var start = new Array();
	start["c"] = 11;
	nc[11] = ["09年4-6月","activities_c0904.htm"];
	nc[12] = ["09年7-9月","activities_c0907.htm"];
	nc[13] = ["09年10-12月","activities_c0910.htm"];
	nc[14] = ["10年1-4月","activities_c1001.htm"];
	nc[15] = ["10年5-9月","activities_c.htm"];
	start["y"] = 11;
	ny[11] = ["09年4-6月","activities_y0904.htm"];
	ny[12] = ["09年7-9月","activities_y0907.htm"];
	ny[13] = ["09年10-12月","activities_y0910.htm"];
	ny[14] = ["10年1-4月","activities_y1001.htm"];
	ny[15] = ["10年5-9月","activities_y.htm"];
	start["f"] = 11;
	nf[11] = ["09年4-6月","activities_f0904.htm"];
	nf[12] = ["09年7-9月","activities_f0907.htm"];
	nf[13] = ["09年10-12月","activities_f0910.htm"];
	nf[14] = ["10年1-4月","activities_f1001.htm"];
	nf[15] = ["10年5-9月","activities_f.htm"];

	document.write('					<table width="100%"  border="0" cellspacing="0" cellpadding="0">');
	document.write('                      <tr>');
	document.write('                        <td align="right" class="content_03">選擇期數：');
	if (group == "c"){
		for (i=nc.length-1; i>start["c"]-1; i--){
			if (i<nc.length-1)	document.write('&nbsp;|&nbsp;');
			if (i == current_n){		document.write('<span class="menu_bar_1_on">'+nc[i][0]+'</span>');
			} else {					document.write('<a href="'+nc[i][1]+'"  class="menu_bar_1">'+nc[i][0]+'</a>');
			}
		}
	} else if (group == "y"){
		for (i=ny.length-1; i>start["y"]-1; i--){
			if (i<ny.length-1)	document.write('&nbsp;|&nbsp;');
			if (i == current_n){		document.write('<span class="menu_bar_1_on">'+ny[i][0]+'</span>');
			} else {					document.write('<a href="'+ny[i][1]+'"  class="menu_bar_1">'+ny[i][0]+'</a>');
			}
		}
	} else if (group == "f"){
		for (i=nf.length-1; i>start["f"]-1; i--){
			if (i<nf.length-1)	document.write('&nbsp;|&nbsp;');
			if (i == current_n){		document.write('<span class="menu_bar_1_on">'+nf[i][0]+'</span>');
			} else {					document.write('<a href="'+nf[i][1]+'"  class="menu_bar_1">'+nf[i][0]+'</a>');
			}
		}
	}
	document.write('	</td>');
	document.write('                      </tr>');
	document.write('                    </table>');
}

function content(version,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10){
	var page = new Array();
	var img_width;

	if (level1==5){
		img_width = 810;
	} else {
		img_width = 650;
	}
	
	page = [p1,p2,p3,p4,p5,p6,p7,p8,p9,p10];
	
	
	document.write('	<table width="100%" border="0" cellspacing="0" cellpadding="0">');
	document.write('      <tr>');
	document.write('        <td>');

	for (i=0;i<page.length;i++){
		if (page[i]>0){
			document.write('<a href="images/booklet/'+version+'/ch_booklet_'+version+'_'+page[i]+'.jpg" target="_blank"><img src="images/booklet/ch_booklet_'+version+'_'+page[i]+'.jpg" width="'+img_width+'" border=0 title="放大"></a><br><br>');
		}
	}

	document.write('	    </td>');
	document.write('      </tr>');
	document.write('     </table>');
	document.write('  <p>註：活動資料或會有所更改，詳情請直接向本中心職員查詢。</p>');
}

-->


