function list_submit(v, e, type)
{
	document.rv00.sort_v.value = v;
	document.rv00.sort_e.value = e;
	document.rv00.sort_type.value = type;
	document.rv00.submit();
}

function link_submit(fObj)
{
	fObj.submit();
}

function type_submit(fObj, type)
{
	fObj.submit_type.value = type;
	fObj.submit();
}


function type_update_submit(fObj, type, update)
{
	fObj.submit_type.value = type;
	fObj.update_type.value = update;
	fObj.submit();
}


function priceCal(fObj)
{
	if(fObj.total_money.value > 0 && fObj.num_people.value > 0) {
		fObj.single_price.value = Math.floor(fObj.total_money.value / fObj.num_people.value);
	}
}

function placeFind(fObj)
{
	fObj.place_name.value = '帝国ホテル';
	fObj.place_id.value = 201;
}

function cngUnit(rev_type)
{
	if (rev_type.value=="2") {
		document.rv02.point_star1.selectedIndex = 0;
		document.rv02.point_star1.disabled = true;
	} else {
		document.rv02.point_star1.disabled = false;
	}
	evalLabel(rev_type.value);
}

function pointChk()
{
	if (document.rv02.rev_id.value == 0) {
		if (document.rv02.rev_type[2].checked) {
			document.rv02.point_star1.selectedIndex = 0;
			document.rv02.point_star1.disabled = true;
		} else {
			document.rv02.point_star1.disabled = false;
		}
		if (document.rv02.rev_type[0].checked) {
			evalLabel(1);
		}
		if (document.rv02.rev_type[1].checked) {
			evalLabel(0);
		}
		if (document.rv02.rev_type[2].checked) {
			evalLabel(2);
		}
	} else {
		if (document.rv02.rev_type.value == 1) {
			evalLabel(1);
		}
		if (document.rv02.rev_type.value == 0) {
			evalLabel(0);
		}
		if (document.rv02.rev_type.value == 2) {
			evalLabel(2);
			document.rv02.point_star1.selectedIndex = 0;
			document.rv02.point_star1.disabled = true;
		}
	}
	checkArea();
}

function checkArea()
{
	txt = document.rv02.cmmt.value.replace(/\r/g,'');
	txt = txt.replace(/\n/g,'');;
	n = txt.length;
	if(n >= 300) {
		document.getElementById('cngUnit').innerHTML='【300文字以上4,000文字以内(現在 <font color="#0000FF">' + n + '</font> 文字)】';
	} else {
		document.getElementById('cngUnit').innerHTML='【300文字以上4,000文字以内(現在 <font color="#FF0000">' + n + '</font> 文字)】';
	}
}

function rewriteOn()
{
	document.rv02.rewrite.value = 1;
}


function evalLabel(rev_type) {

	if(rev_type == 0) {
		document.getElementById('eval_label1').innerHTML='(※)必須';
		document.getElementById('eval_label2').innerHTML='(※)必須';
		document.getElementById('eval_label3').innerHTML='(※)必須';
		document.getElementById('eval_label4').innerHTML='';
		document.getElementById('eval_label5').innerHTML='(※)必須';
		document.getElementById('eval_label6').innerHTML='(※)必須';
		if(document.rv02.rewrite.value == 0) {
			document.rv02.cmmt.value = '【この式場に決めた理由】　　\n\n\n【ロケーション・会場設備など全体的な感想】　　\n\n\n【料理について】　　\n\n\n【コストについて】　　\n\n\n【スタッフの対応】　　\n\n\n【喜怒哀楽エピソード】　　';
		}
	}
	if(rev_type == 1) {
		document.getElementById('eval_label1').innerHTML='(※)必須';
		document.getElementById('eval_label2').innerHTML='(※)必須';
		document.getElementById('eval_label3').innerHTML='';
		document.getElementById('eval_label4').innerHTML='';
		document.getElementById('eval_label5').innerHTML='(※)必須';
		document.getElementById('eval_label6').innerHTML='(※)必須';
		if(document.rv02.rewrite.value == 0) {
			document.rv02.cmmt.value = '【ロケーション・会場設備について】　　\n\n\n【スタッフ・費用・料理等のサービスについて】　　';
		}
	}
	if(rev_type == 2) {
		document.getElementById('eval_label1').innerHTML='(採点不可)';
		document.getElementById('eval_label2').innerHTML='(※)必須';
		document.getElementById('eval_label3').innerHTML='(※)必須';
		document.getElementById('eval_label4').innerHTML='';
		document.getElementById('eval_label5').innerHTML='(※)必須';
		document.getElementById('eval_label6').innerHTML='(※)必須';
		if(document.rv02.rewrite.value == 0) {
			document.rv02.cmmt.value = '【ロケーション・会場設備について】　　\n\n\n【スタッフ・料理・進行等のサービスについて】　　';
		}
	}
}

