var O_NS4=(document.layers)?1:0;
var O_IE4=(document.all)?1:0;
var O_MAC = (navigator.appVersion.indexOf("Macintosh") > -1);
var O_Url="http://www.docsdunet.com/opinion/";
var O_Key=escape(window.location.href);
var O_final = 0;
var O_tmoff=3600000;
var O_CData="";
var O_Prev=document.referrer;

if (O_NS4) {
 var origWidth = innerWidth;
 var origHeight = innerHeight;
 var width=screen.width;
 var height=screen.height;
 IEBR="";
}
if (O_IE4) {
 var origWidth=document.body.clientWidth;
 var origHeight=document.body.clientHeight;
 var width=screen.width;
 var height=screen.height;
 IEBR="<BR>";
}

O_Key=O_Rpl(O_Key,"/","%2F");
O_Key=O_Rpl(O_Key,".","%2E");
O_Key=O_Rpl(O_Key,"-","%2D");
O_Key=O_Rpl(O_Key,"_","%5F");

function O_Rpl( sr, sf, ss ) { a=sr.split(sf); return a.join(ss); }

function O_setTimer() {
  vistimerID = setTimeout("O_makeVisible()", 500);
}

function O_makeVisible() {
  if (O_IE4 && parseInt(O_CData) != 2 && parseInt(O_CData) != 3) ovar1.style.display = "block";
  clearTimeout(vistimerID);
  vistimerID = null;
}

function O_Pop1() {
 if (O_NS4) {
  ovar1_element = eval("document.ovar1");
  ovar1_element.visibility = "hide";
  ovar2_element = eval("document.ovar2");
  ovar2_element.visibility = "show";
 }
 if (O_IE4) {
  ovar1.style.display = "none";
  ovar2.style.display = "block";
 }
}

function O_Pop2() {
 if (O_NS4) {
  ovar3_element = eval("document.ovar3");
  ovar3_element.visibility = "show";
 }
 if (O_IE4) {
  ovar3.style.display = "block";
 }
}

function O_CommentPop1() {
 if (O_NS4) {
  ovar5_element = eval("document.ovar5");
  ovar5_element.visibility = "show";
 }
 if (O_IE4) {
  ovar5.style.display = "block";
 }
}

function CD(URL)
{
    w = window.open(URL, 'Check','scrollbars=no,status=nos,toolbar=no,width=320,height=275,top=0,left=0');
    w.focus();
}


function O_Move(O_x) {
 if (O_x==1) {
 if(O_NS4) {
  with(document.ovar1){
   left = window.innerWidth - clip.width-35;
   top = window.innerHeight - clip.height-21+self.pageYOffset;
  }
 }
 if(O_IE4) {
  ovar1d=document.all('ovar1');
  with(document.body){
   ovar1d.style.left = clientWidth - scrollLeft-42;
   ovar1d.style.top = clientHeight + scrollTop-40;
  }
 }
 otimerID = setTimeout ("O_Move(1)", 100);
 }
 if(O_x==3){

  if(O_NS4) {
   with(document.ovar2){
    left = window.innerWidth - clip.width-36;
    top = window.innerHeight - clip.height-22+self.pageYOffset;
   }
   with(document.ovar3){
    left = window.innerWidth - clip.width-55;
    top = window.innerHeight - clip.height-22+self.pageYOffset;
   }
  }
  if(O_IE4) {
   ovar2d=document.all('ovar2');
   ovar3d=document.all('ovar3');
   with(document.body){
    ovar2d.style.left = clientWidth - scrollLeft-41;
    ovar2d.style.top = clientHeight + scrollTop-132;
    ovar3d.style.left = clientWidth - scrollLeft-161;
    ovar3d.style.top = clientHeight + scrollTop-132;
   }
  }
  otimerID = setTimeout ("O_Move(3)", 100);
 }
}


function O_CommentMove(O_x) {


 if (O_x==1) {
 if(O_NS4) {
  with(document.ovar4){
   left = window.innerWidth - clip.width-35;
   top = window.innerHeight - clip.height-21+self.pageYOffset;
  }
 }
 if(O_IE4) {
  ovar1d=document.all('ovar4');
  with(document.body){
   ovar1d.style.left = clientWidth - scrollLeft-42;
   ovar1d.style.top = clientHeight + scrollTop-40;
  }
 }
 otimerID = setTimeout ("O_CommentMove(1)", 100);
 }
 if(O_x==3){
  if(O_NS4) {

   with(document.ovar5){
    left = window.innerWidth - clip.width-55;
    top = window.innerHeight - clip.height-22+self.pageYOffset;
   }
  }

  if(O_IE4) {
   ovar5d=document.all('ovar5');
   with(document.body){
    ovar5d.style.left = clientWidth - scrollLeft-161;
    ovar5d.style.top = clientHeight + scrollTop-79;
   }
  }
  otimerID = setTimeout ("O_CommentMove(3)", 100);
 }
}



