var expDays = 365; // number of days the cookie should last
var myURL = "" + window.location;
if(myURL.lastIndexOf("/") > 0){
myURL = myURL.substring(0,myURL.lastIndexOf("/"));
}
if(myURL.search("/AR") > 0){
myURL = myURL.replace("/AR", "/EN");
myURL = myURL.substring(0,myURL.length-3);
}else if(myURL.search("/EN") > 0){
myURL = myURL.substring(0,myURL.length-3);
}
function GetCookie (name) {  
var arg = name + "=";  
var alen = arg.length;  
var clen = document.cookie.length;  
var i = 0;  
while (i < clen) {    
var j = i + alen;    
if (document.cookie.substring(i, j) == arg)      
return getCookieVal (j);    
i = document.cookie.indexOf(" ", i) + 1;    
if (i == 0) break;   
}  
return null;
}
function SetCookie (name, value) {  
var argv = SetCookie.arguments;  
var argc = SetCookie.arguments.length;  
var expires = (argc > 2) ? argv[2] : null;  
var path = (argc > 3) ? argv[3] : null;  
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;  
document.cookie = name + "=" + escape (value) + 
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
((path == null) ? "" : ("; path=" + path)) +  
((domain == null) ? "" : ("; domain=" + domain)) +    
((secure == true) ? "; secure" : "");
}
function DeleteCookie (name) {  
var exp = new Date();  
exp.setTime (exp.getTime() - 1);  
var cval = GetCookie (name);  
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
var exp = new Date(); 
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
function amt(){
var myLang = GetCookie('myLang');
if(myLang == null) {
myLang = "EN";
SetCookie('myLang',myLang, exp, '/');
SetCookie('myLang',myLang, exp, '/EN/');
SetCookie('myLang',myLang, exp, '/EN/');
return myLang;
}
return myLang;
}
function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function checkLang() {
var myLang = GetCookie('myLang');
if (myLang == null) {
myLang="EN";
SetCookie('myLang',myLang, exp, '/');
SetCookie('myLang',myLang, exp, '/EN/');
SetCookie('myLang',myLang, exp, '/EN/');
}
myURL = myURL + "/" + myLang + "/";
window.location.href = myURL;
}
function setLang(myLang) {
if (myLang == null) {
myLang="EN";
}
if (GetCookie('myLang') != myLang){
SetCookie('myLang',myLang, exp, '/');
SetCookie('myLang',myLang, exp, '/EN/');
SetCookie('myLang',myLang, exp, '/EN/');
}
myURL = myURL + "/" + myLang + "/";
window.location.href = myURL;
}
function setContentLang(myLang, myPage) {
if (myLang == null) {
myLang="EN";
}
if (GetCookie('myLang') != myLang){
SetCookie('myLang',myLang, exp, '/');
SetCookie('myLang',myLang, exp, '/EN/');
SetCookie('myLang',myLang, exp, '/EN/');
}
myURL = myURL + "/" + myLang + "/" + myPage;
window.open(myURL,'index');
}

function stripSpaces(form_item){
	var mytext = new String("");
	
	mytext = form_item.value;
	while (mytext.charAt(0) == ' ') {
		mytext = mytext.substring(1,mytext.length);
	}
	while (mytext.charAt(mytext.length - 1) == ' ') {
		mytext = mytext.substring(0, (mytext.length - 1));
	}
	form_item.value = mytext;
};
function checkForum(form_item){
	if(form_item.value == 1){
		document.forms[0].f_shortlist[0].checked = false;
		document.forms[0].f_shortlist[1].checked = true;
		document.forms[0].f_invited[0].checked = false;
		document.forms[0].f_invited[1].checked = true;
		document.forms[0].f_rejected[0].checked = false;
		document.forms[0].f_rejected[1].checked = true;
		document.forms[0].f_declined[0].checked = false;
		document.forms[0].f_declined[1].checked = true;
		document.forms[0].f_cancelled[0].checked = false;
		document.forms[0].f_cancelled[1].checked = true;
		document.forms[0].f_cancelled7[0].checked = false;
		document.forms[0].f_cancelled7[1].checked = true;
		document.forms[0].f_waiting_list[0].checked = false;
		document.forms[0].f_waiting_list[1].checked = true;
		document.forms[0].f_will_attend[0].checked = false;
		document.forms[0].f_will_attend[1].checked = true;
		form_item.checked = true;
	}
	if(document.forms[0].f_shortlist[0].checked == false && document.forms[0].f_invited[0].checked == false && document.forms[0].f_rejected[0].checked == false && document.forms[0].f_declined[0].checked == false && 	document.forms[0].f_cancelled[0].checked == false && document.forms[0].f_cancelled7[0].checked == false && document.forms[0].f_waiting_list[0].checked == false && 	document.forms[0].f_will_attend[0].checked == false){
		document.forms[0].f_shortlist[0].checked = true;
		document.forms[0].f_shortlist[1].checked = false;
	}
};
function checkURL(myItem){
	if((myItem.value.search(/http[s]?:\/\/[A-Za-z0-9_-]*/gi) == -1) && (myItem.value + "" != "n/a")){
		alert("Veuillez verifier l'URL.");
		myItem.focus();
		myItem.value = "http://www.";
		return false;
	}else{
		return true;
	}
};

function checkEmail(myItem){
	if((myItem.value.search(/[A-Za-z0-9_-]*@[A-Za-z0-9_-]*\.[A-Za-z0-9_-]*/gi) == -1) && (myItem.value + "" != "n/a") && (myItem.value + "" != "")){
		alert("Veuillez verifier l'adresse email.");
		myItem.focus();
		myItem.value = "";
		return false;
	}else{
		return true;
	}
};

function stripPhone(form_item){
	var mytext = new String(""),
		mytemp = new String(""),
		mylength = 0,
		i = 0;
	
	mytext = form_item.value;
	mylength = mytext.length;
	if(mytext != "n/a"){		
		while(mytext.charAt(0).search(/[\d+(]/gi) == -1){
			mytext = mytext.substring(1,mytext.length);
			if(mytext.length == 0){
				break;
			}
		};
		for(var i = 1; i < mylength; i++){
			if(mytext.charAt(i).search(/[\d\s()]/gi) == -1){
				mytemp = mytext.substring(0,i);
				mytext = mytext.substring(i+1,mytext.length);
				mytext = mytemp + " " + mytext;
				mylength;
				i;
			}
		};
		if(mytext.charAt(mylength-1).search(/[\d\s()]/gi) == -1){
			mytext = mytext.substring(0,mylength-1);
		}
		form_item.value = mytext;
	}
	if(mytext == ""){
		restoreDialingCode(form_item);
	}
};

function dialingCode(){
	var myForm = document.forms[0],
		tempCode = "",
		myIndex = 0;
	
	for(var i = 0; i < myForm.dialing_id.length; i++){
		if(myForm.dialing_id[i].value == myForm.f_id_country.options[myForm.f_id_country.selectedIndex].value){
			myIndex = i;
		}
	};
	if(myForm.f_id_country.selectedIndex == 0){
		if("" + myForm.f_tel.value == "+" + myForm.code.value){
			myForm.f_tel.value = "";
		}
		if("" + myForm.f_fax.value == "+" + myForm.code.value){
			myForm.f_fax.value = "";
		}
		myForm.code.value = "";
	}else{
		tempCode = "" + myForm.code.value;
			myForm.code.value = myForm.dialing_code[myIndex].value;
		if("" + myForm.f_tel.value == "+" + tempCode || "" + myForm.f_tel.value == "" || "" + myForm.f_tel.value == "+"){
			restoreDialingCode(myForm.f_tel);
		}
		if("" + myForm.f_fax.value == "+" + tempCode || "" + myForm.f_fax.value == "" || "" + myForm.f_fax.value == "+"){
			restoreDialingCode(myForm.f_fax);
		}
	}
};

function restoreDialingCode(form_item){
	var myForm = form_item.form;
	
	if(myForm.code){
		form_item.value = "+" + myForm.code.value;
	}else{
		form_item.value = "+" + myForm.at_code.value;
	}
};

function checkNumeric(myItem){
	var mytext;
	
	mytext = "" + myItem.value;
	if((isNaN(myItem.value) && mytext.toLowerCase() != "n/a" && mytext != "") || mytext.length > 18){
		alert("Ce champ doit contenir un nombre.");
		myItem.focus();
		myItem.value = "";
		return false;
	}else{
		return true;
	}	
};

function checkInt(myItem){
	var mytext;
	
	mytext = "" + myItem.value;
	if((isNaN(myItem.value) && mytext.toLowerCase() != "n/a" && mytext != "") || mytext.length > 9){
		alert("Ce champ doit contenir un nombre.");
		myItem.focus();
		myItem.value = "";
		return false;
	}else if(mytext != "" && mytext.toLowerCase() != "n/a" && mytext.length <= 9){
		myItem.value = parseInt(mytext);
		return true;
	}else{
		return true;
	}
};

function countSMS(myItem, myIndex){
	myLength = 0,
	myString = "",
	counter = 0;
	
	myString = "" + myItem.value;
	myLength = myString.length;

	counter = myLength;
	if(myIndex >= 0){
		document.forms[0].counterSMS[myIndex].value = counter;
	} else{
		document.forms[0].counterSMS.value = counter;
	}
};

function countChar150(myItem, myIndex){
	myLength = 0,
	myString = "",
	counter = 0;
	
	myString = "" + myItem.value;
	myLength = myString.length;

	if (myLength > 150){
		myItem.value = myString.substring(0, 150);
		alert("Maximum size is 150 characters.");	
	}
	counter = myLength;
	if(myIndex >= 0){
		document.forms[0].counter150[myIndex].value = counter;
	} else{
		document.forms[0].counter150.value = counter;
	}
};
function countChar255(myItem, myIndex){
	myLength = 0,
	myString = "",
	counter = 0;
	
	myString = "" + myItem.value;
	myLength = myString.length;

	if (myLength > 255){
		myItem.value = myString.substring(0, 255);
		alert("Maximum size is 255 characters.");	
	}
	counter = myLength;
	if(myIndex >= 0){
		document.forms[0].counter255[myIndex].value = counter;
	} else{
		document.forms[0].counter255.value = counter;
	}
};
function countChar500(myItem, myIndex){
	myLength = 0,
	myString = "",
	counter = 0;
	
	myString = "" + myItem.value;
	myLength = myString.length;

	if (myLength > 500){
		myItem.value = myString.substring(0, 500);
		alert("Maximum size is 500 characters.");	
	}
	counter = myLength;
	if(myIndex >= 0){
		document.forms[0].counter500[myIndex].value = counter;
	} else{
		document.forms[0].counter500.value = counter;
	}
};
function countChar750(myItem, myIndex){
	myLength = 0,
	myString = "",
	counter = 0;
	
	myString = "" + myItem.value;
	myLength = myString.length;

	if (myLength > 750){
		myItem.value = myString.substring(0, 750);
		alert("Maximum size is 750 characters.");	
	}
	counter = myLength;
	if(myIndex >= 0){
		document.forms[0].counter750[myIndex].value = counter;
	} else{
		document.forms[0].counter750.value = counter;
	}
};
function countChar1000(myItem, myIndex){
	myLength = 0,
	myString = "",
	counter = 0;
	
	myString = "" + myItem.value;
	myLength = myString.length;

	if (myLength > 1000){
		myItem.value = myString.substring(0, 1000);
		alert("Maximum size is 1000 characters.");	
	}
	counter = myLength;
	if(myIndex >= 0){
		document.forms[0].counter1000[myIndex].value = counter;
	} else{
		document.forms[0].counter1000.value = counter;
	}
};
function countChar1500(myItem, myIndex){
	myLength = 0,
	myString = "",
	counter = 0;
	
	myString = "" + myItem.value;
	myLength = myString.length;

	if (myLength > 1500){
		myItem.value = myString.substring(0, 1500);
		alert("Maximum size is 1500 characters.");	
	}
	counter = myLength;
	if(myIndex >= 0){
		document.forms[0].counter1500[myIndex].value = counter;
	} else{
		document.forms[0].counter1500.value = counter;
	}
};
function countChar2000(myItem, myIndex){
	myLength = 0,
	myString = "",
	counter = 0;
	
	myString = "" + myItem.value;
	myLength = myString.length;

	if (myLength > 2000){
		myItem.value = myString.substring(0, 2000);
		alert("Maximum size is 2000 characters.");	
	}
	counter = myLength;
	if(myIndex >= 0){
		document.forms[0].counter2000[myIndex].value = counter;
	} else{
		document.forms[0].counter2000.value = counter;
	}
};

function checkLogo(myItem){
	if((myItem.value.search(/[A-Za-z0-9_-]*\.eps|tiff|tif|jpeg|jpg|jpe|ai|ai5|ai4|ai3|ps/gi) == -1) && (myItem.value + "" != "n/a") && (myItem.value + "" != "")){
		alert("Logo file should be an EPS, a TIFF or a JPEG file.");
		myItem.focus();
		return false;
	}else{
		return true;
	}
};
function checkPicture(myItem){
	if((myItem.value.search(/[A-Za-z0-9_-]*\.jpeg|jpg|jpe|gif/gi) == -1) && (myItem.value + "" != "n/a") && (myItem.value + "" != "")){
		alert("Picture file should be a JPEG or GIF file.");
		myItem.focus();
		return false;
	}else{
		return true;
	}
};

function checkDateMonth(myItem){
	var myArrayDate, myMonth, myYear, myString, myYearDigit;
	
	myString = myItem.value + "";
	
	myArrayDate = myString.split("/");
	myMonth = Math.round(parseFloat(myArrayDate[0]));
	myYear = Math.round(parseFloat(myArrayDate[1]));
	myString = myArrayDate[1] + "";
	myYearDigit = myString.length;
	if (myItem.value + "" != "mm/aaaa" && myItem.value + "" != "mm/yyyy" && myItem.value + "" != "n/a" && (isNaN(myMonth) || isNaN(myYear) || (myYear < 1) || (myMonth < 1) || (myMonth > 12) || (myYearDigit != 4))){
		alert("Please check date format (mm/yyyy).");
		myItem.focus();
		myItem.value = "mm/yyyy";
		return false;
	}else{
		return true;
	}
};

function restoreDateMonth(myItem){
	if ("" + myItem.value == "" ){
		myItem.value = "mm/yyyy";
	}
};

function restoreDate(myItem){
	if ("" + myItem.value == "" ){
		myItem.value = "jj/mm/aaaa";
	}
};

function restoreTime(myItem){
	if ("" + myItem.value == "" ){
			myItem.value = "hh:mm";
	}
};

function emptyMe(myItem) {
	if ("" + myItem.value == "mm/yyyy" || "" + myItem.value == "mm/aaaa" || "" + myItem.value == "hh:mm" || "" + myItem.value == "dd/mm/yyyy" || "" + myItem.value == "jj/mm/aaaa"){
			myItem.value = "";
	}
};

function checkHour(myItem){
	var myArrayHour, mytext, myHour, myMinute;
	mytext = "" + myItem.value;
	
	myArrayHour = mytext.split(":");
	myHour = parseInt(myArrayHour[0]);
	myMinute = parseInt(myArrayHour[1]);
	if((mytext != "hh:mm") && (isNaN(myHour) || isNaN(myMinute) || (myHour < 0) || (myHour > 23) || (myMinute < 0) || (myMinute > 59)))
	{
		alert("Please check your the format of the time (hh:mm)");
		myItem.focus();
		myItem.value = "hh:mm";
		return false;
	}
	else
	{
		return true;
	}
};

function checkCardNumber(myItem){
	var myStr;
	myStr = "" + myItem.value;
	
	if(isNaN(myItem.value) || (myStr.length != 16 && myStr.length != 15)){
		alert("Please check your credit card number, it should be 15 or 16 digits long without spaces.");
		myItem.focus();
		myItem.value = "";
	}
};

function checkExpiration(myItem){
	var myArrayDate, myMonth, myYear, myString, myYearDigit;
	myString = myItem.value + "";
	
	myArrayDate = myString.split("/");
	myMonth = parseInt(myArrayDate[0]);
	myYear = parseInt(myArrayDate[1]);
	myString = myArrayDate[1] + "";
	myYearDigit = myString.length;
	if (isNaN(myMonth) || isNaN(myYear) || (myMonth < 0) || (myMonth > 12) || (myYearDigit < 4))
	{
		alert("Please check your expiration date format (mm/yyyy)");
		myItem.focus();
		myItem.value = "mm/yyyy";
		return false;
	}
	else
	{
		return true;
	}
};

function checkAndCompareDate(FirstDate,SecondDate,type){
	if(checkDate(FirstDate) && checkDate(SecondDate)) return true;
	if(compareDates(FirstDate, SecondDate, type)) return true;
	else {
		SecondDate.value = "jj/mm/aaaa";
		alert("Arrival date should be before departure date.");
		return false;
	}
};

function checkDate(myItem){
	var myArrayDate, myDay, myMonth, myYear, myString, myYearDigit;
	myString = myItem.value + "";
	if (myString == "" || myString == "dd/mm/yyyy" || myString == "jj/mm/aaaa"){
		myItem.value = "jj/mm/aaaa";
		return true;
	}
	myArrayDate = myString.split("/");
	
	myDay = Math.round(parseFloat(myArrayDate[0]));
	myMonth = Math.round(parseFloat(myArrayDate[1]));
	myYear = Math.round(parseFloat(myArrayDate[2]));
	myString = myYear + "";
	myYearDigit = myString.length;
	
	if (isNaN(myDay) || isNaN(myMonth) || isNaN(myYear) || (myYear < 1) || (myDay < 1) || (myMonth < 1) || (myMonth > 12) || (myYearDigit != 4) || (myDay > days_in(myMonth, myYear)))
	{
		alert("Veuillez verifier le format de date. (jj/mm/aaaa)");
		myItem.value = "jj/mm/aaaa";
		return true;
	}
	else
	{
		return false;
	}
};

function isLeap(year){
	if(year % 400 == 0){
		return true;
	}
	else if((year % 4 == 0) && (year % 100 != 0)){
		return true
	}
	else return false;
};
	
function days_in(month, year){
	if(month == 4 || month == 6 || month == 9 || month == 11){
		return 30;
	}
	else if(!isLeap(year) && month == 2){
		return 28;
	}
	else if(isLeap(year) && month == 2){
		return 29;
	}
	else return 31;
};

function compareDates(myDate, myDate2, type){
	
	var myArrayDate, myArraydate2, myDay, myMonth, myYear, myString, myString2, myYearDigit, theDate = new Date(), theDate2 = new Date(), debut = new Date, fin = new Date();
	
	debut.setDate(10);
	debut.setMonth(03);
	debut.setYear(2002);
	fin.setDate(12);
	fin.setMonth(03);
	fin.setYear(2002);
	myString = myDate.value + "";
	myString2 = myDate2.value + "";
	myArrayDate = myString.split("/");
	myArrayDate2 = myString2.split("/");
	theDate.setDate(myArrayDate[0]);
	theDate.setMonth(myArrayDate[1]-1);
	theDate.setYear(myArrayDate[2]);
	theDate2.setDate(myArrayDate2[0]);
	theDate2.setMonth(myArrayDate2[1]-1);
	theDate2.setYear(myArrayDate2[2]);
	
	if (myString == "" || myString2 == "" || myString == "jj/mm/aaaa" || myString2 == "jj/mm/aaaa" || myString == "dd/mm/yyyy" || myString2 == "dd/mm/yyyy"){
			return true;
	}
	
	if(theDate2.valueOf() - theDate.valueOf() < 0){
		return false;
	}
	else{
		return true;
	}
};
function checkPrctPurchasing(myItem1){
	var myForm,
		total = 0,
		prct1 = 0,
		prct2 = 0,
		prct3 = 0,
		prct4 = 0,
		prct5 = 0;
		
	myForm = myItem1.form;
	prct1 = parseFloat("" + myForm.f_local_prct.value);
	prct2 = parseFloat("" + myForm.f_import_prct.value);
	
	if (checkNumeric(myItem1)){
		total = parseFloat(prct1) + parseFloat(prct2);
		if(parseFloat(total) > 100){
			alert("The percentages sum is greater than 100.");
			myItem1.value = "";
			return false;
		}
		else{
				return true;
		}
	}
};
function checkPrct(myItem1){
	var myForm,
		total = 0,
		prct1 = 0,
		prct2 = 0,
		prct3 = 0,
		prct4 = 0,
		prct5 = 0;
		
	myForm = myItem1.form;
	prct1 = parseFloat("" + myForm.f_distribution_prct.value);
	prct2 = parseFloat("" + myForm.f_assembling_prct.value);
	prct3 = parseFloat("" + myForm.f_retail_prct.value);
	prct4 = parseFloat("" + myForm.f_direct_prct.value);
	prct5 = parseFloat("" + myForm.f_other_prct.value);
	
	if (checkNumeric(myItem1)){
		total = parseFloat(prct1) + parseFloat(prct2) + parseFloat(prct3) + parseFloat(prct4) + parseFloat(prct5);
		if(parseFloat(total) > 100){
			alert("The percentages sum is greater than 100.");
			myItem1.value = "";
			return false;
		}
		else{
				return true;
		}
	}
};

function changeLogistic() {
	document.forms[0].f_change_logistic.value = 1;
};
function changeReservation() {
	document.forms[0].f_change_reservation.value = 1;
};
function getValidate(myFirstDate,myLastDate,sNights,my_remote,typeStr,my_person){
	var myForm=document.forms[0],myURL =""; 
	if(document.forms[0].f_invited[0].checked == true || document.forms[0].f_will_attend[0].checked == true){
		myURL =	"../secured/HotelBooking/admin/hb_f1.asp?f_arr=" + myFirstDate; 
		myURL = myURL + "&f_dep=" + myLastDate; 
		myURL = myURL + "&f_admin=2&f_orig=" + sNights + "&f_nights=" + sNights;
		myURL = myURL + "&f_first_name=";
		myURL = myURL + escape(myForm.f_first_name.value);
		myURL = myURL + "&f_last_name=";
		myURL = myURL + escape(myForm.f_last_name.value);
		myURL = myURL + "&f_type=" + my_remote + "&f_typeStr=" + typeStr + "&f_id_person=" + my_person;
		launchwin(myURL,"hb","alwaysRaised=yes,height=480,width=500,menubar=no,resizable=yes,toolbar=no,status=yes,screenX=50,scrollbars=no");
	}else{
		alert("This attendee is not confirmed.");
	}
};
function editHotelBooking(myFirstDate,myLastDate,sNights,my_remote,typeStr,my_person){
	var myForm=document.forms[0],myURL ="";
	if(document.forms[0].f_invited[0].checked == true || document.forms[0].f_will_attend[0].checked == true){
		myURL =	"../secured/HotelBooking/admin/hb_f1.asp?f_arr=" + myFirstDate;
		myURL = myURL + "&f_dep=" + myLastDate;
		myURL = myURL + "&f_admin=1&f_orig=" + sNights + "&f_nights=" + sNights;
		myURL = myURL + "&f_first_name=";
		myURL = myURL + escape(myForm.f_first_name.value);
		myURL = myURL + "&f_last_name=";
		myURL = myURL + escape(myForm.f_last_name.value);
		myURL = myURL + "&f_type=" + my_remote + "&f_typeStr=" + typeStr;
		myURL = myURL + "&f_id_person=" + my_person;
		launchwin(myURL,"hb","alwaysRaised=yes,height=480,width=500,menubar=no,resizable=yes,toolbar=no,status=yes,screenX=50,scrollbars=no");
	}else{
		alert("This attendee is not confirmed.");
	}	
};
function getHotelBooking(my_remote,typeStr,my_person){
	var myForm=document.forms[0],myURL ="";
	if(document.forms[0].f_invited[0].checked == true || document.forms[0].f_will_attend[0].checked == true){
		myURL =	"../secured/HotelBooking/admin/hb_f1.asp?f_arr=";
		if (myForm.f_arrival_date.value != "dd/mm/yyyy" && myForm.f_arrival_date.value != "jj/mm/aaaa"){
			myURL = myURL + escape(myForm.f_arrival_date.value);
		}
		myURL = myURL + "&f_dep=";
		if (myForm.f_departure_date.value != "dd/mm/yyyy" && myForm.f_departure_date.value != "jj/mm/aaaa"){;
			myURL = myURL + escape(myForm.f_departure_date.value);
		}
		myURL = myURL + "&f_admin=0&f_first_name=";
		myURL = myURL + escape(myForm.f_first_name.value);
		myURL = myURL + "&f_last_name=";
		myURL = myURL + escape(myForm.f_last_name.value);
		myURL = myURL + "&f_type=" + my_remote + "&f_typeStr=" + typeStr + "&f_id_person=" + my_person;
		launchwin(myURL,"hb","alwaysRaised=yes,height=480,width=500,menubar=no,resizable=yes,toolbar=no,status=yes,screenX=50,scrollbars=no");
	}else{
		alert("This attendee is not confirmed.");
	}
};
function getHotelBookingUser(my_remote,typeStr,my_person){
	var myForm=document.forms[0],myURL ="";
	myURL =	"../secured/HotelBooking/hb_f1.asp?f_arr=";
	if (myForm.f_arrival_date.value != "dd/mm/yyyy" && myForm.f_arrival_date.value != "jj/mm/aaaa"){
		myURL = myURL + escape(myForm.f_arrival_date.value);
	}
	myURL = myURL + "&f_dep=";
	if (myForm.f_departure_date.value != "dd/mm/yyyy" && myForm.f_departure_date.value != "jj/mm/aaaa"){;
		myURL = myURL + escape(myForm.f_departure_date.value);
	}
	myURL = myURL + "&f_admin=0&f_first_name=";
	myURL = myURL + escape(myForm.f_first_name.value);
	myURL = myURL + "&f_last_name=";
	myURL = myURL + escape(myForm.f_last_name.value);
	myURL = myURL + "&f_type=" + my_remote + "&f_typeStr=" + typeStr + "&f_id_person=" + my_person;
	launchwin(myURL,"hb","alwaysRaised=yes,height=480,width=500,menubar=no,resizable=yes,toolbar=no,status=yes,screenX=50,scrollbars=no");
};

function bc_retLoad(myContent){
	window.parent.parent.frames[0].location.replace("../EN/bc_retmanage.asp?f_content=" + myContent);
};
function bc_retLoadParent(myContent){
	window.parent.parent.parent.frames[0].location.replace("../EN/bc_retmanage.asp?f_content=" + myContent);
};
function bc_venLoad(myContent){
	window.parent.parent.frames[0].location.replace("../EN/bc_venmanage.asp?f_content=" + myContent);
};
function bc_venLoadParent(myContent){
	window.parent.parent.parent.frames[0].location.replace("../EN/bc_venmanage.asp?f_content=" + myContent);
};
function bc_visLoad(myContent){
	window.parent.parent.frames[0].location.replace("../EN/bc_vismanage.asp?f_content=" + myContent);
};
function bc_visLoadParent(myContent){
	window.parent.parent.parent.frames[0].location.replace("../EN/bc_vismanage.asp?f_content=" + myContent);
};
function bc_jouLoad(myContent){
	window.parent.parent.frames[0].location.replace("../EN/bc_joumanage.asp?f_content=" + myContent);
};
function bc_jouLoadParent(myContent){
	window.parent.parent.parent.frames[0].location.replace("../EN/bc_joumanage.asp?f_content=" + myContent);
};
function bc_speLoad(myContent){
	window.parent.parent.frames[0].location.replace("../EN/bc_spemanage.asp?f_content=" + myContent);
};
function bc_speLoadParent(myContent){
	window.parent.parent.parent.frames[0].location.replace("../EN/bc_spemanage.asp?f_content=" + myContent);
};
function bc_staLoad(myContent){
	window.parent.parent.frames[0].location.replace("../EN/bc_stamanage.asp?f_content=" + myContent);
};
function bc_staLoadParent(myContent){
	window.parent.parent.parent.frames[0].location.replace("../EN/bc_stamanage.asp?f_content=" + myContent);
};