﻿/**search function*/

var sait_domain = "http://" + document.domain;
var full_path = location.href;
var url_protocol = "";
if(full_path.indexOf("https") == -1)
{
	url_protocol = "http://";
}
else
{
	url_protocol = "https://";
}

function sNav(cn,hn,sn){
document.write ("\
<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase=url_protocol +  'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width=160 height=365>\
<param name='movie' value='/tw/images/abt_snav0"+cn+".swf?hn="+hn+"&sn="+sn+"'>\
<param name='quality' value='high'>\
<embed src='/tw/images/abt_snav0"+cn+".swf?hn="+hn+"&sn="+sn+"' quality='high' pluginspage=url_protocol + 'www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width=160 height=365></embed></object>\
");
}

u0="/tw/";

u1=u11="/tw/about/people/";
u12="/tw/about/people/teachers/";
u13="/tw/about/people/staff/";

u2=u21="/tw/about/organization/";
u22="/tw/about/organization/culturalorganization/";
u23="/tw/about/organization/charitableassociation/";
u24="/tw/about/organization/future/";

u3=u31="/tw/about/foundation/";
u32=u321="/tw/about/foundation/about/";
u322="/tw/about/foundation/history/";
u323="/tw/about/foundation/services/";
u33=u331="/tw/about/foundation/activities/2009/";
u332="/tw/about/foundation/activities/over_year/";
u333="/tw/about/foundation/photos/";
u34=u341="/tw/about/foundation/volunteer/";
u342="/tw/about/foundation/volunteer/services/";
u343="/tw/about/foundation/volunteer/share/";
u344="/tw/about/foundation/volunteer/join/application_form.doc";
u35=u351="/tw/about/foundation/hike/";
u352="/tw/about/foundation/hike/introduce/";
u353="/tw/about/foundation/hike/month/";
u36="/tw/about/foundation/cooperation/";
u37="/tw/about/foundation/link/";


function link(){
	var url = "";
	var depth = arguments.length;
	try {
		if(depth==0) return;

		else if(depth==1) url = eval("u"+arguments[0]);
		else if(depth==2) url = eval("u"+arguments[0]+arguments[1]);
		else if(depth==3) url = eval("u"+arguments[0]+arguments[1]+arguments[2]);
		else if(depth==4) url = eval("u"+arguments[0]+arguments[1]+arguments[2]+arguments[3]);

		if(url=="") alert("找不到該網頁");
		else 
		{
			location.href = sait_domain + url;
		}

	}catch(e) { alert("找不到該網頁"); }
}
