function popupWindow(url) {
	window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=640, height=640,screenX=30,screenY=30,top=30,left=30')
}

function popupWindowTaille(url, larg, haut) {
	if(larg == undefined) {
		larg = 400;
	}
	if(haut == undefined) {
		haut = 400
	}
	window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+larg+', height='+haut+',screenX=30,screenY=30,top=30,left=30')
}

Ajax.Request.prototype.abort = function() {
		// prevent and state change callbacks from being issued
		this.transport.onreadystatechange = Prototype.emptyFunction;
		// abort the XHR
		this.transport.abort();
		// update the request counter
		Ajax.activeRequestCount--;
	};

function favori(lang, id_hotel, act, el) {
	var f = majFavori.curry($(el));
	new Ajax.Request('/'+lang+'/ajax/favori.php', {
		parameters: {
			act: act,
			i: id_hotel
		},
		onSuccess: function(renvoi) {
			f(renvoi);
		}
	});
}

function majFavori(elem, xml) {
	elem.replace(xml.responseXML.getElementsByTagName("lien").item(0).firstChild.data);
	$('retourFavoris').update(xml.responseXML.getElementsByTagName("panneau").item(0).firstChild.data);
}