function O_Config(O_x) {

 if(O_x==1) {
  if(O_NS4) {
   with(document.ovar1){
    visibility = "show";
   }
   with(document.ovar4){
    visibility = "hidden";
   }
  }

  if(O_IE4) {
   ovar1d=document.all('ovar1');
   with(document.body){
    ovar1d.style.display = "block";
   }
   ovar4d=document.all('ovar4');
   with(document.body){
    ovar4d.style.display = "none";
   }
  }
 }

 if(O_x==2) {
  if(O_NS4) {
   with(document.ovar1){
    visibility = "hidden";
   }
   with(document.ovar4){
    visibility = "show";
   }
  }

  if(O_IE4) {
   ovar1d=document.all('ovar1');
   with(document.body){
    ovar1d.style.display = "none";

   }
   ovar4d=document.all('ovar4');
   with(document.body){
    ovar4d.style.display = "block";
   }
  }
 }
}



function O_GetData(label) {
 var labelLen = label.length;
 var cLen = document.cookie.length;
 var i=0;
 var cEnd;

 while (i < cLen) {
  var j= i + labelLen;
  if (document.cookie.substring(i,j) == label) {
   cEnd = document.cookie.indexOf(";",j);
   if (cEnd == -1) cEnd = document.cookie.length;
   return unescape(document.cookie.substring(j+1,cEnd));
  }
  i++;
 }
 return "";
}

function O_SetData(name, value) {
 O_newdate=new Date( (new Date()).getTime() +O_tmoff );
 document.cookie=name+"="+escape(value)+"; path=/; expires="+O_newdate.toGMTString();
 //alert(document.cookie);
}

function O_Rdr(O_id)
{
     ocDate2 = new Date();
     oend_date = ocDate2.getTime();
     if(O_id>0 && O_id <6)
    {
          O_SetData(O_Key, 2);
           url = O_Url+"/rate.php3?rating="+O_id+"&referer=" + O_Key ;
           window.location.href = url;
     }
}

function O_Over(image_num) {

 over_graphic = 1;
 s="im" + image_num;
 document[s].src = O_img[image_num+6].src;

 if (O_NS4) {
  ovar3_element = eval("document.ovar3");
  ovar3_element.visibility = "hide";
 }
 if (O_IE4) ovar3.style.display = "none";
 if (image_num != 6) O_Out(6);
 over_graphic = 1;
}

function O_Out(image_num) {
 O_layerOut();
 s="im" + image_num;
 document[s].src = O_img[image_num].src;
}

function O_layerOut() {
 over_graphic = 0;
 setTimeout("O_layerTimeout();",50);
}

function O_layerTimeout() {
  if (over_graphic == 0) O_hideAll();
}

function O_hideAll() {
 over_graphic = 1;

 if (parseInt(O_CData) != 2) {
  if (O_NS4) {
   ovar1_element = eval("document.ovar1");
   ovar1_element.visibility = "show";
   ovar2_element = eval("document.ovar2");
   ovar2_element.visibility = "hide";
   ovar3_element = eval("document.ovar3");
   ovar3_element.visibility = "hide";
  }
  if (O_IE4) {
   if (O_final) ovar1.style.display = "none";
   else ovar1.style.display = "block";
   ovar2.style.display = "none";
   ovar3.style.display = "none";
  }

 }

 else{
  if (O_NS4) {
   ovar4_element = eval("document.ovar4");
   ovar4_element.visibility = "show";
   ovar5_element = eval("document.ovar5");
   ovar5_element.visibility = "hide";
  }
  if (O_IE4) {
   ovar1.style.display = "none";
   ovar2.style.display = "none";
   ovar3.style.display = "none";
   ovar5.style.display = "none";
   ovar4.style.display = "block";
  }

 }
}

function O_Resize(){
 if (O_NS4) {
  if (innerWidth == origWidth && innerHeight == origHeight) return;
  origWidth = innerWidth;
  origHeight = innerHeight;
 }
 if (O_IE4) {
  if (document.body.clientWidth == origWidth && document.body.clientHeight == origHeight) return;
  origWidth=document.body.clientWidth;
  origHeight=document.body.clientHeight;
 }
 location.reload();
}

