//Comparaison residence et destination
function compareResidenceDestination() {

	var residence = $("#residence").val();
	var destination = $("#destination").val();

	if (residence !="" && destination!="" && destination==residence && document.getElementById('typeDestination-list').checked==true) { //erreur - interdit

		document.getElementById('residence').style.borderColor = '#FF0000';
		
		$("#Err-compareResidenceDestination").fadeIn('slow');
		return true;
		} else { //pas de probleme
		$("#Err-compareResidenceDestination").fadeOut('slow');
		return false;
	}
	
}

function verifPays() {
	
	var nationalite = $("#nationalite");
	var residence = $("#residence");
	var destination = $("#destination");
	var typeDestinationList = document.getElementById("typeDestination-list");
	var erreur = false;
	
	if (nationalite.val()=="") {
		nationalite.css("borderColor", "#FF0000");
		erreur = true;
		} else {
		nationalite.css("borderColor", "#CCC");
	}
	
	if (residence.val()=="") {
		residence.css("borderColor", "#FF0000");
		erreur = true;
		} else {
		residence.css("borderColor", "#CCC");
	}
	
	
	if (typeDestinationList.checked) {
		
		if (destination.val()=="") {
			//destination.css("borderColor", "#FF0000");
			erreur = true;
			} else {
			//destination.css("borderColor", "#CCC");
		}		
		
	}
	
	
	//retour
	if (erreur) {
		$("#Err-pays").fadeIn('slow');
		return true;
		} else {
		$("#Err-pays").fadeOut('slow');
		return false;		
	}
	
	
}


/* MESSAGE POUR LES USA */
function verifUsNatio(code) {
	
	if (code == 266) {
		
		alert("This insurance can only apply to European Union nationals");
		
	}
	
}
	
