// Check InstaQuote Form before Submit
function checkInstaQuoteForm(){
	custName = document.getElementById('custName');
	custEmail = document.getElementById('custEmail');
	custPhone = document.getElementById('custPhone');
	custService = document.getElementById('custService');
	custComment = document.getElementById('custComment');
	captchaSum = document.getElementById('captchaSum');
	
	iq_error = 0;
	
	if(custName.value == ''){
		iq_error ++;
		changeToError(custName);
	}
	if(custEmail.value == ''){
		iq_error ++;
		changeToError(custEmail);
	}
	if(custPhone.value == ''){
		iq_error ++;
		changeToError(custPhone);
	}
	if(custService.value == ''){
		iq_error ++;
		changeToError(custService);
	}
	if(custComment.value == ''){
		iq_error ++;
		changeToError(custComment);
	}
	if(captchaSum.value == ''){
		iq_error ++;
		changeToError(captchaSum);
	}
	
	if(iq_error == 0){
		return true;
	}else{
		return false;
	}

}

// Mods Request Info
function requestModsInfo(){
	custName = document.getElementById('custNameM');
	custEmail = document.getElementById('custEmailM');
	custPhone = document.getElementById('custPhoneM');
	custComment = document.getElementById('custCommentM');
	
	iq_error = 0;
	
	if(custName.value == ''){
		iq_error ++;
		changeToError(custName);
	}
	if(custEmail.value == ''){
		iq_error ++;
		changeToError(custEmail);
	}
	if(custPhone.value == ''){
		iq_error ++;
		changeToError(custPhone);
	}
	if(custComment.value == ''){
		iq_error ++;
		changeToError(custComment);
	}
	
	if(iq_error == 0){
		return true;
	}else{
		return false;
	}

}

// Error Color
function changeToError(eId) {
	eId.style.backgroundColor = '#ffcccc';
}

// Chnage Focus Colors
function changeFocused(eId){
	eId.style.backgroundColor = '#ffffff';
}

function changeBlur(eId){
	if(eId.value != ''){
		eId.style.backgroundColor = '#ffffff';
	}else{
		eId.style.backgroundColor = '#ffcccc';
	}
}
