/*
TIPSTER v3.1 RC (c) 2001-2006 Angus Turnbull, http://www.twinhelix.com
Altering this notice or redistributing this file is prohibited.
*/

var isDOM=document.getElementById?1:0,isIE=document.all?1:0,isNS4=navigator.appName=='Netscape'&&!isDOM?1:0,isOp=self.opera?1:0,isDyn=isDOM||isIE||isNS4;function getRef(i,p){p=!p?document:p.navigator?p.document:p;return isIE?p.all[i]:isDOM?(p.getElementById?p:p.ownerDocument).getElementById(i):isNS4?p.layers[i]:null};function getSty(i,p){var r=getRef(i,p);return r?isNS4?r:r.style:null};if(!self.LayerObj)var LayerObj=new Function('i','p','this.ref=getRef(i,p);this.sty=getSty(i,p);return this');function getLyr(i,p){return new LayerObj(i,p)};function LyrFn(n,f){LayerObj.prototype[n]=new Function('var a=arguments,p=a[0],px=isNS4||isOp?0:"px";with(this){'+f+'}')};LyrFn('x','if(!isNaN(p))sty.left=p+px;else return parseInt(sty.left)');LyrFn('y','if(!isNaN(p))sty.top=p+px;else return parseInt(sty.top)');LyrFn('w','if(p)(isNS4?sty.clip:sty).width=p+px;else return(isNS4?ref.document.width:ref.offsetWidth)');LyrFn('h','if(p)(isNS4?sty.clip:sty).height=p+px;else return(isNS4?ref.document.height:ref.offsetHeight)');LyrFn('vis','sty.visibility=p');LyrFn('write','if(isNS4)with(ref.document){write(p);close()}else ref.innerHTML=p');LyrFn('alpha','var f=ref.filters,d=(p==null),o=d?"inherit":p/100;if(f){if(!d&&sty.filter.indexOf("alpha")==-1)sty.filter+=" alpha(opacity="+p+")";else if(f.length&&f.alpha)with(f.alpha){if(d)enabled=false;else{opacity=p;enabled=true}}}else if(isDOM)sty.opacity=sty.MozOpacity=o');if(!self.page)var page={win:self,minW:0,minH:0,MS:isIE&&!isOp};page.db=function(p){with(this.win.document)return(isDOM?documentElement[p]:0)||body[p]||0};page.winW=function(){with(this)return Math.max(minW,MS?db('clientWidth'):win.innerWidth)};page.winH=function(){with(this)return Math.max(minH,MS?db('clientHeight'):win.innerHeight)};page.scrollX=function(){with(this)return MS?db('scrollLeft'):win.pageXOffset};page.scrollY=function(){with(this)return MS?db('scrollTop'):win.pageYOffset};function TipObj(myName,photo){this.myName=myName;this.template='';this.tips=new Array();this.parentObj=null;this.div=null;this.actTip='';this.showTip=false;this.xPos=this.yPos=this.sX=this.sY=this.mX=this.mY=0;this.trackTimer=this.fadeTimer=0;this.alpha=0;this.doFades=true;this.minAlpha=0;this.tipImgPop='';this.maxAlpha=100;this.fadeInSpeed=100;this.fadeOutSpeed=100;this.tipStick=1;this.showDelay=600;this.hideDelay=0;this.IESelectBoxFix=0;TipObj.list[myName]=this};TipObj.list={};var ToPt=TipObj.prototype;ToPt.track=function(evt){with(this){if(!isIE||document.body){evt=evt||window.event;sX=page.scrollX();sY=page.scrollY();mX=evt.pageX||sX+evt.clientX||0;mY=evt.pageY||sY+evt.clientY||0;if(tipStick==1)position()}}};ToPt.position=function(forcePos){with(this){if(!actTip)return;var wW=page.winW(),wH=page.winH();if(!isIE||isOp){wW-=16;wH-=16}var t=tips[actTip],tipX=eval(t[0]),tipY=eval(t[1]),tipW=div.w(),tipH=div.h(),adjY=1;if(typeof(t[0])=='number')tipX+=mX;if(typeof(t[1])=='number')tipY+=mY;if(tipX+tipW+5>sX+wW)tipX=sX+wW-tipW-5;if(tipY+tipH+5>sY+wH)tipY=sY+wH-tipH-5;if(tipX<sX+5)tipX=sX+5;if(tipY<sY+5)tipY=sY+5;if((!showTip&&(doFades?!alpha:true))||forcePos){xPos=tipX;yPos=tipY}xPos+=(tipX-xPos)*tipStick;yPos+=(tipY-yPos)*tipStick;div.x(xPos);div.y(yPos);return}};


