function openMention(page)
{
	window.open('/'+page+'/','memtions_legales','directories=no,location=no,menubar=no,resizable=yes,scrollbars=no,status=no,toolbar=no,width=360,height=110');
}
function getObj(id) 
{
	if (document.all) { return document.all[id]; } 
	else {	return document.getElementById(id);	}
}
function btOver(id)
{
	getObj(id+'p').className = getObj(id+'p').className + 'Over';
	for (var i=2; i<6; i++)
	{
		var idb = id + 't' + i;
		getObj(idb).className = getObj(idb).className + 'Over';
		var idb = id + 'b' + i;
		getObj(idb).className = getObj(idb).className + 'Over';
	}
	getObj(id).className = getObj(id).className + 'Over';
}

function btOut(id)
{
	getObj(id+'p').className = getObj(id+'p').className.substring(0,getObj(id+'p').className.length -4);
	for (var i=2; i<6; i++)
	{
		var idb = id + 't' + i;
		getObj(idb).className = getObj(idb).className.substring(0,getObj(idb).className.length -4);
		var idb = id + 'b' + i;
		getObj(idb).className = getObj(idb).className.substring(0,getObj(idb).className.length -4);
	}
	getObj(id).className = getObj(id).className.substring(0,getObj(id).className.length -4);
}
		
function getAbsoluteOffsetTop(obj) 
{
	var top = obj.offsetTop;
	var parent = obj.offsetParent;
	while (parent != document.body) {
		top += parent.offsetTop;
		parent = parent.offsetParent;
	}
	top = top + 5;
	return top;
}

function getAbsoluteOffsetLeft(obj) 
{
	var left = obj.offsetLeft;
	var parent = obj.offsetParent;
	while (parent != document.body) {
		left += parent.offsetLeft;
		parent = parent.offsetParent;
	}
	left = left+5;
	return left;
}
function openNavigator(htPage,url,theme,num)
{
	window.open('/'+htPage+'/?theme='+theme+'&num='+num+'&id='+escape(url),'actu','directories=no,location=yes,menubar=yes,resizable=yes,scrollbars=yes,status=no,toolbar=yes,width=800,height=600');
}
var timerID = 0;

function getNbMails()
{
	if(window.XMLHttpRequest)   
		xhr_object = new XMLHttpRequest();   
	else if(window.ActiveXObject) 
		xhr_object = new ActiveXObject("Microsoft.XMLHTTP");   
	else 
	{  
		return;   
	}  
	var url = '/nbMails.htm';
	xhr_object.open("GET",url,true);
	div = document.getElementById('nbMails');
	
	xhr_object.onreadystatechange=function()
	{
		if (xhr_object.readyState == 4)
		{
			div.innerHTML = xhr_object.responseText;
		}
	}

	xhr_object.send(null); 
	//timerID = setTimeout("getNbMails()", 300000);
}
function sendFriend(htpage, id)
{
	window.open('/'+htpage+'/email.htm?id='+id,'Send_Mail','directories=no,location=no,menubar=no,resizable=yes,scrollbars=no,status=no,toolbar=no,width=405,height=350');
}

var http_request = false;
var req;

function rating(htpage, id, val) 
{
	if(window.XMLHttpRequest)   
		xhr_object = new XMLHttpRequest();   
	else if(window.ActiveXObject) 
		xhr_object = new ActiveXObject("Microsoft.XMLHTTP");   
	else 
	{  
		return;   
	}  
	var url = '/'+htpage+'/rating.htm?id='+id+'&rate='+val+'';
	xhr_object.open("GET",url,true);
	div = document.getElementById('ratingSuccess');
	
	xhr_object.onreadystatechange=function()
	{
		if (xhr_object.readyState == 4)
		{
			div.innerHTML = xhr_object.responseText;
		}
	}

	xhr_object.send(null); 
}
function addFav(htpage, id) 
{
	if(window.XMLHttpRequest)   
		xhr_object = new XMLHttpRequest();   
	else if(window.ActiveXObject) 
		xhr_object = new ActiveXObject("Microsoft.XMLHTTP");   
	else 
	{  
		return;   
	}  
	var url = '/'+htpage+'/fav.htm?id='+id+'';
	xhr_object.open("GET",url,true);
	div = document.getElementById('addFavSuccess');
	
	xhr_object.onreadystatechange=function()
	{
		if (xhr_object.readyState == 4)
		{
			div.innerHTML = xhr_object.responseText;
		}
	}
	xhr_object.send(null); 
}
function rating(htpage, id, val, uid) 
{
	if(window.XMLHttpRequest)   
		xhr_object = new XMLHttpRequest();   
	else if(window.ActiveXObject) 
		xhr_object = new ActiveXObject("Microsoft.XMLHTTP");   
	else 
	{  
		return;   
	}  
	var url = '/'+htpage+'/rating.htm?id='+id+'&rate='+val+'&uid='+uid+'';
	xhr_object.open("GET",url,true);
	div = document.getElementById('ratingSuccess');
	
	xhr_object.onreadystatechange=function()
	{
		if (xhr_object.readyState == 4)
		{
			div.innerHTML = xhr_object.responseText;
		}
	}

	xhr_object.send(null); 
}
function addFav(htpage, id, uid) 
{
	if(window.XMLHttpRequest)   
		xhr_object = new XMLHttpRequest();   
	else if(window.ActiveXObject) 
		xhr_object = new ActiveXObject("Microsoft.XMLHTTP");   
	else 
	{  
		return;   
	}  
	var url = '/'+htpage+'/fav.htm?id='+id+'&uid='+uid+'';
	xhr_object.open("GET",url,true);
	div = document.getElementById('addFavSuccess');
	
	xhr_object.onreadystatechange=function()
	{
		if (xhr_object.readyState == 4)
		{
			div.innerHTML = xhr_object.responseText;
		}
	}
	xhr_object.send(null); 
}
