﻿function mylevel(id) {
	if (id == 0) {
		return "./";
	} else if (id == 1) {
		return "../";
	} else {
		return "./";
	}
}


function link_home(level) {
	top.location.href = mylevel(level) + "home/homepage.html";
}

function link_aboutus(level) {
	//top.location.href = mylevel(level) + "aboutus/sra.html";
}

function link_article(level) {
	window.open("/others/articles.html", "_blank");
}

function link_sra(level) {
	top.location.href = mylevel(level) + "aboutus/sra.html";
}

function link_sdba(level) {
	top.location.href = mylevel(level) + "aboutus/sdba.html";
}

function link_chairman(level) {
	top.location.href = mylevel(level) + "aboutus/chairman2010.html";
}

function link_circuscapital(level) {
	top.location.href = mylevel(level) + "aboutus/circuscapital.html";
}

function link_circuscapitalmsg(level) {
	top.location.href = mylevel(level) + "aboutus/circuscapitalmsg2006.html";
}

function link_committee(level) {
	//window.alert("Coming Soon: Organization Committee");
	top.location.href = mylevel(level) + "aboutus/committee2004.html";
}

function link_heritage(level) {
	//window.alert("Heritage");
}

function link_eventhistory(level) {
	top.location.href = mylevel(level) + "heritage/thoseday.html";
}

function link_speciality(level) {
	top.location.href = mylevel(level) + "heritage/special.html";
}

function link_legend(level) {
	top.location.href = mylevel(level) + "heritage/origin.html";
}

function link_chekchu(level) {
	top.location.href = mylevel(level) + "heritage/chekchu.html";}


function link_whatnew(level) {
	//top.location.href = mylevel(level) + "whatnew/news.html";
}

function link_latestnews(level) {
	top.location.href = mylevel(level) + "whatnew/news.html";
}

function link_pressreleases(level) {
	top.location.href = mylevel(level) + "whatnew/pressreleases.html";

}

function link_dbr() {
	//window.alert("Dragon Boat Racing 2003");
}

function link_eventdate(level) {
	top.location.href = mylevel(level) + "dbr/eventdate.html";
}

function link_schedules(level) {
	top.location.href = mylevel(level) + "dbr/schedule.html";
	//window.alert("Coming Soon: Schedules");
}

function link_teamlists(level) {
	top.location.href = mylevel(level) + "dbr/teamlist.html";
}

function link_topteamlists(level) {
	top.location.href = mylevel(level) + "dbr/topteamlist.html";
}


function link_racingmanual(level) {
	top.location.href = mylevel(level) + "dbr/manual.html";
}

function link_siteplan(level) {
	top.location.href = mylevel(level) + "dbr/siteplan.html";
}

function link_boatspecification(level) {
	top.location.href = mylevel(level) + "dbr/boatspecification.html";
}

function link_raceresult(level) {
	top.location.href = mylevel(level) + "dbr/results2010.html";
}

function link_applicationforms(level) {
	top.location.href = mylevel(level) + "dbr/entry.html";
}

function link_specialoffer(level) {
	top.location.href = mylevel(level) + "dbr/specialoffers.html";
}

//short course invitational
function link_shortcourse(level) {
	//top.location.href = mylevel(level) + "../shortcourse/shortcourse2004.html";
	path = mylevel(level) + "../shortcourse/shortcourse2010.html";
	window.open(path, "_blank");
}

function link_souvnir(level) {
	//window.alert("Coming Soon: Souvnir");
	top.location.href = mylevel(level) + "dbr/souvenir.html";
}

function link_media(level) {
	top.location.href = mylevel(level) + "whatnew/pressreleases.html";
}

function link_photoalbum(level) {
	//path = mylevel(level) +  "../en/eventphoto/photoalbum/2004/index.html";
	//window.open(path, "_blank");
	top.location.href = mylevel(level) + "eventphoto/event2006.html";
}

function link_eventphotos(level) {
	top.location.href = mylevel(level) + "eventphoto/event2003.html?1";
}

function link_pasteventphotos(level) {
//	top.location.href = mylevel(level) + "eventphoto/event2002.html?1";
	top.location.href = "http://vr2ham-hk.com/index/dragon.htm";
}

function link_sponsorship(level) {
	top.location.href = mylevel(level) + "sponsorship/sponsors.html";
}

function link_links(level) {
	top.location.href = mylevel(level) + "links/links.html";
}

function link_contactus(level) {
	top.location.href = mylevel(level) + "contactus/contactus.html";
}

function copyright() {
	st = "";
	st = "&copy; 赤柱龍舟協會 版權所有";
	document.write("<p><font face='arial' size=1>" + st + "</font>");
}

function back() {
	var st = "";
	st += "<div align=right><a href=\"javascript:history.go(-1);\">< ¤Ϧ^«e­¶</a></div>";
	document.write(st);
}

function back_chekchu() {
	var st = "";
	st += "<div align=right><a href=\"javascript:history.go(-1);\">< ¤Ϧ^«e­¶</a></div>";
	document.write(st);
}


function back_origin() {
	var st = "";
	st += "<div align=right><a href=\"javascript:history.go(-1);\">< ¤Ϧ^«e­¶</a></div>";
	document.write(st);
}

function mytop() {
	var st = "";
	st += "<div align=right><a href=\"#mytop\"><img src=\"../menu/pix/button_up.gif\" alt=\"\" width=15 height=15 border=0></a></div>";
	document.write(st);
}

function popupnoscoll(name,newUrl,width,height,x,y){
	if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion >= "4.0") {
		mywin = window.open(newUrl,name,'status=0,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no,height='+height+',width='+width+',left='+x+',top='+y+'');
		mywin.focus();
	} else {
		mywin = window.open(newUrl,name,'status=0,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no,height='+height+',width='+width+',screenx='+x+',screeny='+y+'');
		mywin.focus();
	}
	return mywin;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


// added on 26-5-2006 Arnold
function link_memo(level) {
	top.location.href = mylevel(level) + "dbr/entry.html";
}