function O_Go() {

 if (parseFloat(navigator.appVersion)<4 || (navigator.appName!="Microsoft Internet Explorer" && navigator.appName!="Netscape")) return;
 if (O_MAC && O_IE4) return;
 if (O_NS4) window.onresize=O_Resize;
 if (O_IE4) onresize=O_Resize;

 O_CTime=new Date();
 O_CDate=O_CTime.getTime();
 O_CData=O_GetData(O_Key);



 st="<STYLE TYPE='text/css'>";
 a1="show"; a2="none";
 if( O_CData==2 ) { a1="hide"; a2="none"; }
 if(O_NS4) st+=".oparent {position:absolute; visibility:"+a1+"; z-index:1000} .ochild {position:absolute; visibility:hide; z-index:1000}";
 if(O_IE4) st+=".oparent {display:"+a2+"; z-index:1000} .ochild {display:none; z-index:1000}";
 st+="</STYLE>";
 document.write(st); st="";

 //O_CData 3 indicates that the comment card has been popped.
 if(parseInt(O_CData==3)) {
  st ="<DIV ID='ovar3' CLASS='ochild'></DIV><DIV ID='ovar2' CLASS='ochild'></DIV><DIV ID='ovar1' CLASS='oparent'></DIV>";
  document.write(st);
 }

 //O_CData 2 indicates that a rating has been submitted
 if(parseInt(O_CData)==2 || parseInt(O_CData)!=3) {

  st ="<DIV ID='ovar5' CLASS='ochild' STYLE='position:absolute;top:15%;left:95%;'>";
  s1="<A HREF=javascript:CD('rating.php3'); onMouseOver='over_graphic=1;' onMouseOut='O_layerOut();' return false;'><IMG SRC='opinion/popcomment.gif' WIDTH='121' HEIGHT='56' NAME='im' BORDER='0' ></A>";
  st+="<TABLE CELLPADDING='0' CELLSPACING='0' BORDER='0'><TR><TD>";
  st+=s1+IEBR;
  st+="</TD></TR></TABLE></DIV>";
  document.write (st);

  st ="<DIV ID='ovar4' CLASS='ochild' STYLE='position:absolute;top:15%;left:95%;'>";
  st+="<A HREF='#' onMouseOver='over_graphic=1;O_CommentPop1();' onMouseOut='O_layerOut();'><IMG src='opinion/comment.gif' ALT='Commentaire?' BORDER='0' ></A></DIV>";
  document.write (st);

  O_img = new Array();
  for(i=1;i<17;i++) O_img[i]=new Image();
  for(i=1;i<6;i++) {O_img[i].src="opinion/"+i+"up.gif";O_img[i+6].src="opinion/"+i+"down.gif";}
  for(i=1;i<5;i++) O_img[i+12]="opinion/pop_"+i+".gif";
  O_img[6].src="opinion/quesup.gif";
  O_img[12].src="opinion/quesdown.gif";

  s1="<A HREF=javascript:CD('rating.php3'); onMouseOver='over_graphic=1;' onMouseOut='O_layerOut();' return false;'><IMG SRC='opinion/pop.gif' WIDTH='121' HEIGHT='110' NAME='im' BORDER='0'></A>";
  st ="<DIV ID='ovar3' CLASS='ochild' STYLE='position:absolute;top:15%;left:95%;'>";
  st+="<TABLE CELLPADDING='0' CELLSPACING='0' BORDER='0'><TR><TD>";
  st+=s1+IEBR;
  st+="</TD></TR></TABLE></DIV>";
  document.write (st);

  s1="<A HREF=Javascript:O_Rdr(";
  s2="); return false; onMouseOver='O_Over(";
  s3="); return true;' onMouseOut='O_Out(";
  s4="); return true;'><IMG BORDER='0' src='opinion/";
  s5="up.gif' NAME='im";

  st ="<DIV ID='ovar2' CLASS='ochild' STYLE='position:absolute;top:15%;left:95%;'><TABLE CELLPADDING='0' CELLSPACING='0' BORDER='0' WIDTH='19'><TR><TD>";
  st+=s1+"5"+s2+"5"+s3+"5"+s4+"5"+s5+"5' HEIGHT=18 WIDTH=19 ALT='Exc&eacute;llent'></A>"+IEBR;
  st+=s1+"4"+s2+"4"+s3+"4"+s4+"4"+s5+"4' HEIGHT=18 WIDTH=19 ALT='Bien'></A>"+IEBR;
  st+=s1+"3"+s2+"3"+s3+"3"+s4+"3"+s5+"3' HEIGHT=18 WIDTH=19 ALT='Passable'></A>"+IEBR;
  st+=s1+"2"+s2+"2"+s3+"2"+s4+"2"+s5+"2' HEIGHT=18 WIDTH=19 ALT='Insuffisant'></A>"+IEBR;
  st+=s1+"1"+s2+"1"+s3+"1"+s4+"1"+s5+"1' HEIGHT=21 WIDTH=19 ALT='M&eacute;diocre'></A>"+IEBR;
  st+="<A HREF='#' onMouseOver='O_Over(6); O_Pop2(); return true;'  onMouseOut='O_layerOut();' onClick='O_Rdr(6); return false;'>";
  st+="<IMG src='opinion/quesup.gif' NAME='im6' HEIGHT=17 WIDTH=19 ALT='Evaluez cette page!' BORDER='0'></A></TD></TR></TABLE></DIV>";
  document.write (st); st="";

  st ="<DIV ID='ovar1' CLASS='ochild' STYLE='position:absolute;top:15%;left:95%;'>";
  st+="<A HREF='#' onMouseOver='O_Pop1();'><IMG src='opinion/o.gif' ALT='O' BORDER='0' onLoad=O_setTimer();></A></DIV>";
  document.write (st);
  O_CommentMove(1);
  O_CommentMove(3);
  O_Move(1);
  O_Move(3);

  if (parseInt(O_CData)==2) {

     O_Config(2);
  }
  else
  {
     O_Config(1);

  }

 }
}