function horse_toString() {
	str = '<a id="'
		+ this.abbr
		+ '"><table border="1" class="horse">'
		+ '<tr><td colspan="2" class="horsename">'
		+ this.name
		+ '</td><td class="horse">略号：'
		+ this.abbr
		+ '</td><td class="horse">'
		+ this.sex + this.age
		+ '</td><td rowspan="4"><img src="horse/'
		+ this.abbr
		+ '.jpg" alt="'
		+ this.name
		+ '" /></tr><tr><td class="horse">'
		+ this.breed
		+ '</td><td class="horse">'
		+ this.color
		+ '</td><td colspan="2">'
		+ this.birth.getFullYear()
		+ '.'
		+ (this.birth.getMonth() + 1)
		+ '.'
		+ this.birth.getDate()
		+ '生</td></tr><tr><td class="horse2" colspan="2">父：'
		+ this.sire
		+ '<br />母：'
		+ this.mare
		+ '</td><td colspan="2">'
		+ this.enter.getFullYear()
		+ '.'
		+ (this.enter.getMonth() + 1)
		+ '.'
		+ this.enter.getDate()
		+ '入厩</td></tr><tr><td colspan="2">';
	
	if ( this.charge != '' ) {
		str = str
			+ '責任者：'
			+ this.charge;
	}
		
	str = str
	
	        + '</td><td colspan="2">';
	
	if ( this.sub != '' ) {
		str = str
			+ 'サブ：'
			+ this.sub;
	}
		
	str = str
	
	        + '</td></tr><td colspan="8">'
	        + 'コメント:<br />'
	        + this.comment
	        + '</td></tr></table></a>';
	
	return str;
}

function horse(name, abbr, sex, birth, enter, breed, color, sire, mare, charge, sub,comment) {
	/*
		name	:名前
		abbr	:略号
		sex	:性別
		birth	:生年月日
		enter	:入厩日
		breed	:品種
		color	:毛色
		sire	:父
		mare	:母
		charge	:責任者
		sub	:サブ
	*/
	this.toString = horse_toString;
	this.name = name;
	this.abbr = abbr;
	this.sex = sex;
	this.birth = birth;
	this.age = 2011 - this.birth.getFullYear();
	if (abbr=='Gm') {
        this.age=19
        }
        if (abbr=='Ap') {
        this.age=28
        }
        if (abbr=='Ka') {
        this.age=16
        } 
        this.enter = enter;
	this.breed = breed;
	this.color = color;
	this.sire = sire;
	this.mare = mare;
	this.charge = charge;
	this.sub = sub;
	this.comment = comment;
}

horses = new Array();
horses.push(new horse(
	'アナスターシャ',
	'At',
	'牝',
	new Date(2001, 2, 29),
	new Date(2005, 8, 23),
	'サラ',
	'青鹿毛',
	'サクラローレル',
	'ロングフルムーン',
	'川嶋 麻子',
	'伊田 知里',
	'京大馬術部で唯一の青鹿毛です。きれいなお姉さんは好きですか？'
	));

horses.push(new horse(
	'センテニアルウィル',
	'Cw',
	'セン',
	new Date(1992, 3, 14),
	new Date(1995, 10, 19),
	'サラ',
	'芦毛',
	'ウィナーズサークル',
	'シンキタシバツバメ',
	'都築 茉奈',
	' ',
	'白いお馬さん。年齢とおなかの大きさが貫禄の証。'
	));

horses.push(new horse(
	'京皐月',
	'Ks',
	'牡',
	new Date(2005, 5, 30),
	new Date(2008, 8, 13),
	'サラ',
	'鹿毛',
	'ゴールドアリュール',
	'チャンジイ',
	'白木 善英',
	' ',
	'今をときめく角居厩舎出身の彼。ただいま鼻下＆肉体改造中。'
	));

horses.push(new horse(
	'ダイオウ',
	'Do',
	'セン',
	new Date(1996, 3, 26),
	new Date(2000, 10, 23),
	'サラ',
	'鹿毛',
	'ウイニングチケット',
	'セラード',
	'森本 泰地',
	' ',
	'名前が覚えやすく、体もおっきいので大学の職員さんにもファンがおられるとの噂。'
	));

