var qTipTag="img"
var qTipX=5
var qTipY=10
tooltip={
name : "qTip",
offsetX : qTipX,
offsetY : qTipY,
tip : null}
tooltip.init=function(){
var tipNameSpaceURI="http://www.w3.org/1999/xhtml"
if(!tipContainerID){var tipContainerID="qTip";}
var tipContainer=document.getElementById(tipContainerID)
if(!tipContainer){
tipContainer=document.createElementNS ? document.createElementNS(tipNameSpaceURI,"div"): document.createElement("div")
tipContainer.setAttribute("id",tipContainerID)
document.getElementsByTagName("body").item(0).appendChild(tipContainer)}
if(!document.getElementById)return
this.tip=document.getElementById(this.name)
if(this.tip)document.onmousemove=function(evt){tooltip.move(evt)}
var a,sTitle,elements
var elementList=qTipTag.split(",")
for(var j=0;j<elementList.length;j++){
elements=document.getElementsByTagName(elementList[j])
if(elements){
for(var i=0;i<elements.length;i++){
a=elements[i]
sTitle=a.getAttribute("title")
if(sTitle){
a.setAttribute("tiptitle",sTitle)
a.removeAttribute("title")
a.removeAttribute("alt")
a.onmouseover=function(){tooltip.show(this.getAttribute('tiptitle'))}
a.onmouseout=function(){tooltip.hide()}}}}}}
tooltip.move=function(evt){
var x=0,y=0
if(document.all){
x=(document.documentElement&&document.documentElement.scrollLeft)? document.documentElement.scrollLeft : document.body.scrollLeft
y=(document.documentElement&&document.documentElement.scrollTop)? document.documentElement.scrollTop : document.body.scrollTop
x+=window.event.clientX
y+=window.event.clientY
}else{
x=evt.pageX
y=evt.pageY}
this.tip.style.left=(x+this.offsetX)+"px"
this.tip.style.top=(y+this.offsetY)+"px"}
tooltip.show=function(text){
if(!this.tip)return
this.tip.innerHTML=text
this.tip.style.display="block"}
tooltip.hide=function(){
if(!this.tip)return
this.tip.innerHTML=""
this.tip.style.display="none"}
window.onload=function(){
tooltip.init()}
function bloc(){return false;}
function frienddel()
{
var check1=false;
len = document.fform.length;
for (i = 0; i <len; i++)
if(document.fform[i].checked)
check1=true;
if(check1)
return confirm('Etes vous sûr vouloir supprimer?');
else
{
alert('Selectionner au moins 1 ami à supprimer');
return false;
}
}
function favoritedel()
{
var check1=false;
len = document.fform.length;
for (i = 0; i <len; i++)
if(document.fform[i].checked)
check1=true;
if(check1)
return confirm('Etes vous sur de voiloir supprimer ce(s) jeu(x)?');
else
{
alert('Selectionner au moins 1 jeu');
return false;
}
}
function popUp(URL){
day=new Date()
id=day.getTime()
eval("page"+id+" = window.open(URL, '"+id+"', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300');")}
<!--Begin
function popchat(URL){
day=new Date()
id=day.getTime()
eval("page"+id+" = window.open(URL, '"+id+"', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=634,height=476');")}
<!--Begin
function verify(){
if(document.form.message.value==""){
alert("Veuillez ecrire un commentaire svp")
return false}
else{
return true}}
function verifpoll(){
if(document.form.question.value.length < 5){
alert("La question doit contenir 5 caracteres minimum!")
return false}
else{
return true}}
function verif(){
if(document.form.reportmessage.value==""){
alert("Veuillez ecrire un message svp.")
return false}
else{
return true}}
function verif2(){
if(document.form.description.value==""){
alert("Veuillez ecrire un description svp.")
return false}
else{
return true}}
<!--Begin
function verifye(){
if(document.formessage.messagesubject.value==""){
alert("Veuillez ecrire un sujet svp.")
return false}
else{
if(document.formessage.message.value==""){
alert("Veuillez ecrire un message svp.")
return false
}else{
return true}}}
<!--
function emo(emo){
document.getElementById("message").value+=emo}
<!--
function confirmDelete(){
var ok=confirm("Etes vous sur de vouloir supprimer ce(s) message(s)?")
if(ok)
return true
else
return false}
function verifcontact(){
if(document.formcontact.sendername.value==""){
alert("Veuillez ecrire votre nom svp.")
return false}
var email=document.formcontact.senderemail.value
if(email.search(/^[_a-z0-9-]+(.[_a-z0-9-]+)*[^._-]@[a-z0-9-]+(.[a-z0-9]{2,4})*$/)==-1)
{alert('Please enter a valid Email Address!')
document.formcontact.senderemail.focus()
return false}
if(document.formcontact.messagesubject.value==""){
alert("Veuillez ecrire un sujet svp.")
return false}
if(document.formcontact.message.value==""){
alert("Veuillez ecrire un message svp")
return false
}else{
return true}}
<!--
function confirmDeletegame(){
var ok=confirm("Etes vous sur de vouloir supprimer ce(s) jeux(x)?")
if(ok)
return true
else
return false}
var ns6=document.getElementById&&!document.all
function restrictinput(maxlength,e,placeholder){
if(window.event&&event.srcElement.value.length>=maxlength)
return false
else if(e.target&&e.target==eval(placeholder)&&e.target.value.length>=maxlength){
var pressedkey=/[a-zA-Z0-9\.\,\/]/
if(pressedkey.test(String.fromCharCode(e.which)))
e.stopPropagation()}}
function countlimit(maxlength,e,placeholder){
var theform=eval(placeholder)
var lengthleft=maxlength-theform.value.length
var placeholderobj=document.all? document.all[placeholder] : document.getElementById(placeholder)
if(window.event||e.target&&e.target==eval(placeholder)){
if(lengthleft<0)
theform.value=theform.value.substring(0,maxlength)
placeholderobj.innerHTML=lengthleft}}
function displaylimit(thename,theid,thelimit){
var theform=theid!=""? document.getElementById(theid): thename
var limit_text='<b><span id="'+theform.toString()+'">'+thelimit+'</span></b> caracteres restants'
if(document.all||ns6)
document.write(limit_text)
if(document.all){
eval(theform).onkeypress=function(){return restrictinput(thelimit,event,theform)}
eval(theform).onkeyup=function(){countlimit(thelimit,event,theform)}}
else if(ns6){
document.body.addEventListener('keypress',function(event){restrictinput(thelimit,event,theform)},true)
document.body.addEventListener('keyup',function(event){countlimit(thelimit,event,theform)},true)}}
var cinmode = '';
function cinemamode(mode)
{
if (mode == 1)
{
resizecinema();
cinmode=1;
document.getElementById('playerdiv').style.zIndex = '1000';
document.getElementById('cinemamenu_on').style.display = 'none';
changeOpac(0,'dimlights1');
document.getElementById('dimlights1').style.display = 'block';
opacity('dimlights1', 0, 75, 750);
setTimeout("document.getElementById('cinemamenu_off').style.display = 'block';",750);
document.getElementById('cinemamenu_off').style.zIndex = '100';
}
else
{
document.getElementById('cinemamenu_off').style.display = 'none';
opacity('dimlights1', 75, 0, 500);
setTimeout("document.getElementById('playerdiv).style.zIndex = '0';",750);
setTimeout("document.getElementById('dimlights1').style.display='none';",750);
setTimeout("document.getElementById('cinemamenu_on').style.display = 'block';",750);
cinmode=0;
}
}
function opacity(id, opacStart, opacEnd, millisec) {
//speed for each frame
var speed = Math.round(millisec / 100);
var timer = 0;
if(opacStart > opacEnd) {
for(i = opacStart; i >= opacEnd; i--) {
setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
timer++;
}
} else if(opacStart < opacEnd) {
for(i = opacStart; i <= opacEnd; i++)
{
setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
timer++;
}
}
}

