/*
<php:string caram="city_list" type="" />
function MakeCityList(n, d){
	if (n == "" || typeof(n) == 'undefined'){
		n = 0;
	}
	
	temp_i = document.form1.city.length;
	if(temp_i>1){
		for(i=1;i<temp_i;i++){
			document.form1.city.options[temp_i-i]=null;
		}
	}
	todo_val = document.form1.todo[n].value;
	for (i=0; i<city_count; i++){
		if (todo_val == city_mid[i]){
			len = document.form1.city.length;
			document.form1.city.options[len] = new Option(city_str[i], city_val[i]);
			if (city_val[i] == d){
				document.form1.city.options[len].selected = true;
			}
		}
	}
}
*/
function checkAll(){
	for (i=0; i<document.form1.elements['shopMail[]'].length; i++){
		document.form1.elements['shopMail[]'][i].checked = true ;
	}
}
function checkClear(){
	for (i=0; i<document.form1.elements['shopMail[]'].length; i++){
		document.form1.elements['shopMail[]'][i].checked = false ;
	}
}

function commitStyle(prm){
if(document.form1){
		if(document.form1.commit){
			if (prm=="2" && document.form1.commit[1].checked == true){
				prm="1";
			} else if (prm=="2"){
				prm="0";
			}
			if (prm=="1"){
				document.getElementById("commitT").style.display="block";
				document.getElementById("commitF").style.display="none";
			} else if (prm=="0"){
				document.getElementById("commitT").style.display="none";
				document.getElementById("commitF").style.display="block";
			}
		}
	}
}

function checkCommit(){
	if (document.form1.commit[1].checked != true){
		document.form1.action = "index.php" ;
	}
	document.form1.submit();
}

window.onload = function() {
	commitStyle(2);
}