horses.push(new horse(
	'フェイバータッチ',
	'Ft',
	'セン',
	new Date(1997, 2, 14),
	new Date(2003, 7, 13),
	'サラ',
	'黒鹿毛',
	'ワッスルタッチ',
	'フレイバーギフト',
	'橋本 嵩広',
	' ',
	'京大主将の愛馬＝フェイバータッチ…からイメチェンして主務を悩ます馬＝フェイバータッチに。'
	));

horses.push(new horse(
	'京楓',
	'Kd',
	'セン',
	new Date(1995, 2, 25),
	new Date(2003, 7, 13),
	'サラ',
	'鹿毛',
	'Gulch',
	'Le Famo',
	'山口 真以',
	'前原 一輝',
	'馬場の主戦馬として活躍しています。すごい臆病なのでおどかさないであげて下さい。'
	));

horses.push(new horse(
	'鞠小路',
	'Mk',
	'セン',
	new Date(2000, 2, 1),
	new Date(2005, 1, 10),
	'サラ',
	'鹿毛',
	'ティンバーカントリー',
	'フレイバーギフト',
	'新倉 美穂',
	' ',
	'とにかくくいしんぼうバンザイです。新歓パンフレットでも一頭だけデフォルメされたりと何かと愛されてます。'
	));

horses.push(new horse(
	'ラプタス',
	'Rp',
	'セン',
	new Date(1994, 5, 10),
	new Date(2001, 8, 1),
	'サラ',
	'栗毛',
	'ノーザンテースト',
	'ブロンドインナモーテル',
	'佐々木 悠介',
	'村上 央弥',
	'５年連続で全日本学生に出場するなどエースの地位を確立しました。ことしの全学も頑張ります！！'
	));

horses.push(new horse(
	'アンチェインド',
	'Uc',
	'セン',
	new Date(1997, 2, 31),
	new Date(2005, 6, 15),
	'アア',
	'黒鹿毛',
	'センターセフト',
	'センターピュア',
	'馬場 南',
	' ',
	'骨折から見事に復帰し、１回生全員で担当しています。マイペースでエサに貪欲。'
	));

horses.push(new horse(
	'フロストフラワー',
	'Ff',
	'牝',
	new Date(2002, 4, 4),
	new Date(2007, 3, 19),
	'サラ',
	'鹿毛',
	'ラムタラ',
	'ノースオブダンジグ',
	'正田 佑',
	'賀川 こころ、藤井 慎太郎',
	'馬術部のアイドルの座をAtからうばいとった（？）彼女。京大馬術部の次世代。'
	));

horses.push(new horse(
	'キャンベラ',
	'Cb',
	'セン',
	new Date(2001, 8, 7),
	new Date(2007, 4, 7),
	'サラ',
	'鹿毛',
	'ウッドマン',
	'ソーレナ',
	'佐々木 悠介',
	'米倉 裕哉',
	'ちっこい体に溢れるパワー。京大馬術部次世代の障害ルーキー。'
	));

horses.push(new horse(
	'駒王丸',
	'Km',
	'セン',
	new Date(2000, 2, 12),
	new Date(2007, 11, 10),
	'サラ',
	'黒鹿毛',
	'シアトリカル',
	'トランキルデイズ',
	'塩田　嶺明',
	'岩谷 未紘、柏木 理沙',
	'サラブレッド表記をしてありますが本当は国産黒毛和牛です。ウソです。アメリカ産です。'
	));

horses.push(new horse(
	'トルバドゥール',
	'Td',
	'セン',
	new Date(2001, 2, 4),
	new Date(2008, 0, 10),
	'サラ',
	'栗毛',
	'ダンスインザダーク',
	'スカーレットローズ',
	'山口 真以',
	'市原 功太郎',
	'競馬ファンのかたが見学されると、京大にいたのかと驚かれることもある良血。スカーレット一族。'
	));

horses.push(new horse(
	'メテオラ',
	'Mt',
	'セン',
	new Date(2003, 2, 28),
	new Date(2008, 2, 10),
	'サラ',
	'鹿毛',
	'アグネスタキオン',
	'スプラッシュクイン',
	'正田 佑',
	' ',
	'性格や風貌など前々責任者とそっくりだと思います。現在骨折療養中のためメタボ化。'
	));

