function checkform(thisform) {
	if (thisform.firstName.value.length < 1){ 
		alert('Please input your first name.'); thisform.firstName.focus(); return false;
		}
	if (thisform.firstName.value.length > 50){ 
		alert('Please write down first name less than 50 characters.'); thisform.firstName.focus(); return false;
		}
	if (thisform.lastName.value.length < 1){ 
		alert('Please input your last name.'); thisform.lastName.focus(); return false;
		}
	if (thisform.lastName.value.length > 50){ 
		alert('Please write down last name less than 50 characters.'); thisform.lastName.focus(); return false;
		}
	if (thisform.email.value.length < 1 || !checkRegExp(thisform.email.value)){ 
		alert("E-mail address is not correct or valid.\r\nPlease check your e-mail address again."); thisform.email.focus(); return false;
		}
	if (thisform.title.value.length < 1){
		alert('Please input your title.'); thisform.title.focus(); return false;
		}
	if (thisform.title.value.length > 100){ 
		alert('Please write down Title less than 100 characters.'); thisform.title.focus(); return false;
		}
	if (thisform.content.value.length < 1){ 
		alert('Please input your contents.'); thisform.content.focus(); return false;
		}
	return true;
}

function sendform(thisform) {
	if ( checkform(thisform) != false ) {
		wr.action="/object/script/db_contactUs_processNew.asp"
		document.wr.submit();
	}
}

function checkRegExp(obj){
	var strPatern	= "^([a-z|A-Z|0-9|-|_]{1,}(\.[a-z|A-Z|0-9|-|_]+)?@[a-z|A-Z|0-9|-|_]+(\.[a-z|A-Z|0-9|-|_]+){2,4})$" ;
	reg = new RegExp(strPatern);
	
	em = reg.exec(obj) ;
	
	return em ;
}