// URLの最後の文字列を指定する
// アドレス、リンク文字列、Aタグのオプション
var a = new Array();
a[0] = new epgLink('/epg/', 'ホーム', '');
a[1] = new epgLink('/epg/keywordsearch.htm', 'キーワード検索',
					'title="キーワードで見たい番組を一発検索" target="_self"');
a[2] = new epgLink('/cgi-bin/rat2.pl', 'チャンネル番号で選ぶ番組表',
					'target="_self"');
a[3] = new epgLink('/cgi-bin/rat.pl', 'チャンネル名で選ぶ番組表',
					'target="_self"');
a[4] = new epgLink('/~katoh/', '山の写真', 'target="_self"');

document.write('<center><table width="680"><tr><td bgcolor="#FFFFFF" valign="middle" align="center"><font size="2">');

for (var i = 0; i < a.length; i++) {
	if (i != 0) document.write(' | ');
	if (document.location.href.lastIndexOf(a[i].url) + a[i].url.length
		== document.location.href.length)
		document.write(a[i].str);
	else
		document.write('<a href="' + a[i].url + '" ' + a[i].opt
		               + '>' + a[i].str + '</a>');
}

document.write('</font><a href="/"><img border="0" src="/epg/skyperfectimetable.GIF" width="600" height="31" title="サピエンスのホームページへ"></a></td></tr>');
document.writeln('</table></center>');

function epgLink(url, str, opt) {
	this.url = url;
	this.str = str;
	this.opt = opt;
}
