/* Copyright (C) 2001 Masaru Tanahashi*/
function ClickExe(Start,End,intMax,strPlus,strMinus,callhtml)
{
	if (End == -1){
		//最下層なのでリンクのみ
		if (callhtml.length != 0){ top.B.location.href=callhtml; }
		return;
	}
	lastitem = intMax;
	Count=0;
	i = parseInt(Start) + 1;
	if (document.layers) {
		Pos = parseInt(document.layers["t" + parseInt(Start)].top);
		if (document.layers["t" + i].visibility == "hide") {
			document.layers["t" + parseInt(Start)].document.images["i" + parseInt(Start)].src = strMinus;
			for (i=parseInt(Start)+1;i<=parseInt(End);i++){
				if (document.layers["t" + i].left == document.layers["t" + parseInt(Start)].left + 10) {
					document.layers["t" + i].visibility = "show";
					Pos = Pos + 20;
					document.layers["t" + i].top = Pos;
				} else {
					Count = Count + 1;
				}
			}
			for (i=parseInt(End)+1;i<=lastitem;i++){
				if (document.layers["t" + i].visibility == "show")
					document.layers["t" + i].top = document.layers["t" + i].top + 20 * (parseInt(End) - parseInt(Start) - Count);
			}
		} else {
			document.layers["t" + parseInt(Start)].document.images["i" + parseInt(Start)].src = strPlus;
			for (i=parseInt(Start)+1;i<=parseInt(End);i++){
				if (document.layers["t" + i].visibility == "hide") Count = Count + 1;
				if (i<parseInt(End)) {
					if (parseInt(document.layers["t" + (i + 1)].left) == parseInt(document.layers["t" + i].left) + 10) {
						document.layers["t" + i].document.images["i" + i].src = strPlus;
					}
				}
				document.layers["t" + i].visibility = "hide";
				document.layers["t" + i].top = Pos;
			}
			for (i=parseInt(End)+1;i<=lastitem;i++){
				if (document.layers["t" + i].visibility == "show")
					document.layers["t" + i].top = document.layers["t" + i].top - 20 * (parseInt(End) - parseInt(Start) - Count);
			}
		}
	}
	if (document.all) {
		Pos = parseInt(document.all("t" + parseInt(Start)).style.top);
		if (document.all("t" + i).style.visibility == "hidden") {
			document.images["i" + parseInt(Start)].src = strMinus;
			for (i=parseInt(Start)+1;i<=parseInt(End);i++){
				if (parseInt(document.all("t" + i).style.left) == parseInt(document.all("t" + parseInt(Start)).style.left) + 10) {
					document.all("t" + i).style.visibility = "visible";
					Pos = Pos + 20;
					document.all("t" + i).style.top = Pos;
				} else {
					Count = Count + 1;
				}
			}
			for (i=parseInt(End)+1;i<=lastitem;i++){
				if (document.all("t" + i).style.visibility == "visible") {
					Pos = parseInt(document.all("t" + i).style.top) + 20 * (parseInt(End) - parseInt(Start) - Count);
					document.all("t" + i).style.top = Pos;
				}
			}
		} else {
			document.images["i" + parseInt(Start)].src = strPlus;
			for (i=parseInt(Start)+1;i<=parseInt(End);i++){
				if (document.all("t" + i).style.visibility == "hidden") Count = Count + 1;
				if (i<parseInt(End)) {
					if (parseInt(document.all("t" + (i + 1)).style.left) == parseInt(document.all("t" + i).style.left) + 10) {
						document.images["i" + i].src = strPlus;
					}
				}
				document.all("t" + i).style.visibility = "hidden";
				document.all("t" + i).style.top = Pos;
			}
			for (i=parseInt(End)+1;i<=lastitem;i++){
				if (document.all("t" + i).style.visibility == "visible") {
					Pos = parseInt(document.all("t" + i).style.top) - 20 * (parseInt(End) - parseInt(Start) - Count);
					document.all("t" + i).style.top = Pos;
				}
			}
		}
	} else {
		if (document.getElementById) {
			Pos = parseInt(document.getElementById("t" + parseInt(Start)).style.top);
			if (document.getElementById("t" + i).style.visibility == "hidden") {
				document.images["i" + parseInt(Start)].src = strMinus;
				for (i=parseInt(Start)+1;i<=parseInt(End);i++){
					if (parseInt(document.getElementById("t" + i).style.left) == parseInt(document.getElementById("t" + parseInt(Start)).style.left) + 10) {
						document.getElementById("t" + i).style.visibility = "visible";
						Pos = Pos + 20;
						document.getElementById("t" + i).style.top = Pos;
					} else {
						Count = Count + 1;
					}
				}
				for (i=parseInt(End)+1;i<=lastitem;i++){
					if (document.getElementById("t" + i).style.visibility == "visible") {
						Pos = parseInt(document.getElementById("t" + i).style.top) + 20 * (parseInt(End) - parseInt(Start) - Count);
						document.getElementById("t" + i).style.top = Pos;
					}
				}
			} else {
				document.images["i" + parseInt(Start)].src = strPlus;
				for (i=parseInt(Start)+1;i<=parseInt(End);i++){
					if (document.getElementById("t" + i).style.visibility == "hidden") Count = Count + 1;
					if (i<parseInt(End)) {
						if (parseInt(document.getElementById("t" + (i + 1)).style.left) == parseInt(document.getElementById("t" + i).style.left) + 10) {
							document.images["i" + i].src = strPlus;
						}
					}
					document.getElementById("t" + i).style.visibility = "hidden";
					document.getElementById("t" + i).style.top = Pos;
				}
				for (i=parseInt(End)+1;i<=lastitem;i++){
					if (document.getElementById("t" + i).style.visibility == "visible") {
						Pos = parseInt(document.getElementById("t" + i).style.top) - 20 * (parseInt(End) - parseInt(Start) - Count);
						document.getElementById("t" + i).style.top = Pos;
					}
				}
			}
		}
	}
	if (callhtml.length != 0){ top.B.location.href=callhtml; }
}

