function popupTAF(uri,title){

	openViewer2(605,
				405, 
				'/fw/script/tellafriend/?uri=' + encodeURIComponent(uri) + '&title=' + title, 
				"d_viewer_taf",
				_L("Send to a friend"));

}

//distance popup begin

	function popupZipcode(id){

		openViewer2(435,
					175, 
					'/fw/dossier/zipcode.php', 
					"d_viewer_zipcode",
					_L("Type your zipcode"));

	}

	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("Geographical localisation");	
		

		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("Send a message"));

	}

	function popupComment(context, id, ownerID){

	//height, is 365 with scode

		openViewer2(450,
					315, 
					'/fw/script/comment/comment.php?context=' + context + '&id=' + id + '&ownerID=' + ownerID, 
					"d_viewer_comment",
					_L("Leave a comment"));

	}









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;

}