/**
 * @author rgaumond
 */
// JavaScript Document
function activite_object(id, title, date_text, difficulty, distance, finalcost, status, nouvelle, selected_inscrit, camping, meteo,
						 bbq, description, organisateur_id, organisateur_image, organisateur_firstName,level, 
						 date_retardataire, prix_retardataire, prix_transport, paypal, date, date2, cost, date_depart,
						  bougex_url,depart_id, void_reason, meteo_id,organisateur_email,depart_disponible
						  ,inscrit,day,month,year,departURL)
{
	try{	
		var activityDate=new Date();
		this.id = id;
		this.title = title;
		this.date = date;
		this.date_text = date_text;
		this.difficulty =difficulty;
		this.difficulty_image = pathToImages+"/difficulte"+difficulty+".gif";
		this.distance = distance;
		this.cost = cost;
		if(cost=='0,0000')
			this.cost = 0;
		else
			this.cost = cost;
		this.finalcost = finalcost;
		this.status = status;
		this.level = level;
		this.nouvelle = (nouvelle==1);
		this.complet = (status==1);
		this.complete = (status==1);
		this.annulee = (status==2);
		this.incontournable = (level==2);
		this.verouillee = (status==4);
		this.camping = camping;		
		this.bbq = bbq;;
		this.description = description;
		this.date_retardataire = date_retardataire;
		this.prix_retardataire = prix_retardataire;
		this.prix_transport = prix_transport;
		this.organisateur_id = organisateur_id;
		this.organisateur_email = organisateur_email;
		this.organisateur_image = "images/users/"+organisateur_image;
		this.organisateur_firstName=organisateur_firstName;
		this.date = date;
		this.date2=date2;
		this.paypal = paypal==1;
		this.meteo=meteo;
		this.prix_text = format_as_currency(this.finalcost);
		this.prix_retardataire_text = format_as_currency(this.prix_retardataire);
		this.prix_transport_text = format_as_currency(this.prix_transport);
		this.date_depart = date_depart;
		this.bougex_url=bougex_url;
		this.depart_id=depart_id;
		this.user_list = new Array();
		this.meteo_id = meteo_id;
		this.void_reason = void_reason;
		this.depart_disponible=depart_disponible;
		this.inscrit=selected_inscrit>0;
		this.month = month-1;
		this.year = year;
		this.day = day;
		this.departURL = departURL;
		myDate = new Date();

		this.date_date = myDate.setFullYear(year,this.month,day);
		
	}catch(e){alert("error in function activite_object(ceremony_object). Error:"+e)}
}

function activite_info_object(id, title, date_text, status, nouvelle,level, description, date, date2, cost, date_depart,
						  bougex_url,depart_id,depart_disponible,inscrit,organisateur_email,organisateur_image)
{
	try{	
		this.id = id;
		this.title = title;
		this.date = date;
		this.date_text = date_text;
		this.status = status;
		this.level = level;
		this.nouvelle = (nouvelle==1);
		this.complet = (status==1);
		this.annulee = (status==2);
		this.incontournable = (level==2);
		this.verouillee = (status==4);
		this.description = description;
		this.date = date;
		this.date2=date2;
		this.date_depart = date_depart;
		this.bougex_url=bougex_url;
		this.depart_id=depart_id;
		this.depart_disponible=depart_disponible;
		this.inscrit=inscrit>0;
		this.organisateur_email = organisateur_email;
		this.organisateur_image = "images/users/"+organisateur_image;
		
	}catch(e){alert("error in function activite_object(ceremony_object). Error:"+e)}
}