function RandomBall() {

	numX = Math.ceil(Math.random()*43) ;
	if (numX < 10) {
		document.ballL6.src = "images/tama200_0" + numX + ".gif" ;
	} else {
		document.ballL6.src = "images/tama200_" + numX + ".gif" ;
	}

	numX = Math.ceil(Math.random()*31) ;
	if (numX < 10) {
		document.ballML.src = "images/tama200_0" + numX + ".gif" ;
	} else {
		document.ballML.src = "images/tama200_" + numX + ".gif" ;
	}
}

function ChgBallL6() {

	L6Balls = new Array(7);

	for (i = 0; i < 6; i++) {
		num1 = Math.random() * 43;
		numX = Math.ceil(num1) ;
		if (numX < 10) {
			L6Balls[i] = "0" + numX ;
		} else {
			L6Balls[i] = numX ;
		}

		for (j = 0; j < i; j++) {
			if (L6Balls[i] == L6Balls[j]) {
			  i--;
        break;
			}
		}
	}

	document.L6ball1.src = "images/dot1.gif" ;
	document.L6ball2.src = "images/dot1.gif" ;
	document.L6ball3.src = "images/dot1.gif" ;
	document.L6ball4.src = "images/dot1.gif" ;
	document.L6ball5.src = "images/dot1.gif" ;
	document.L6ball6.src = "images/dot1.gif" ;
	setTimeout('L6chg1()',600);

}

function L6chg1() { document.L6ball1.src = "images/tama30_" + L6Balls[0] + ".gif" ;
										setTimeout('L6chg2()',400);}
function L6chg2() { document.L6ball2.src = "images/tama30_" + L6Balls[1] + ".gif" ;
										setTimeout('L6chg3()',400);}
function L6chg3() { document.L6ball3.src = "images/tama30_" + L6Balls[2] + ".gif" ;
										setTimeout('L6chg4()',400);}
function L6chg4() { document.L6ball4.src = "images/tama30_" + L6Balls[3] + ".gif" ;
										setTimeout('L6chg5()',400);}
function L6chg5() { document.L6ball5.src = "images/tama30_" + L6Balls[4] + ".gif" ;
										setTimeout('L6chg6()',400);}
function L6chg6() { document.L6ball6.src = "images/tama30_" + L6Balls[5] + ".gif" ;
										L6Balls.sort();
										setTimeout('L6chg1s()',1000);
}
function L6chg1s() { document.L6ball1.src = "images/tama30_" + L6Balls[0] + ".gif" ;
										setTimeout('L6chg2s()',40);}
function L6chg2s() { document.L6ball2.src = "images/tama30_" + L6Balls[1] + ".gif" ;
										setTimeout('L6chg3s()',40);}
function L6chg3s() { document.L6ball3.src = "images/tama30_" + L6Balls[2] + ".gif" ;
										setTimeout('L6chg4s()',40);}
function L6chg4s() { document.L6ball4.src = "images/tama30_" + L6Balls[3] + ".gif" ;
										setTimeout('L6chg5s()',40);}
function L6chg5s() { document.L6ball5.src = "images/tama30_" + L6Balls[4] + ".gif" ;
										setTimeout('L6chg6s()',40);}
function L6chg6s() { document.L6ball6.src = "images/tama30_" + L6Balls[5] + ".gif" ;
}


function ChgBallML() {

	MLBalls = new Array(7)

	for (i = 0; i < 5; i++) {
		num1 = Math.random() * 31;
		numX = Math.ceil(num1) ;
		if (numX < 10) {
			MLBalls[i] = "0" + numX ;
		} else {
			MLBalls[i] = numX ;
		}

		for (j = 0; j < i; j++) {
			if (MLBalls[i] == MLBalls[j]) {
			  i--;
        break;
			}
		}
	}

	document.MLball1.src = "images/dot1.gif" ;
	document.MLball2.src = "images/dot1.gif" ;
	document.MLball3.src = "images/dot1.gif" ;
	document.MLball4.src = "images/dot1.gif" ;
	document.MLball5.src = "images/dot1.gif" ;
	setTimeout('MLchg1()',600);

}

function MLchg1() { document.MLball1.src = "images/tama30_" + MLBalls[0] + ".gif" ;
										setTimeout('MLchg2()',400);}
function MLchg2() { document.MLball2.src = "images/tama30_" + MLBalls[1] + ".gif" ;
										setTimeout('MLchg3()',400);}
function MLchg3() { document.MLball3.src = "images/tama30_" + MLBalls[2] + ".gif" ;
										setTimeout('MLchg4()',400);}
function MLchg4() { document.MLball4.src = "images/tama30_" + MLBalls[3] + ".gif" ;
										setTimeout('MLchg5()',400);}
