/************************************************************************************
					Function for adding this site to the Favorite lists
************************************************************************************/	
function AddFavo() {
	if ((navigator.appName.indexOf("Microsoft",0)>=0) && (parseInt(navigator.appVersion)>=4)) {
	  window.external.AddFavorite("http://airborneassociation.com/","ARAC" );
	}
	else {
	 alert("This functionality is only offered by Internet Explorer 4+");
	}
  }

/************************************************************************************
					Function for recommending this site to friends
************************************************************************************/	
function WriteMailTo(empseudo,emname,emdomain,emext) {
    var hauteur = 112;
    var largeur = 300;
    var top=(screen.height-hauteur)/2;
    var left=(screen.width-largeur)/2;
    if (empseudo == "") {
      empseudo = emname + "@" + emdomain + "." + emext;
    }
    fenetremail = window.open("","","top="+top+", left="+left+", width="+largeur+", height="+hauteur+", directories=no, menubar=no, status=no, resizable=no, location=no");
    fenetreNote = fenetremail;
    if (fenetreNote != null) {
      docmail = fenetremail.document;
      textemail = '<html><head><title>email<\/title><meta http-equiv="Content-Type" content="text\/html; charset="iso-8859-1" ><\/head><body onblur="javascript:setTimeout(\'window.close();\',5000);" style="margin: 5px; background-color:#0099FF; color: #000000; overflow: hidden;"><div align="center"><br>Write to <b>' + empseudo + '<\/b> :<br><br><a ' + ' h' + 're' + 'f="' + 'ma' + 'il' + 'to' + ':' + emname + '@' + emdomain + '.' + emext + '">' + emname + '@' + emdomain + '.' + emext + '<\/a><br><br><\/div><\/body><\/html>';
      docmail.write(textemail);
      docmail.close();
    }
  }

/************************************************************************************
					Function for validating fields in forms - when needed
************************************************************************************/
function validate(form) {
	if(form.Name.value==""){
	  alert("Please type in your name / Insérez votre nom")
	  form.Name.focus();
	  return false;
	}
	
	if(form.Email.value==""){
	  alert("Please type in your e-mail / Insérez votre courriel")
	  form.Email.focus();
	  return false;
	}

	if(form.Phone.value==""){
	  alert("Please type in your phone number / Insérez votre numéro de téléphone")
	  form.Phone.focus();
	  return false;
	}

function submitForm(form) {
	if(validate(form))
	  form.submit();
}
}
