function appointment() {
	arrArgs = appointment.arguments;
	var strFile = 'appointment.php?intDoctor='+arrArgs[0]+'&intCity='+arrArgs[1]+'&intSpecialty='+arrArgs[2]+'&dateAppointment='+arrArgs[3];
	var strWindowName = 'appointment';
	var intHeight = Math.min(800,screen.height-50);
	var intTop = (screen.height - intHeight) / 2;
	var intWidth = 500;
	var intLeft = (screen.width - intWidth) / 2;
	wndwPopup = window.open(strFile,strWindowName,'width='+intWidth+', height='+intHeight+', top='+intTop+', left='+intLeft+', scrollbars=yes, resizable');
	wndwPopup.focus();
}

function infos() {
	document.getElementById("search-info").style.visibility = document.getElementById("search-info").style.visibility == "visible" ? "hidden" : "visible";
}

function refreshMap() {
	arrArgs = refreshMap.arguments;
	if (arrArgs.length > 0) {
	
		var strCity = arrArgs[0];
		var strRegion = arrArgs[1];
		var arrSpecialties = arrArgs[2];
		//var strImage = 'medias/cities/'+arrArgs[3];
		
		var strImage = '../../images/calendar-expertise/cities/'+arrArgs[3];
		
		var strHeader = '<span class="map-desc-city">'+strCity+',&nbsp;</span><span class="map-desc-region">'+strRegion+'</span>';
		document.getElementById("map-desc-header").innerHTML = strHeader;

		if (arrSpecialties.length > 0) {
			var strSpecialties = "<ul class=\"avail-city-job\"\n>";
			var lenSpecialties = arrSpecialties.length;
			for (i = 0; i < lenSpecialties; i++) {
				if (i < 9){
				strSpecialties += "<li>&#8250; "+arrSpecialties[i]+"</li>";
				} else {
					strSpecialties += "<li style=\"padding-top: 5px;\">&nbsp;&nbsp;<b>D\'autres sp&eacute;cialit&eacute;s disponibles</b></li>";
					break;
				}
			}
			strSpecialties += "\n</ul>";
		} else {
			var strSpecialties = "";
		}
		document.getElementById("map-desc-body").innerHTML = strSpecialties;

		document.getElementById("map-img-point").src = strImage;
		document.getElementById("map-desc").style.visibility = "visible";
		document.getElementById("map-img-point").style.visibility = "visible";
	
	} else {
		
		document.getElementById("map-desc").style.visibility = "hidden";
		document.getElementById("map-img-point").style.visibility = "hidden";
	
	}
	
}

function validForm() {
	var emailReg = "^[\\w-_\.]*[\\w-_\.]\@[\\w]\.+[\\w]+[\\w]$";
	var regex = new RegExp(emailReg);
	if (document.formAppointment.employeur_compagnie.value==""){
		alert("Veuillez entrer le nom de la compagnie");
		document.formAppointment.employeur_compagnie.focus();
	} else if (document.formAppointment.employeur_contact.value==""){
		alert("Veuillez entrer le nom de la personne contact");
		document.formAppointment.employeur_contact.focus();
	} else if (regex.test(document.formAppointment.employeur_courriel.value) == false){
		alert("Veuillez entrer une adresse courriel valide");
		document.formAppointment.employeur_courriel.focus();
	} else if (document.formAppointment.employeur_telephone.value==""){
		alert("Veuillez entrer le numéro de téléphone de l'employeur");
		document.formAppointment.employeur_telephone.focus();
	} else if (document.formAppointment.employeur_fax.value==""){
		alert("Veuillez entrer le numéro de télécopieur de l'employeur");
		document.formAppointment.employeur_fax.focus();
	} else if (document.formAppointment.employe_nom.value==""){
		alert("Veuillez entrer le nom de l'employé");
		document.formAppointment.employe_nom.focus();
	} else if (document.formAppointment.employe_prenom.value==""){
		alert("Veuillez entrer le prénom de l'employé");
		document.formAppointment.employe_prenom.focus();
	} else if (document.formAppointment.employe_adresse.value==""){
		alert("Veuillez entrer l'adresse de l'employé");
		document.formAppointment.employe_adresse.focus();
	} else if (document.formAppointment.employe_telephone.value==""){
		alert("Veuillez entrer le numéro de téléphone de l'employé");
		document.formAppointment.employe_telephone.focus();
	} else if (document.formAppointment.employe_naissance.value==""){
		alert("Veuillez entrer la date de naissance de l'employé");
		document.formAppointment.employe_naissance.focus();
	} else{
		document.formAppointment.submit();
	}
}