function popupTAF(uri,title){

	openViewer2(605,
				405, 
				'/fw/script/tellafriend/?uri=' + encodeURIComponent(uri) + '&title=' + title, 
				"d_viewer_taf",
				_L("Envoyer à un ami"));

}

//distance popup begin

	function popupZipcode(id){

		openViewer2(435,
					175, 
					'/fw/dossier/zipcode.php', 
					"d_viewer_zipcode",
					_L("Entrez votre code postal"));

	}

	function popupGMap(zip_src, zip_dest){

		str_dest = '';
		if(zip_dest != undefined){
			ttitle		= _L("Trajet");
			str_dest 	= '&zip_dest=' + encodeURIComponent(zip_dest);
		}
		else
			ttitle 	= _L("Emplacement géographique");	
		

		openViewer2(450,
					400, 
					'/fw/util/gmap.php?zip_src=' + encodeURIComponent(zip_src) + str_dest, 
					"d_viewer_gmap",
					ttitle);

	}

//distance popup end


	function popupMsg(id, context){

		if(context == undefined)
			context = '';

		openViewer2(505,
					365, 
					'/fw/data/mail/msg.php?context=' + context + '&usrid=' + id, 
					"d_viewer_msg",
					_L("Envoyer un message"));

	}

	/*function popupComment(context, id, ownerID){

		//height, is 365 with scode
		openViewer2(450,
					315, 
					url, 
					"d_viewer_comment",
					_L("Laisser un commentaire"));
	}*/




function addfriend(id){
	loadXMLDoc('/xml/xmlcontact.php?action=addFriend&usrid=' + id,	'xmlresponse');
}

function delfriend(id){
	loadXMLDoc('/xml/xmlcontact.php?action=delFriend&usrid=' + id,	'xmlresponse');
}


function addfavorite(id, context){

	if(context == undefined)
		context = '';

	loadXMLDoc('/xml/xmlcontact.php?action=addFav&context=' + context + '&usrid=' + id,	'xmlresponse');
}


function delfavorite(id, context){

	if(context == undefined)
		context = '';

	loadXMLDoc('/xml/xmlcontact.php?action=delFav&context=' + context + '&usrid=' + id,	'xmlresponse');
}



function no_action(){

	gById("xMsg").innerHTML = _L("Bien essayé, mais il n'est pas possible d'interagir avec soi-même");
	document.documentElement.scrollTop = 0;

}