function createObject() {
	var request_type;
	var browser = navigator.appName;
	if(browser == "Microsoft Internet Explorer"){
	request_type = new ActiveXObject("Microsoft.XMLHTTP");
	}else{
		request_type = new XMLHttpRequest();
	}
		return request_type;
}

var http = createObject();

function autosuggest() {	
q = document.getElementById('sterm').value;
nocache = Math.random();
var q = q.replace("'","\\'" );
masterDir = "/includes/";
http.open('get', masterDir+'suggest.php?q='+q+'&nocache = '+nocache);
http.onreadystatechange = autosuggestReply;
http.send(null);
} 
function autosuggestReply() {
if(http.readyState == 4){
	var response = http.responseText;
	e = document.getElementById("results");
	if(response!=""){
		e.innerHTML=response;
		e.style.display="block";
	} else {
		e.style.display="none";
	}
}
}
function fill(i) {
document.searchf.sterm.value=i;
document.forms["searchf"].submit();
document.getElementById("results").style.display="none";
}
function show(arg) {
if(document.getElementById)
document.getElementById(arg).style.visibility = "visible";
document.getElementById(arg).style.display = "block";
}
function hide(arg) {
if(document.getElementById)
document.getElementById(arg).style.visibility = "hidden";
document.getElementById(arg).style.display = "none";
}