// Called by the show() function when a new tip is being shown.
ToPt.replaceContent = function(tipN) { with (this)
{
 // Remember this tip number as active, for the other functions.
 //if is a image parse the result
 var pos=0;pos = tipN.indexOf( "img_product/" );if(pos !=-1){
	 var my = tipN;
	 tipN = 'imgPop'; 
	 actTip = tipN; 
 }else{
	 actTip = tipN; 
 }
  // Set tip's onmouseover and onmouseout handlers for non-floating tips.
 if (tipStick == parseInt(tipStick))
 {
  var rE = '';
  if (isNS4)
  {
   div.ref.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT);
   rE = '; return this.routeEvent(evt)';
  }
  // Remember to pass parent reference if needed, to maintain nesting rules.
  div.ref.onmouseover = new Function('evt', myName+'.show("' + tipN + '"' +
   (parentObj ? ','+parentObj.myName : '') + ')' + rE);
  div.ref.onmouseout = new Function('evt', myName + '.hide()' + rE);
 }
 // Go through and replace %0% with the array's 0 index, %1% with tips[tipN][1] etc...
 var str = template;
 for (var i = 0; i < tips[tipN].length; i++){
	 str = str.replace(new RegExp('%'+i+'%', 'g'), tips[tipN][i]);
	 str = str.replace('tipImgPop', my);
 }
 // Optional IE5.5+ SELECT box fix. Ouch. This is really dirty. IE does deserve it, though...
 if (window.createPopup && IESelectBoxFix)
 {
  // In case you're wondering, expression() is a great IE hack that I'm using to auto-set the
  // IFRAME's height equal to its parent. And the content is in there twice -- once to set the
  // div's dimensions, and again to actually show it within a filter.
  var filt = 'filter: progid:DXImageTransform.Microsoft.Alpha(opacity=';
  str += '<iframe src="about:blank" style="position: absolute; left: 0px; top: 0px; ' +
   'height: expression(' + myName + '.div.h()); z-index: 1; border: none; ' + filt + '0)"></iframe>' +
   '<div style="position: absolute; left: 0px; top: 0px; z-index: 2; ' + filt + '100)">' +
   str + '</div>';
 }
 // Write the proper content... the last <br> strangely helps IE5/Mac...?
 // IE4 requires a small width set otherwise tip divs expand to full body size.
 // We've hardcoded that inline, for decent browsers reset it to 'auto' like we should.
 // However 'decent' does not include Opera 7, which is quite buggy in this regard.
 if (isDOM&&!isOp) div.sty.width = 'auto';
 div.write(str + (isIE&&!isOp&&!window.external ? '<small><br /></small>' : ''));
 // Place it somewhere onscreen - pass true to force a complete reposition.
 position(true);
}};


ToPt.show=function(tipN,par){with(this){if(!isDyn)return;clearTimeout(fadeTimer);parentObj=par;if(par)par.show(par.actTip,par.parentObj);if(!div)div=getLyr(myName+'Layer');if(!div)return;clearInterval(trackTimer);if(tipStick!=parseInt(tipStick))trackTimer=setInterval(myName+'.position()',50);
var showStr='with('+myName+'){showTip=true;'+(actTip!=tipN?'replaceContent("'+tipN+'");':'')+'fade()}';
if(showDelay&&!actTip)fadeTimer=setTimeout(showStr,showDelay);else eval(showStr)}};


ToPt.newTip=function(tName){with(this){if(!tips[tName])tips[tName]=[];for(var i=1;i<arguments.length;i++)tips[tName][i-1]=arguments[i];show(tName);return}};ToPt.hide=function(){with(this){clearTimeout(fadeTimer);if(!isDyn||!actTip||!div)return;if(isNS4&&tipStick==0&&xPos<=mX&&mX<=xPos+div.w()&&yPos<=mY&&mY<=yPos+div.h())return;with(tips[actTip])if(parentObj)parentObj.hide();fadeTimer=setTimeout('with('+myName+'){showTip=false;fade()}',hideDelay);return}};ToPt.fade=function(){with(this){clearTimeout(fadeTimer);if(showTip){div.vis('visible');if(doFades){alpha+=fadeInSpeed;if(alpha>maxAlpha)alpha=maxAlpha;div.alpha(alpha);if(alpha<maxAlpha)fadeTimer=setTimeout(myName+'.fade()',75)}}else{if(doFades&&alpha>minAlpha){alpha-=fadeOutSpeed;if(alpha<minAlpha)alpha=minAlpha;div.alpha(alpha);fadeTimer=setTimeout(myName+'.fade()',75);return}div.vis('hidden');actTip='';clearInterval(trackTimer)}}};var tipOR=window.onresize,nsWinW=window.innerWidth,nsWinH=window.innerHeight;document.tipMM=document.onmousemove;if(isNS4)document.captureEvents(Event.MOUSEMOVE);document.onmousemove=function(evt){for(var t in TipObj.list)TipObj.list[t].track(evt);return document.tipMM?document.tipMM(evt):(isNS4?document.routeEvent(evt):true)};window.onresize=function(){if(tipOR)tipOR();if(isNS4&&(nsWinW!=innerWidth||nsWinH!=innerHeight))location.reload()};

