
function IsEmail(email) {
  var regex = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
  return regex.test(email);
}

function manage_contact_type(id) {
	var label = document.getElementById('label_contact_type_other');
	var input = document.getElementById('input_contact_type_other');
	var gln_signup = document.getElementById('gln_signup_container');
	if ( label && input ){
		if (id=="input_OtherContactType"){
			input.style.display = 'block';
			label.style.display = 'none';
		}else{
			input.style.display = 'none';
			label.style.display = 'block';
		}
	}
	
	if (gln_signup){
		var gln_signup_checkbox = document.getElementById("gln_signup");
		if (id=="input_Lessor"){
			gln_signup.style.display = 'block';
			gln_signup_checkbox.checked = true;
		}else{
			gln_signup.style.display = 'none';
			gln_signup_checkbox.checked = false;
		}
	}

}