var xmlHttp
function GetXmlHttpObject(){
var xmlHttp = null;
try {
// Firefox, Opera 8.0+, Safari
xmlHttp = new XMLHttpRequest();
}
catch (e) {
// Internet Explorer
try {
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e){
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp;
}
function addfav(id){
xmlHttp = GetXmlHttpObject()
if(xmlHttp == null){
alert ("Your browser does not support AJAX!");
return;
}
xmlHttp.onreadystatechange = function(){
var addedok = document.getElementById('favourite');
if (xmlHttp.readyState == 4){
//loader.style.display = 'none';
var res = xmlHttp.responseText;
//alert(res);
var newPerc = res;
if (res =='complete'){
addedok.style.display = 'block';
addedok.innerHTML = '<div class="voted">Ajouté au favoris!</div>';
}
else{
addedok.style.display = 'block';
addedok.innerHTML = '<div class="voted_twice">Jeu deja present!</div>';
}
}
}
var url = "./index.php?action=makefavorite";
var params = "id="+id;
xmlHttp.open("POST",url,true);
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp.setRequestHeader("Content-length", params.length);
xmlHttp.setRequestHeader("Connection", "close");
xmlHttp.send(params);
}
function addtogroup(fid,gid){
xmlHttp = GetXmlHttpObject()
if(xmlHttp == null){
alert ("Your browser does not support AJAX!");
return;
}
xmlHttp.onreadystatechange = function(){
var addedok = document.getElementById('favourite');
if (xmlHttp.readyState == 4){
//loader.style.display = 'none';
var res = xmlHttp.responseText;
//alert(res);
var newPerc = res;
if (res =='complete'){
addedok.style.display = 'block';
addedok.innerHTML = '<div class="voted">Ajouté au groupe!</div>';
}
else{
addedok.style.display = 'block';
addedok.innerHTML = '<div class="voted_twice">Deja ajouté!</div>';
}
}
}
var url = "./equipes.php?action=sharewithgroup";
var params = "fid="+fid+"&gid="+gid;
xmlHttp.open("POST",url,true);
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp.setRequestHeader("Content-length", params.length);
xmlHttp.setRequestHeader("Connection", "close");
xmlHttp.send(params);
}
function addfriend(id,uid){
xmlHttp = GetXmlHttpObject()
if(xmlHttp == null){
alert ("Your browser does not support AJAX!");
return;
}
xmlHttp.onreadystatechange = function(){
var addedok = document.getElementById('friends');
if (xmlHttp.readyState == 4){
//loader.style.display = 'none';
var res = xmlHttp.responseText;
//alert(res);
var newPerc = res;
if (res =='complete'){
addedok.style.display = 'block';
addedok.innerHTML = '<div class="voted">Ajouté au amis!</div>';
}
else{
addedok.style.display = 'block';
addedok.innerHTML = '<div class="voted_twice">Deja present</div>';
}
}
}
var url = "./index.php?action=makefriend";
var params = "frid="+id;
xmlHttp.open("POST",url,true);
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp.setRequestHeader("Content-length", params.length);
xmlHttp.setRequestHeader("Connection", "close");
xmlHttp.send(params);
}

