//*********************************************************************************************
//
// Coded by Artis Co.,Ltd.
// http://www.artisj.com
// If you want to use this code, feel free to do so, however; please leave this message intact.
// Copyright(C) 2003 Artis Co.,Ltd. All rights reserved.
//
//*********************************************************************************************

var W_Chk=0;
function FormChk(){
var error_string="";

if(window.document.formmail.name.value==""){
	error_string+="- Name\n";
}
if(window.document.formmail.add1.value==""){
	error_string+="- Address\n";
}
if(window.document.formmail.add2.value==""){
	error_string+="- City\n";
}
if(window.document.formmail.add3.value==""){
	error_string+="- State\n";
}
if(window.document.formmail.add4.value==""){
	error_string+="- Country\n";
}

if(window.document.formmail.yubin1.value==""){
	error_string+="- Zip\n";
}
if(window.document.formmail.tel1.value==""
	|| window.document.formmail.tel2.value==""
	|| window.document.formmail.tel3.value==""){
	error_string+="- Tel\n";
}
if(window.document.formmail.email.value==""){
	error_string+="- E-mail\n";
}
if(window.document.formmail.conf_email.value==""){
	error_string+="- E-mail (Confirm)\n";
}

if((window.document.formmail.otodoke[0].checked==false)&&(window.document.formmail.otodoke[1].checked==false)){
	error_string+="- Shipping Info\n";
}
if(window.document.formmail.otodoke[1].checked==true){
	if(window.document.formmail.otodoke_name.value==""){
		error_string+="- Shipping Name\n";
	}
	if(window.document.formmail.otodoke_add1.value==""){
		error_string+="- Shipping Address\n";
	}
	if(window.document.formmail.otodoke_add2.value==""){
		error_string+="- Shipping City\n";
	}
	if(window.document.formmail.otodoke_add3.value==""){
		error_string+="- Shipping State\n";
	}
	if(window.document.formmail.otodoke_add4.value==""){
		error_string+="- Shipping Country\n";
	}
	if(window.document.formmail.otodoke_yubin1.value==""){
		error_string+="- Shipping Zip\n";
	}
	if(window.document.formmail.otodoke_tel1.value==""
		|| window.document.formmail.otodoke_tel2.value==""
		|| window.document.formmail.otodoke_tel3.value==""){
		error_string+="- Shipping Tel\n";
	}
}

if(error_string==""){
	if(W_Chk=="1"){
		alert("Sent");
		return false;
	}
	if(W_Chk=="0"){
		W_Chk=1;
		return true;
	}
} else {
	error_string="Please enter the following field(s)\n\n"+error_string;
	alert(error_string);
	W_Chk=0;
	return false;
}
}