function MLchg5() { document.MLball5.src = "images/tama30_" + MLBalls[4] + ".gif" ;
										MLBalls.sort();
										setTimeout('MLchg1s()',1000);
}
function MLchg1s() { document.MLball1.src = "images/tama30_" + MLBalls[0] + ".gif" ;
										setTimeout('MLchg2s()',40);}
function MLchg2s() { document.MLball2.src = "images/tama30_" + MLBalls[1] + ".gif" ;
										setTimeout('MLchg3s()',40);}
function MLchg3s() { document.MLball3.src = "images/tama30_" + MLBalls[2] + ".gif" ;
										setTimeout('MLchg4s()',40);}
function MLchg4s() { document.MLball4.src = "images/tama30_" + MLBalls[3] + ".gif" ;
										setTimeout('MLchg5s()',40);}
function MLchg5s() { document.MLball5.src = "images/tama30_" + MLBalls[4] + ".gif" ;}


function ImgchgNV(CLR, SW) {
	if (SW == 'ON') {
		document.images[CLR].src = "images/tama30_" + CLR + ".gif" ;
	} else {
		document.images[CLR].src = "images/tama30g_" + CLR + ".gif";
	}
}

function wopn(url,w,h) {
   var newW;
   newW=window.open("",url,"width="+w+",height="+h+",scrollbars=yes,resizable=yes,");
   newW.location.href = "http://park18.wakwak.com/~sien/" + url + ".htm";
}
function wopnKK(url) {
   var newW;
   newW=window.open("",url,"width=360,height=380");
   newW.location.href = "http://park18.wakwak.com/~sien/" + url + ".htm";
}
function wopn340(url) {
   var newW;
   newW=window.open("",url,"width=340,height=380");
   newW.location.href = "http://park18.wakwak.com/~sien/" + url + ".htm";
}
function wopn560(url) {
   var W560;
   W560=window.open("",url,"status=yes,scrollbars=yes,resizable=yes,width=560,height=520");
   W560.location.href = "http://park18.wakwak.com/~sien/" + url + ".htm";
}
function wopn580(url) {
   var W580;
   W580=window.open("",url,"status=yes,scrollbars=yes,resizable=yes,width=580,height=520");
   W580.location.href = "http://park18.wakwak.com/~sien/" + url + ".htm";
}
function wopn600(url) {
   var W600;
   W600=window.open("",url,"status=yes,scrollbars=yes,resizable=yes,width=600,height=520");
   W600.location.href = "http://park18.wakwak.com/~sien/" + url + ".htm";
}
function wopn640(url) {
   var W640;
   W640=window.open("",url,"status=yes,scrollbars=yes,resizable=yes,width=640,height=520");
   W640.location.href = "http://park18.wakwak.com/~sien/" + url + ".htm";
}
function wopn680(url) {
   var W680;
   W680=window.open("",url,"status=yes,scrollbars=yes,resizable=yes,width=680,height=520");
   W680.location.href = "http://park18.wakwak.com/~sien/" + url + ".htm";
}
function wopn720(url) {
   var W720;
   W720=window.open("",url,"status=yes,scrollbars=yes,resizable=yes,width=720,height=520");
   W720.location.href = "http://park18.wakwak.com/~sien/" + url + ".htm";
}
function wopn760(url) {
   var W760;
   W760=window.open("",url,"status=yes,scrollbars=yes,resizable=yes,width=760,height=600");
   W760.location.href = "http://park18.wakwak.com/~sien/" + url + ".htm";
}
function wopn780(url) {
   var W780;
   W780=window.open("",url,"status=yes,scrollbars=yes,resizable=yes,width=780,height=600");
   W780.location.href = "http://park18.wakwak.com/~sien/" + url + ".htm";
}
function wopn800(url) {
   var W800;
   W800=window.open("",url,"status=yes,scrollbars=yes,resizable=yes,width=800,height=600");
   W800.location.href = "http://park18.wakwak.com/~sien/" + url + ".htm";
}
function wopn840(url) {
   var W840;
   W840=window.open("",url,"status=yes,scrollbars=yes,resizable=yes,width=840,height=600");
   W840.location.href = "http://park18.wakwak.com/~sien/" + url + ".htm";
}
function wopn880(url) {
   var W880;
   W880=window.open("",url,"status=yes,scrollbars=yes,resizable=yes,width=880,height=600");
   W880.location.href = "http://park18.wakwak.com/~sien/" + url + ".htm";
}
function wopn900(url) {
   var W900;
   W900=window.open("",url,"status=yes,scrollbars=yes,resizable=yes,width=900,height=600");
   W900.location.href = "http://park18.wakwak.com/~sien/" + url + ".htm";
}
function cnt() {
	document.write('<IMG src="http://park18.wakwak.com/~sien/cgi-bin/cnt.cgi?' + document.referrer + '" height="30" alt="４４進カウンター">');
}