horses.push(new horse(
	'京欅',
	'Ky',
	'セン',
	new Date(2007, 4, 10),
	new Date(2009, 5, 21),
	'サラ',
	'栗毛',
	'カリズマティック',
	'マイネオルビット',
	'梅田 美紀',
	' ',
	'まだ3才なので食事も特別メニューです。早くもこの夏試合デビューも果たし、注目の出世株！'
	));

horses.push(new horse(
	'台嶺',
	'Tr',
	'セン',
	new Date(2002, 3, 27),
	new Date(2010, 1, 17),
	'サラ',
	'鹿毛',
	'エアダブリン',
	'コメンス',
	'山本 捷馬',
	' ',
	'責任者のプロデュースにより思わぬキャラに（ブログ参照）。そのかいあって人気上昇中との噂も。'
	));

horses.push(new horse(
	'セルティフィカ',
	'Cf',
	'牝',
	new Date(1999, 5, 2),
	new Date(2011, 8, 27),
	'サラ',
	'鹿毛',
	'クエストフォベスト',
	'シューバロック',
	'佐藤 将',
	' ',
	'今年から京大に仲間入りした3頭目の牝馬。ガチムチプリティ'
	));

horses.push(new horse(
	'ジェブロスター',
	'Js',
	'セン',
	new Date(1993, 2, 12),
	new Date(2000, 8, 13),
	'サラ',
	'栗毛',
	'エブロス',
	'キートウザキープ',
	'',
	'',
	'2011年9月4日をもって岡山乗馬クラブへ旅立ちました。新天地でも活躍してくれるでしょう。じょべ〜'
	));			 

horses.push(new horse(
	'京葵',
	'Ka',
	'セン',
	new Date(1993, 3, 12),
	new Date(2000, 0, 7),
	'サラ',
	'鹿毛',
	'リアルシャダイ',
	'メインゲスト',
	'',
	'',
	'馬場や障碍をオールマイティーにこなし新入生や１回生の練習、近年は馬場予選に出場するなど頼もしい存在でした。<br/>２００９年５月２３日京都大学馬場にて死亡'
	));

horses.push(new horse(
	'梅太郎',
	'Um',
	'セン',
	new Date(1998, 3, 5),
	new Date(2006, 10, 19),
	'サラ',
	'鹿毛',
	'コマンダーインチーフ',
	'ホッコーオウカ',
	'',
	'',
	'2007年の春関新人戦障碍入賞を果たすなど活躍を期待されていましたが、長期間蟻洞に悩まされ2009年1月に離厩致しました。<br/>現在は高宮ライディングパークにて繋養されています。'
	));
		
horses.push(new horse(
	'アポイリージ',
	'Ap',
	'牡',
	new Date(1981,05,29),
	new Date(1984,09,16),
	'サラ',
	'鹿毛',
	'ロードリージ',
	'ラブハンター',
	'',
	'',
	'過去に馬場予選出場19回、８回も全日本学生に出場するなど長年にわたって京大の学典馬とて活躍してきてくれました。<br/>北海道の岩井牧場様にて余生を過ごしていましたが、2009年11月15日に亡くなりました。'
	));
		
horses.push(new horse(
	'グローバルマインド',
	'Gm',
	'牡',
	new Date(1988, 2, 29),
	new Date(1994, 3, 15),
	'サラ',
	'鹿毛',
	'ロイヤルスキー',
	'グローバルダイナ',
	'',
	'',
	'過去三度全学に出場。<br/>長年主戦馬として障害、総合で活躍するだけでなく、<br/>下回生の障害飛越競技においても頼もしい存在でした。</br>平成19年12月6日疝痛により京都乗馬クラブにて死亡。'
	));

function writehorse(min, max) {
	for( i=min; i<=max; i++) {
		document.write(horses[i]);
	}
	document.close();
}

function writeabbr(min, max, file) {
	for( i=min; i<=max; i++) {
		document.write('<a href="'
			+ file
			+ '#'
			+ horses[i].abbr
			+ '">'
			+ horses[i].abbr
			+ '</a> '
		);
	}
	document.close();
}
