function registerClick(link)
{
	$.ajax({
	   type: "GET",
	   url: "click.php",
	   data: "link=" + encodeURIComponent(link.href) + "&title=" + encodeURIComponent(getLinkTitle(link)),
	   success: function(msg){
	   },
	   cache:false
	});    
	return false;
}

function getLinkTitle(link)
{
	var text = $(link).text();
	var re = /[^-a-zA-Zà-ÿÀ-ÿ:\/. ]/g;
	text = text.replace(re, "");
	var reSpaces = /^\s*$/;
	if (text == null || text == "" || reSpaces.test(text))
	{
		text = $(link).children().filter("img").get(0).alt;
	}
	return text;
}

function rv()
{
	var dest = "rv.php";
	$.ajax({
	   type: "GET",
	   url: dest,
	   data: "link=" + encodeURIComponent(window.location),
	   success: function(msg){
	   },
	   cache:false
	});    
}

$(document).ready(function(){
	rv();
});