var docTips = new TipObj('docTips');
with (docTips)
{
 template = '<table border="0" cellspacing="0" cellpadding="0">' +
 '<tr><td>%3%';
 tips.singola = new Array(-25, -85, 200, '<div class="tipGri"><span class="arial12 whitec">Offre simple</span><br /><span class="arial11">exprim&eacute;e en centimes<br />(pas de virgules - pas de points)</span></div></td></tr><tr><td height="5"><img src="img/frec_grig.gif" hspace="18"/></td></tr></table>'); 
 tips.prod = new Array(-25, -60, 200, '<div class="tipGri">Saisissez la valeur en Euro.</div></td></tr><tr><td height="5"><img src="img/frec_grig.gif" hspace="18"  /></td></tr></table>');
 tips.multi = new Array(-25, -130, 200, '<div class="tipGri"><span class="arial12 whitec">Offre multiple</span><span class="arial11"> = groupe d&rsquo;offres.<br />Ecrivez en centimes la valeur minimum (de)<br />et la valeur maximum (&agrave;) de vos ench&egrave;res.<br />Automatiquement, toutes les ench&egrave;res <br />comprises entre les deux limites, deviennent <br />vos offres.</span></div></td></tr><tr><td height="5"><img src="img/frec_grig.gif" hspace="18"/></td></tr></table>');
  tips.nickReg = new Array(-25, -120, 200, '<div class="tipVer"><strong>Pseudonyme:</strong><br />Il doit etre compos&eacute; d\'un minimum de 6<br />et d\'un maximum de 15 caract&egrave;res.<br />Vous pouvez utiliser les lettres minuscules<br />de l\'alphabet (sauf &agrave; &aacute; &acirc; &egrave; &eacute; &ecirc; &ocirc; &oelig; &icirc;),<br />des nombres (au max 7) et la ligne basse (_).</div></td></tr><tr><td height="5"><img src="img/frec_tip.gif" /></td></tr></table>');
 
  tips.imgPop = new Array(-25, -185, 200, '<div class="tipGriImg"><img src="tipImgPop" /></div></td></tr><tr><td height="5"><img src="img/frec_grig.gif" hspace="18" /></td></tr></table>');
  
 tips.nickLanding = new Array(-260, -55, 0, '<div class="tipGri"><span class="tit_tip_ar">Pseudonyme</span><br />Il doit etre compos&eacute; d\'un minimum de 6<br />et d\'un maximum de 15 caract&egrave;res.<br />Vous pouvez utiliser les lettres minuscules<br />de l\'alphabet (sauf &agrave; &aacute; &acirc; &egrave; &eacute; &ecirc; &ocirc; &oelig; &icirc;),<br />des nombres (au max 7) et la ligne basse (_).</div></td><td align="left"><img src="img_landing/frec_grig.png" width="8" height="17"/></td></tr></table>');
    tips.passLanding = new Array(-235, -35, 0, '<div class="tipGri"><span class="tit_tip_ar">Mot de passe</span><br />Il doit etre compos&eacute; d\'un minimum de 6<br />et d\'un maximum de 15 caract&egrave;res.</div></td><td align="left"><img src="img_landing/frec_grig.png" width="8" height="17"/></td></tr></table>');
	tips.passEmail = new Array(-295, -35, 0, '<div class="tipGri"><span class="tit_tip_ar">Adresse e-mail exacte</span><br />Pour compl&eacute;ter l\'inscription, nous vous enverrons<br />un e-mail n&eacute;c&eacute;ssaire pour en confirmer l\'authenticit&eacute;.</div></td><td align="left"><img src="img_landing/frec_grig.png" width="8" height="17"/></td></tr></table>');
	tips.nome = new Array(-260, -80, 0, '<div class="tipGri"><span class="tit_tip_ar">Vos donn&eacute;es personnelles</span><br />Il est interdit de s\'enregistrer plusieurs fois,<br />  d\'utiliser les donn&eacute;es personnelles d\'autrui<br />  et / ou de fausses informations.<br />Pour des raisons de s&eacute;curit&eacute;, Ench&egrave;reClic,<br />suspectant un usage incorrect des donn&eacute;es <br />personnelles qui ont &eacute;t&eacute; fournies, <br />peut imm&eacute;diatement suspendre le compte,<br />  dans l\'attente d\'&eacute;claircissement.<br />Les inscriptions multiples ne sont pas permises.</div></td><td align="left"><img src="img_landing/frec_grig.png" width="8" height="17"/></td></tr></table>');
	tips.indirizzo = new Array(-290, -60, 0, '<div class="tipGri"><span class="tit_tip_ar">Livraison: pas de probl&egrave;mes!</span><br />Il est de votre int&eacute;r&ecirc;t de nous indiquer correctement<br />votre adresse qui sera utilis&eacute;e pour l&rsquo;exp&eacute;dition,<br />autrement vous ne pourrez pas recevoir les objets<br />que vous remporterez. N\'oubliez pas d&rsquo;indiquer<br />votre Num&eacute;ro de Rue et le Code Postal</div></td><td align="left"><img src="img_landing/frec_grig.png" width="8" height="17"/></td></tr></table>');	
}
