/******************************************************************************
 * FUNCTION  => Opens a new window.
 * ARGUMENTS =>
 *    theURL   : the URL to open in the new window
 *    winName  : the unique identifier of the window (used to communicate with window handler)
 *    features :
 *    
 *****************************************************************************/
function OpenWindow(theURL, winName, features)
{
  window.parent.open(theURL, winName, features);
}

/******************************************************************************
 * FUNCTION  => 
 * ARGUMENTS =>
 *      :
 *      : 
 *    features :
 *
 *****************************************************************************/
function TourTypeSelected(frm)
{
	/*
	if(frm.radio0.checked == true)
  	frm.nOccupancy.disabled = false;
	else
		frm.nOccupancy.disabled = true;*/

}

/******************************************************************************
 * FUNCTION  =>
 * ARGUMENTS =>
 *      :
 *      :
 *    features :
 *
 *****************************************************************************/
function showResults()
{
	// Pour Netscape 6 et Internet Explorer 5 et plus
	if (document.getElementById)
	{
	  var contentDiv = document.getElementById('idContent');
	  var loadingDiv = document.getElementById('idLoading');

	  contentDiv.style.visibility='visible';
	  loadingDiv.style.visibility='hidden';
	}
	// Pour Netscape 4 et plus
	else
		if (document.layers)
	  {
	  document.idLoading.visibility='hide';
	  document.idContent.visibility='visible';
	  }
	// Pour Internet Explorer 4 et plus
	else
		if (document.all)
	  {
	  document.all.idLoading.style.visibility='hidden';
	  document.all.idContent.style.visibility='visible';
	  }
}

/******************************************************************************
 * FUNCTION  =>
 * ARGUMENTS =>
 *      :
 *      :
 *    features :
 *
 *****************************************************************************/
function getCreditCardOwner(frm)
{

}

/******************************************************************************
 * FUNCTION  =>
 * ARGUMENTS =>
 *      :
 *      :
 *    features :
 *
 *****************************************************************************/
function sendAvailabilityInfo(frm, valTourID)
{
  frm.tourID.value = valTourID;
//	frm.action ='forfaitDisponibiliteRequete.php';
	frm.submit();
}

/******************************************************************************
 * FUNCTION  =>
 * ARGUMENTS =>
 *      :
 *      :
 *    features :
 *
 *****************************************************************************/
function selectCreditCardOwner(frm, index)
{
//	var csPrenom   = 'prenom'+index;
//	var csLastName = 'nomFamille'+index;
//alert(frm.firstName.value);
//alert(csPrenom);

	// if there's only one element with that name in the form we cannot access it with brackets
	if(frm.firstName.length != undefined)
  	frm.nomCarte.value = frm.firstName[index].value+", "+frm.lastName[index].value;
	else
  	frm.nomCarte.value = frm.firstName.value+", "+frm.lastName.value;

//  frm.nomCarte.value = frm.csPrenom.value+", "+frm.csLastName.value;
}
