// JavaScript Document
var isPost = false;
var isChkEnquiry= false;
function validateFormAbb(objForm) {
	chkSelectbox(objForm);
	if  ( isPost ) {
		alert("You have press the SUBMIT button already");
		return false;
	} else if ( IsEmpty(objForm.subject_enquiry.value)) {
		Warning(objForm.subject_enquiry ,"Please Selecte Your Subject of this enquiry");	
		return false;
    /*
	} else if (isChkEnquiry==false) {
		Warning(objForm.btp ,"Please specify Hotel or Business units");
		return false;
	*/		
	} else if ( IsEmpty(objForm.cenquiries.value)) {
		Warning(objForm.cenquiries ,"Please specify Your Enquiry");
		return false;		
	} else if ( IsEmpty(objForm.cgender.value)) {
		Warning(objForm.cgender , "Please specify Your Gender");
		return false;		
	} else if ( IsEmpty(objForm.cname.value)) {
		Warning(objForm.cname , "Please specify Your Name");
		return false;		
	} else if ( IsEmpty(objForm.ccountry.value)) {
		Warning(objForm.ccountry ,"Please Selecte Your Country");
		return false;		
	} else if ( IsEmpty(objForm.cemail.value)) {
		Warning(objForm.cemail ,"Please specify Your E-mail");
		return false;
	} else if ( ! IsEmail(objForm.cemail.value)) {
		Warning(objForm.cemail ,"Please specify Your E-mail in the right format");
		return false;	
	} else if (IsEmpty(objForm.verificationcode.value)) {
		Warning(objForm.verificationcode ,"Please specify Your characters appearing at left");
		return false;		
	} else {
		isPost = true;
		objForm.btnSubmit.disabled = true;
		return true;
	}
}
function validateForm(objForm) {
	chkSelectbox(objForm);
	if  ( isPost ) {
		alert("You have press the SUBMIT button already");
		return false;
	} else if ( IsEmpty(objForm.subject_enquiry.value)) {
		Warning(objForm.subject_enquiry ,"Please Selecte Your Subject of this enquiry");	
		return false;
	} else if (isChkEnquiry==false) {
		Warning(objForm.btp ,"Please specify Hotel or Business units");
		return false;		
	} else if ( IsEmpty(objForm.cenquiries.value)) {
		Warning(objForm.cenquiries ,"Please specify Your Enquiry");
		return false;		
	} else if ( IsEmpty(objForm.cname.value)) {
		Warning(objForm.cname , "Please specify Your Name");
		return false;		
	} else if ( IsEmpty(objForm.ccountry.value)) {
		Warning(objForm.ccountry ,"Please Selecte Your Country");
		return false;		
	} else if ( IsEmpty(objForm.cemail.value)) {
		Warning(objForm.cemail ,"Please specify Your E-mail");
		return false;
	} else if ( ! IsEmail(objForm.cemail.value)) {
		Warning(objForm.cemail ,"Please specify Your E-mail in the right format");
		return false;	
	} else if (IsEmpty(objForm.verificationcode.value)) {
		Warning(objForm.verificationcode ,"Please specify Your characters appearing at left");
		return false;		
	} else {
		isPost = true;
		objForm.btnSubmit.disabled = true;
		return true;
	}
}
function chkSelectbox(objForm){
	isChkEnquiry= false;
	if(IsCheck(objForm.btp)){
		isChkEnquiry=true;
	}else if(IsCheck(objForm.bts)){
		isChkEnquiry=true;
	}else if(IsCheck(objForm.anthlg)){
		isChkEnquiry=true;
	}else if(IsCheck(objForm.ans)){
		isChkEnquiry=true;
	}else if(IsCheck(objForm.dtlp)){
		isChkEnquiry=true;
	}else if(IsCheck(objForm.lpgc)){
		isChkEnquiry=true;
	}else if(IsCheck(objForm.lbr)){
		isChkEnquiry=true;
	}else if(IsCheck(objForm.lpw)){
		isChkEnquiry=true;
	//}else if(IsCheck(objForm.alp)){
	//	isChkEnquiry=true;
	}else if(IsCheck(objForm.bwalp)){
		isChkEnquiry=true;		
	}else if(IsCheck(objForm.lel)){
		isChkEnquiry=true;
	}else if(IsCheck(objForm.lhcr)){
		isChkEnquiry=true;
	}else if(IsCheck(objForm.pps)){
		isChkEnquiry=true;
	}else if(IsCheck(objForm.olp)){
		isChkEnquiry=true;
	}else if(IsCheck(objForm.qlp)){
		isChkEnquiry=true;		
	}else if(IsCheck(objForm.lhc)){
		isChkEnquiry=true;
	}else if(IsCheck(objForm.csr)){
		isChkEnquiry=true;
	}else if(IsCheck(objForm.ffz)){
		isChkEnquiry=true;	
	}else if(IsCheck(objForm.cq)){
		isChkEnquiry=true;					
	//}else if(IsCheck(objForm.other)){
	//	isChkEnquiry=true;
	}
}
