function addEngine()
{if((typeof window.sidebar=="object")&&(typeof window.sidebar.addSearchEngine=="function")){window.sidebar.addSearchEngine("http://www.rembourser.com/firefox/reduction.src","http://www.rembourser.com/_img/google2.png","firefox2","png");}else{alert("Votre navigateur n'est pas Firefox");}}
function afficheWidget(){w=340;h=300;g=(screen.width-w)/2;op='scrollbars=no,toolbar=no,location=no,directories=nomenubar=no,resizable=no,status=no,width='+w+',height='+h+',screenX=50,screenY='+g+',top=50,left='+g+'';com=open('/pop.widget.php','',op);}
function correctImagePNG(o){if(document.all){var imgID=(o.id)?"id='"+o.id+"' ":""
var imgClass=(o.className)?"class='"+o.className+"' ":""
var imgTitle=(o.title)?"title='"+o.title+"' ":"title='"+o.alt+"' "
var imgStyle="display:inline-block;"+o.style.cssText
if(o.align=="left")imgStyle="float:left;"+imgStyle
if(o.align=="right")imgStyle="float:right;"+imgStyle
if(o.parentElement.href)imgStyle="cursor:hand;"+imgStyle
var strNewHTML="<span "+imgID+imgClass+imgTitle
+" style=\""+"width:"+o.width+"px; height:"+o.height+"px;"+imgStyle+";"
+"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+"(src=\'"+o.src+"\', sizingMethod='image');\"></span>"
o.outerHTML=strNewHTML}}
function valide(varl){fenetreNote=window.open("/redirect.php?id="+varl+"","","");}
function addRssGoogle(){window.open('http://fusion.google.com/add?source=atgs&feedurl=http%3A//www.rembourser.com/flux-rss.xml');}
function addRssYahoo(){window.open('http://add.my.yahoo.com/rss?url=http://www.rembourser.com/flux-rss.xml');}
function addRssAol(){window.open('http://feeds.my.aol.com/add.jsp?url=http://www.rembourser.com/flux-rss.xml');}
function addFacebook(){window.open('http://www.facebook.com/share.php?u='+document.location.href);}
function addYahoo(m){window.open('http://myweb2.search.yahoo.com/myresults/bookmarklet?u='+document.location.href+'&t='+encodeURI(''+m+''));}
function addBlogmarks(m){window.open('http://blogmarks.net/my/new.php?mini=1&simple=1&url='+document.location.href+'&title='+m+'');}
function addDigg(m){window.open('http://digg.com/submit?phase=2&url='+document.location.href+'&title='+''+m+'');}
function addYoolink(m){window.open('http://www.yoolink.fr/post/tag?site_id=323760&url='+document.location.href+'title='+''+m+'');}
function addTwitter(m){window.open('http://twitter.com/home?status=Je viens de lire : '+m+':'+document.location.href+'');}
function ChangeCon(str){var tmpa=document.getElementById('dernier1');var tmpb=document.getElementById('dernier2');var tmpc=document.getElementById('dernier3');if(str=='1'){tmpa.style.display='block';tmpb.style.display='none';tmpc.style.display='none';}
if(str=='2'){tmpa.style.display='none';tmpb.style.display='block';tmpc.style.display='none';}
if(str=='3'){tmpa.style.display='none';tmpb.style.display='none';tmpc.style.display='block';}}
function GetId(id){return document.getElementById(id);}
var i=false;var j=false;function move(e){if(i){if(navigator.appName!="Microsoft Internet Explorer"){GetId("curseur").style.left=e.pageX+5+"px";GetId("curseur").style.top=e.pageY+10+"px";}
else{if(document.documentElement.clientWidth>0){GetId("curseur").style.left=20+event.x+document.documentElement.scrollLeft+"px";GetId("curseur").style.top=10+event.y+document.documentElement.scrollTop+"px";}
else{GetId("curseur").style.left=20+event.x+document.body.scrollLeft+"px";GetId("curseur").style.top=10+event.y+document.body.scrollTop+"px";}}}
if(j){if(navigator.appName!="Microsoft Internet Explorer"){GetId("bulleinfo").style.left=e.pageX-10+"px";GetId("bulleinfo").style.top=e.pageY-75+"px";}else{if(document.documentElement.clientWidth>0){GetId("bulleinfo").style.left=-10+event.x+document.documentElement.scrollLeft+"px";GetId("bulleinfo").style.top=-75+event.y+document.documentElement.scrollTop+"px";}else{GetId("bulleinfo").style.left=-10+event.x+document.body.scrollLeft+"px";GetId("bulleinfo").style.top=-75+event.y+document.body.scrollTop+"px";}}}}
function montre(text){if(i==false){GetId("curseur").style.visibility="visible";GetId("curseurImg").src="/_img/boutique/"+text+".jpg";i=true;}}
function cache(){if(i==true){GetId("curseur").style.visibility="hidden";GetId("curseurImg").src="/_img/loading.gif";i=false;}}
function montre1(pSTr){if(j==false){GetId("bulleinfo").style.visibility="visible";GetId("bulleinfocontent").innerHTML=pSTr;j=true;}}
function cache1(){if(j==true){GetId("bulleinfo").style.visibility="hidden";j=false;}}
document.onmousemove=move;function AfficheCategorie(str,div){var tmp=document.getElementById(''+div+'');if(str=='1'){tmp.style.visibility='visible';}
else{tmp.style.visibility='hidden';}}
go_visibility=new Array;function goblink(){if(document.getElementById&&document.all){blink_tab=document.getElementsByTagName('blink');for(a=0;a<blink_tab.length;a++){if(go_visibility[a]!="visible")
go_visibility[a]="visible";else
go_visibility[a]="hidden";blink_tab[a].style.visibility=go_visibility[a];}}
setTimeout("goblink()",500);}
var ffade=0;var degreDeFade=10;var vitesseDeFase=10;var imgLeft=0;var imgTop=0;var imgWidth=0;var imgHeight=0;var doOpposit=0
var fadeitout;function fadeAll(valDiv){var newFadeVal=(ffade/100);if(document.all)document.getElementById(valDiv).style.filter='alpha(Opacity='+ffade+')';else document.getElementById(valDiv).style.MozOpacity=(newFadeVal);document.getElementById("imgzoom").style.left=imgLeft-((imgWidth/2)*newFadeVal);document.getElementById("imgzoom").style.top=imgTop-((imgHeight/2)*newFadeVal);document.getElementById("ig").style.width=imgWidth+((imgWidth)*newFadeVal);document.getElementById("ig").style.height=imgHeight+((imgHeight)*newFadeVal);if(doOpposit==1)tempofadeM(ffade,valDiv);else tempofade(ffade,valDiv);}
function tempofade(fad,valDiv){ffade=ffade+degreDeFade;if(ffade<101)fadeitout=setTimeout("fadeAll('"+valDiv+"')",vitesseDeFase);else return;}
function tempofadeM(fad,valDiv){ffade=ffade-degreDeFade;if(ffade>0)fadeitout=setTimeout("fadeAll('"+valDiv+"')",vitesseDeFase);else{document.getElementById("imgzoom").style.display="none";return;}}
function zoomIn(oThis,ca_id,pictnom){clearTimeout(fadeitout);doOpposit=0;iHtmlImg='<a href="/bon-reduction/'+pictnom+','+ca_id+'.html"><img id="ig" src="'+oThis.src+'" style="border:solid 1px #000000;"></a>';document.getElementById("imgzoom").onmouseout=function(){zoomOut();}
document.getElementById("imgzoom").style.left=imgLeft=getParentLeft(oThis,oThis.offsetParent.tagName,oThis.offsetLeft);document.getElementById("imgzoom").style.top=imgTop=getParentTop(oThis,oThis.offsetParent.tagName,oThis.offsetTop);document.getElementById("imgzoom").style.width=imgWidth=oThis.width;document.getElementById("imgzoom").style.height=imgHeight=oThis.height;document.getElementById("imgzoom").innerHTML=iHtmlImg;ffade=0;document.getElementById("imgzoom").style.MozOpacity=0;document.getElementById("imgzoom").style.display="";fadeAll("imgzoom");}
function zoomIn2(oThis,url){clearTimeout(fadeitout);doOpposit=0;iHtmlImg='<a href="'+url+'" target="_blank"><img id="ig" src="'+oThis.src+'" style="border:solid 1px #000000;"></a>';document.getElementById("imgzoom").onmouseout=function(){zoomOut();}
document.getElementById("imgzoom").style.left=imgLeft=getParentLeft(oThis,oThis.offsetParent.tagName,oThis.offsetLeft);document.getElementById("imgzoom").style.top=imgTop=getParentTop(oThis,oThis.offsetParent.tagName,oThis.offsetTop);document.getElementById("imgzoom").style.width=imgWidth=oThis.width;document.getElementById("imgzoom").style.height=imgHeight=oThis.height;document.getElementById("imgzoom").innerHTML=iHtmlImg;ffade=0;document.getElementById("imgzoom").style.MozOpacity=0;document.getElementById("imgzoom").style.display="";fadeAll("imgzoom");}
function getParentTop(oThis,p,pos){oN=oThis;pN=p;while(pN!="BODY"){pos=pos+oN.offsetParent.offsetTop;pN=oN.offsetParent.tagName;oN=oN.offsetParent;}
return pos;}
function getParentLeft(oThis,p,pos2){oN=oThis;pN=p;while(pN!="BODY"){pos2=pos2+oN.offsetParent.offsetLeft;pN=oN.offsetParent.tagName;oN=oN.offsetParent;}
return pos2;}
function zoomOut(){doOpposit=1;fadeAll("imgzoom");}
function handleMailInputOver(o){if('Votre e-mail'==o.value){o.value="";}
o.focus();}
function handleMailInputOut(o){if(''==o.value)o.value='Votre e-mail';o.style.borderColor='';}
function handleFooInputOver(o){if('Fnac, Amazon, Pixmania'==o.value){o.value="";}
o.focus();}
function handleFooInputOut(o){o.style.borderColor='';o.focus();}
function LoginAjax(l,p){var OAjax;if(window.XMLHttpRequest)OAjax=new XMLHttpRequest();else if(window.ActiveXObject)OAjax=new ActiveXObject('Microsoft.XMLHTTP');OAjax.open('POST',"/ajax.login.php",true);OAjax.onreadystatechange=function(){if(OAjax.readyState==4&&OAjax.status==200){if(document.getElementById){if(OAjax.responseText=='true'){document.getElementById('message_error_login').innerHTML='<font color=GREEN>'+OAjax.responseText+'</font>';}else{document.getElementById('message_error_login').innerHTML='<font color=RED>'+OAjax.responseText+'</font>';}}}}
OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');OAjax.send('login='+l+'&password='+p);}
function LoginPerduAjax(l){var OBjax;if(window.XMLHttpRequest)OBjax=new XMLHttpRequest();else if(window.ActiveXObject)OBjax=new ActiveXObject('Microsoft.XMLHTTP');OBjax.open('POST',"/ajax.login.perdu.php",true);OBjax.onreadystatechange=function(){if(OBjax.readyState==4&&OBjax.status==200){if(document.getElementById){if(OBjax.responseText=='true'){document.getElementById('message_error_perdu').innerHTML='<font color=GREEN>'+OBjax.responseText+'</font>';}else{document.getElementById('message_error_perdu').innerHTML='<font color=RED>'+OBjax.responseText+'</font>';}}}}
OBjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');OBjax.send('email='+l);}
function MailFormAjax(u,n,e1,e2){var OBjax;if(window.XMLHttpRequest)OBjax=new XMLHttpRequest();else if(window.ActiveXObject)OBjax=new ActiveXObject('Microsoft.XMLHTTP');OBjax.open('POST',"/ajax.email.form.php",true);OBjax.onreadystatechange=function(){if(OBjax.readyState==4&&OBjax.status==200){if(document.getElementById){if(OBjax.responseText=='Merci, Votre message a bien été envoyé'){document.getElementById('message_error_mail').innerHTML='<font color=GREEN>'+OBjax.responseText+'</font>';}else{document.getElementById('message_error_mail').innerHTML='<font color=RED>'+OBjax.responseText+'</font>';}}}}
OBjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');OBjax.send('url='+u+'&nom='+n+'&from='+e1+'&dest='+e2);}
function afficheLien2(u,i){w=(document.all?screen.width:screen.width)*0.9;h=(document.all?screen.height:screen.height-150)*0.9;op='scrollbars=yes,toolbar=yes,location=yes,directories=yes,menubar=yes,resizable=yes,status=yes,width='+w+',height='+h+',screenX=0,screenY=0,top=0,left=0';com=open('/'+u+'.php?id='+i,'',op);}
function afficheLien(u,i){w=(document.all?screen.width:screen.width)*0.9;h=(document.all?screen.height:screen.height-150)*0.9;op='scrollbars=yes,toolbar=yes,location=yes,directories=yes,menubar=yes,resizable=yes,status=yes,width='+w+',height='+h+',screenX=0,screenY=0,top=0,left=0';com=open('/'+u+'.php?id='+i,'',op);}
function documentOverlay(){var instance=this,bodyHeight=(function(){return getDocDim('Height','min');})();function css(el,o){for(var i in o){el.style[i]=o[i];}
return el;};function getDocDim(prop,m){m=m||'max';return Math[m](Math[m](document.body["scroll"+prop],document.documentElement["scroll"+prop]),Math[m](document.body["offset"+prop],document.documentElement["offset"+prop]),Math[m](document.body["client"+prop],document.documentElement["client"+prop]));}
function getWinHeight(){return window.innerHeight||(document.compatMode=="CSS1Compat"&&document.documentElement.clientHeight||document.body.clientHeight);}
this.css=function(o){css(instance.element,o);return instance;};this.duration=null;this.element=(function(){return css(document.createElement('div'),{width:'100%',height:getDocDim('Height')+'px',position:'absolute',zIndex:998,left:0,top:0,cursor:'wait'});})();window.onresize=function(){if(bodyHeight>getWinHeight()){return;}
instance.css({display:'none'});setTimeout(function(){instance.css({height:getDocDim('Height')+'px',display:'block'});},10);};this.remove=function(){this.element.parentNode&&this.element.parentNode.removeChild(instance.element);};this.show=function(){};this.on=function(what,handler){what.toLowerCase()==='show'?(instance.show=handler):instance.element['on'+what]=handler;return instance;};this.init=function(duration){instance.duration=duration||instance.duration;document.getElementsByTagName('body')[0].appendChild(instance.element);instance.show.call(instance.element,instance);instance.duration&&setTimeout(function(){instance.remove();},instance.duration);return instance;};}
function XHRConnection(){var conn=false;var debug=false;var datas=new String();var areaId=new String();var xmlObj;var xmlLoad;try{conn=new XMLHttpRequest();}
catch(error){if(debug){alert('Erreur lors de la tentative de creation de l\'objet \nnew XMLHttpRequest()\n\n'+error);}
try{conn=new ActiveXObject("Microsoft.XMLHTTP");}
catch(error){if(debug){alert('Erreur lors de la tentative de creation de l\'objet \nnew ActiveXObject("Microsoft.XMLHTTP")\n\n'+error);}
try{conn=new ActiveXObject("Msxml2.XMLHTTP");}
catch(error){if(debug){alert('Erreur lors de la tentative de creation de l\'objet \nnew ActiveXObject("Msxml2.XMLHTTP")\n\n'+error);}
conn=false;}}}
this.setDebugOff=function(){debug=false;};this.setDebugOn=function(){debug=true;};this.resetData=function(){datas=new String();datas='';};this.appendData=function(pfield,pvalue){datas+=(datas.length==0)?pfield+"="+escape(pvalue):"&"+pfield+"="+escape(pvalue);};this.setRefreshArea=function(id){areaId=id;};this.createXMLObject=function(){try{xmlDoc=document.implementation.createDocument("","",null);xmlLoad='onload';}
catch(error){try{xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlLoad='onreadystatechange ';}
catch(error){if(debug){alert('Erreur lors de la tentative de creation de l\'objet XML\n\n');}
return false;}}
return xmlDoc;}
this.setXMLObject=function(obj){if(obj==undefined){if(debug){alert('Parametre manquant lors de l\'appel de la methode setXMLObject');}
return false;}
try{xmlObj=obj;}
catch(error){if(debug){alert('Erreur lors de l\'affectation de l\'objet XML dans la methode setXMLObject');}}}
this.loadXML=function(xml,callBack){if(!conn)return false;if(xmlObj&&xml){if(typeof callBack=="function"){if(xmlLoad=='onload'){xmlObj.onload=function(){callBack(xmlObj);}}
else{xmlObj.onreadystatechange=function(){if(xmlObj.readyState==4)callBack(xmlObj)}}}
xmlObj.load(xml);return;}}
this.sendAndLoad=function(Url,httpMode,callBack){httpMode=httpMode.toUpperCase();conn.onreadystatechange=function(){if(conn.readyState==4&&conn.status==200){if(typeof callBack=="function"){callBack(conn);return;}
else if(areaId.length>0){try{document.getElementById(areaId).innerHTML=conn.responseText;}
catch(error){if(debug){alert('Echec, '+areaId+' n\'est pas un objet valide');}}
return;}}};switch(httpMode){case"GET":try{Url=(datas.length>0)?Url+"?"+datas:Url;conn.open("GET",Url);conn.send(null);}
catch(error){if(debug){alert('Echec lors de la transaction avec '+Url+' via la methode GET');}
return false;}
break;case"POST":try{conn.open("POST",Url);conn.setRequestHeader("Content-Type","application/x-www-form-urlencoded");conn.send(datas);}
catch(error){if(debug){alert('Echec lors de la transaction avec '+Url+' via la mthode POST');}
return false;}
break;default:return false;break;}
return true;};return this;}
function afficherResultats(obj){var tabResult=obj.responseXML.getElementsByTagName('resultat');document.getElementById('zoneResultats').innerHTML='';if(tabResult.length>0){var hauteur=tabResult.length*22;with(document.getElementById('zoneResultats').style){visibility='visible';height=hauteur+'px';};for(var i=0;i<tabResult.length;i++){resultat=tabResult.item(i);var egt=document.createElement('li');var lnk=document.createElement('a');var texte=document.createTextNode(resultat.getAttribute('titre'));lnk.appendChild(texte);lnk.setAttribute('href',resultat.getAttribute('url'));lnk.setAttribute('title',resultat.getAttribute('titre'));egt.appendChild(lnk);document.getElementById('zoneResultats').appendChild(egt);}}
else{document.getElementById('zoneResultats').style.visibility='hidden';}}
function loadData(){var XHR=new XHRConnection();if(document.getElementById('foo').value.length>2){XHR.appendData("foo",document.getElementById('foo').value);XHR.sendAndLoad("/ajax.recherche.php","POST",afficherResultats);}}
function afficherResultats2(obj){var tabResult=obj.responseXML.getElementsByTagName('resultat');document.getElementById('zoneResultats2').innerHTML='';if(tabResult.length>0){var hauteur=tabResult.length*22;with(document.getElementById('zoneResultats2').style){visibility='visible';height=hauteur+'px';};for(var i=0;i<tabResult.length;i++){resultat=tabResult.item(i);var egt=document.createElement('li');var lnk=document.createElement('a');var texte=document.createTextNode(resultat.getAttribute('titre'));lnk.appendChild(texte);lnk.setAttribute('href',resultat.getAttribute('url'));lnk.setAttribute('title',resultat.getAttribute('titre'));egt.appendChild(lnk);document.getElementById('zoneResultats2').appendChild(egt);}}
else{document.getElementById('zoneResultats2').style.visibility='hidden';}}
function loadData2(){var XHR=new XHRConnection();if(document.getElementById('foo').value.length>2){XHR.appendData("foo",document.getElementById('foo').value);XHR.sendAndLoad("/ajax.recherche.php","POST",afficherResultats2);}}
function createQCObject(){var req;if(window.XMLHttpRequest){req=new XMLHttpRequest();}else if(window.ActiveXObject){req=new ActiveXObject("Microsoft.XMLHTTP");}else{alert('Problem creating the XMLHttpRequest object');}
return req;}
var http=createQCObject();function displayAjax(m,a){if(m=="ami"){http.open('POST','http://www.rembourser.com/ajax.envoi-ami.php?urlpage='+a+'');http.onreadystatechange=function(){if(http.readyState==4&&http.status==200){var response=http.responseText;if(response){document.getElementById("alertFromAjax").style.left=((document.getElementsByTagName('HTML')[0].scrollWidth/2)-310)+'px';document.getElementById("alertFromAjax").style.top='60px';document.getElementById("alertFromAjax").style.display='block';document.getElementById("alertFromAjaxTop").style.display='block';if(document.body.computedStyle)
document.getElementById("alertFromAjaxTop").style.height=document.getElementById("alertFromAjaxTop").style.computedStyle;else
document.getElementById("alertFromAjaxTop").style.height=document.body.scrollHeight+'px';document.getElementById("alertFromAjax").innerHTML=http.responseText;}}}
http.send(null);}}
function SendFormAmi(n,f,t,a,u){http.open('POST','http://www.rembourser.com/ajax.envoi-ami.php?nom='+n+'&mail='+f+'&mailami='+t+'&action1='+a+'&urlpage='+u+'');http.onreadystatechange=function(){if(http.readyState==4&&http.status==200){var response=http.responseText;if(response){document.getElementById("alertFromAjax").innerHTML=http.responseText;}}}
http.send(null);}
function couponAjax(n){http.open('POST','http://www.rembourser.com/ajax.coupon.php?id='+n+'');http.onreadystatechange=function(){if(http.readyState==4&&http.status==200){var response=http.responseText;if(response){document.getElementById("coupon"+n+"").innerHTML=http.responseText;document.getElementById("coupon"+n+"").style.cursor="default";}}}
http.send(null);}
function NewsletterAjax(){http.open('POST','http://www.rembourser.com/ajax.newsletter.php');http.onreadystatechange=function(){if(http.readyState==4&&http.status==200){var response=http.responseText;if(response){document.getElementById("alertFromAjax").style.left=((document.getElementsByTagName('HTML')[0].scrollWidth/2)-310)+'px';document.getElementById("alertFromAjax").style.top='60px';document.getElementById("alertFromAjax").style.display='block';document.getElementById("alertFromAjaxTop").style.display='block';if(document.body.computedStyle)
document.getElementById("alertFromAjaxTop").style.height=document.getElementById("alertFromAjaxTop").style.computedStyle;else
document.getElementById("alertFromAjaxTop").style.height=document.body.scrollHeight+'px';document.getElementById("alertFromAjax").innerHTML=http.responseText;}}}
http.send(null);}
function SendFormNewsletter(r,s,t,u,v,w){http.open('POST','http://www.rembourser.com/ajax.newsletter.php?nom='+r+'&prenom='+s+'&mail='+t+'&site='+u+'&action1='+v+'&pays='+w+'');http.onreadystatechange=function(){if(http.readyState==4&&http.status==200){var response=http.responseText;if(response){document.getElementById("alertFromAjax").innerHTML=http.responseText;}}}
http.send(null);}
function AbusAjax(n,o){http.open('POST','http://www.rembourser.com/ajax.abus.php?id='+n+'&ab='+o+'');http.onreadystatechange=function(){if(http.readyState==4&&http.status==200){var response=http.responseText;if(response){document.getElementById("avisabus"+n+"").innerHTML=http.responseText;}}}
http.send(null);}
function AlertAjax(m,b){http.open('POST','http://www.rembourser.com/ajax.alert.php?m='+m+'&b='+b+'');http.onreadystatechange=function(){if(http.readyState==4&&http.status==200){var response=http.responseText;if(response){document.getElementById("message_error_alert").innerHTML=http.responseText;}}}
http.send(null);}
