// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaultsz

String.prototype.trimstr = function() {
   return this.replace( /^[\s　]+|[\s　]+$/g , '' );
}

function space_check(_form) {
//	_form[2].value = _form[2].value.trimstr();
	return true;}


//チェックボックス全選択
function allcheck(targetForm,flag){
	for(n=0;n<=targetForm.length-1;n++){
		if(targetForm.elements[n].type == "checkbox"){
			targetForm.elements[n].checked = flag;
		}
	}
}




//ランダムテキスト
function randomText() {
	var randcomment = new Array();
	randcomment.push("I &hearts; GAME!");
	randcomment.push("NO GAME NO LIFE !");
	randcomment.push("Welcome!");
	randcomment.push("I need GAME!!");
	randcomment.push("NO GAME! NO AIR!");
	randcomment.push("ようこそ");
	randcomment.push("全ての道はゲームに通ず");
	randcomment.push("遊ぼうとする意志は何より強い");
	randcomment.push("ゲームが繋ぐ友情の輪");
	randcomment.push("おかえりなさい");
	randcomment.push("しっかり読みなさい！");
	randcomment.push("いらっしゃいませ、ご主人様♪");
	randcomment.push("さあ、レビューを始めます！");
	randcomment.push("神さまが倒せない");
	randcomment.push("GAMEで胃もたれ");
	randcomment.push("いつも指が痛い");
	randcomment.push("タッチペン紛失届3枚目");
	randcomment.push("シート貼り直しすぎ");
	randcomment.push("攻撃が届かない");
	
	var randnum = Math.floor( Math.random() * randcomment.length ); 
	document.write(randcomment[randnum]);
}


/*
	var randnum = Math.floor( Math.random() * 9 ); 

	if(randnum == 0) {
		document.write("I &hearts; GAME!");
	}
	else if(randnum == 1) {
		document.write("NO GAME NO LIFE !");
	}
	else if(randnum == 2) {
		document.write("Welcome !");
	}
	else if(randnum == 3) {
		document.write("I need GAME!!");
	}
	else if(randnum == 4) {
		document.write("NO GAME! NO AIR!");
	}
	else if(randnum == 5) {
		document.write("全ての道はゲームに通ず");
	}
	else if(randnum == 6) {
		document.write(全ての道はゲームに通ず"));
	}
	else if(randnum == 7) {
		document.write("ゲームが繋ぐ友情の輪");
	}
	else if(randnum == 8) {
		document.write("おかえりなさい");
	}
}
*/