function checkFocusValue(msg, field){
	if($(field).attr("value") == msg){
		$(field).attr("value", "");
	}
}
function checkBlurValue(msg, field){
	if($(field).attr("value") == ""){
		$(field).attr("value", msg);
	}
}
function isTextField(field, defaultMsg){
	if($(field).attr("value") == "" || $(field).attr("value") == defaultMsg){
		return false;
	}
	else{
		return true;
	}
}
function isEmailField(field){
	var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,4}$/;
	return emailPattern.test($(field).attr("value"));
}
function isPhoneField(field, defaultMsg){
	if(parseInt($(field).attr("value")) < 10000 || $(field).attr("value") == defaultMsg){
		return false;
	}
	else{
		return true;
	}
}
function showErrorMessage(field, errorMsg){
	$(field).focus();
	if($(field).parents("div.formRow").eq(0).find(".errorBlock").size() == 0){
		$("<div class='errorBlock'>" + errorMsg + "<div>").appendTo($(field).parents("div.formRow").eq(0));
	}
}
function removeErrorMessage(field){
	if($(field).parents("div.formRow").eq(0).find(".errorBlock").size() > 0){
		$(field).parents("div.formRow").eq(0).find(".errorBlock").remove();
	}
}
function showSubForm(num, idContainer){
	$("#" + idContainer + " .hiddenForm").css("display", "none");
	$("#hiddenForm" + num).css("display", "block");
}
