window.onerror=stoperror

function stoperror() {
 return true
}

function VersionNavigateur(Netscape, Explorer) {
 if ((navigator.appVersion.substring(0,3) >= Netscape && navigator.appName == 'Netscape') ||      
    (navigator.appVersion.substring(0,3) >= Explorer && navigator.appName.substring(0,9) == 'Microsoft')) {
  return true
 }
 else {
  return false
 }
}

var isNS=(navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 4)
var isMAC=(navigator.appVersion.indexOf("Mac")!=-1)
var isIE5=(navigator.appVersion.indexOf("MSIE 5")!=-1)
var NS=(navigator.appName == "Netscape")
var VERSION=parseInt(navigator.appVersion)
var lieuHebergement=document.location.toString()
var zone=lieuHebergement
var aujourdhui=new Date()
var NS4=(document.layers)
var IE4=(document.all)
var ie5=document.all&&document.getElementById
var ns6=document.getElementById&&!document.all
var HIDDEN=(isNS) ? 'hide' : 'hidden'
var VISIBLE=(isNS) ? 'show' : 'visible'
if (ns6) {
 HIDDEN='hidden'
 VISIBLE='visible'
}

monthNames=new MakeArray(12)
monthNames[1]="janvier"
monthNames[2]="f&eacute;vrier"
monthNames[3]="mars"
monthNames[4]="avril"
monthNames[5]="mai"
monthNames[6]="juin"
monthNames[7]="juillet"
monthNames[8]="ao&ucirc;t"
monthNames[9]="septembre"
monthNames[10]="octobre"
monthNames[11]="novembre"
monthNames[12]="d&eacute;cembre"

dayNames=new MakeArray(7)
dayNames[1]="dimanche"
dayNames[2]="lundi"
dayNames[3]="mardi"
dayNames[4]="mercredi"
dayNames[5]="jeudi"
dayNames[6]="vendredi"
dayNames[7]="samedi"

function inj(c) {
 document.write(c)
}

function reload() {
 window.location=window.location
}

if (VersionNavigateur(4.0,4.0)) {
 img=new Image()
 img.src="pointeur4x10.gif"
}

function initArray() {
 this.length=initArray.arguments.length
 for (var i=0; i<this.length; i++) {
  this[i]=initArray.arguments[i]
 }
}

function MakeArray(n) {
 this.length = n
 return this
}

hex=new MakeArray(16)
hex[0]="0"
hex[1]="1"
hex[2]="2"
hex[3]="3"
hex[4]="4"
hex[5]="5"
hex[6]="6"
hex[7]="7"
hex[8]="8"
hex[9]="9"
hex[10]="A"
hex[11]="B"
hex[12]="C"
hex[13]="D"
hex[14]="E"
hex[15]="F"

function ToHex(x){
 var high = x/16
 var s = high+""
 s = s.substring(0,2)
 high = parseInt(s,10)
 var left = hex[high]
 var low = x-high*16
 s = low + ""
 s = s.substring(0,2)
 low = parseInt(s,10) 
 var right = hex[low]
 var string = left + "" + right
 return string
}

function Degrade(texte,ri,vi,bi,rf,vf,bf){
 if (VersionNavigateur(99.0,4.0)) {
  for(i = 0 ; i < texte.length ; i++){
   r = ri + (rf - ri)/texte.length*i
   rh = ToHex(r)
   v = vi + (vf - vi)/texte.length*i
   vh = ToHex(v)
   b = bi + (bf - bi)/texte.length*i
   bh = ToHex(b)
   document.write("<FONT COLOR='" + rh + vh + bh + "'>" + texte.substring(i,i+1) + '</FONT>')
  }
 }
 else {
  document.write(texte)
 }
}

function ouvrirFenetreCentree(adresse,nomFenetre,w,h,scroll,effet) {
 var win
 if (h==0) {
  h=screen.availHeight-100
  TopPosition=5
 }
 else {
  TopPosition=(screen.height) ? (screen.height-h)/2 : 0
 }
 LeftPosition=(screen.width) ? (screen.width-w)/2 : 0
 parametres='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=yes,toolbar=no,location=no,menubar=no'
 if ((adresse.indexOf("panier.asp")!=-1) || (adresse.indexOf("tribune.aspx")!=-1) || (adresse.indexOf("noteBibliotheque.aspx")!=-1)) {
  parametres+=',status=yes'
 }
 if (effet) {
  var h1=h-20,w1=w-20
  if (scroll!='no') {
   parametres='height='+h1+',width='+w1+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,resizable=yes,toolbar=no,location=no,menubar=no'
  }
  else {
   parametres='height='+h1+',width='+w1+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no,resizable=no,toolbar=no,location=no,menubar=no'
  }
  win=window.open("",nomFenetre,parametres)
  win.document.write("<html>\n<head>\n<title>club.cathares.org &reg;</title>\n\n")
  win.document.write("<meta http-equiv=\"imagetoolbar\" content=\"no\">\n")
  win.document.write("</head>\n<body bgcolor=#ffffff leftmargin=0 topmargin=0 onClick=\"alert('cathares.org - Droits de reproduction réservés')\">\n")
  win.document.write("<applet cabbase=\"uaa.cab\" archive=\"uaa.zip\" code=\"ua2playe.class\" name=\"ua2playe\" width=\""+w+"\" height=\""+h+"\" hspace=\"0\" vspace=\"0\">\n")
  win.document.write("<param name=number value=\"1,1,0,1,0,10000,0,167776345,1,Ulead Animation.Applet 2.0,Chargement de l'animation...,1\">\n")
  win.document.write("<param name=sprite1 value=\"0,0,"+w+","+h+",0,6000,1,0,0,0,0,0,0,1,ua2cloud,56|52|30|-10|ffffff|20|1|10|10||||0|0|0|1\">\n")
  win.document.write("<param name=image1 value=\"0,0,0,"+adresse+",\">\n")
  win.document.write("<param name=background1 value=\"1,ffffff,0,3,0,0,0,3,8,,\">\n")
  win.document.write("</applet>\n")
  win.document.write("</body>\n</html>\n")
  win.document.close()
 }
 else {
  if ((adresse.substring(adresse.length-3,adresse.length).toUpperCase()=="GIF") || (adresse.substring(adresse.length-3,adresse.length).toUpperCase()=="JPG")) {
   var h1=h-20,w1=w-20
   if (scroll!='no') {
    parametres='height='+h1+',width='+w1+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,resizable=yes,toolbar=no,location=no,menubar=no'
   }
   else {
    parametres='height='+h1+',width='+w1+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no,resizable=no,toolbar=no,location=no,menubar=no'
   }
   win=window.open("",nomFenetre,parametres)
   win.document.write("<html>\n<head>\n<title>club.cathares.org &reg;</title>\n\n")
   win.document.write("<meta http-equiv=\"imagetoolbar\" content=\"no\">\n")
   win.document.write("</head>\n<body bgcolor=#ffffff leftmargin=0 topmargin=0 onClick=\"alert('cathares.org - Droits de reproduction réservés')\" background=\""+adresse+"\" style=\"{background-repeat: no-repeat}\">\n")
   if (scroll!='no') {
    win.document.write("<img src=\""+adresse+"\">\n")
   }
   else {
    win.document.write("<img src=\"pixel.gif\" width="+w+" height="+h+">\n")
   }  
   win.document.write("</body>\n</html>\n")
   win.document.close()
  }
  else {
   win=window.open(adresse,nomFenetre,parametres)
  }
 }
}

function ouvrirFenetreCentreeOutils(adresse,nomFenetre,w,h,scroll) {
 var win
 LeftPosition=(screen.width) ? (screen.width-w)/2 : 0
 TopPosition=(screen.height) ? (screen.height-h)/2-100 : 0
 parametres='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=yes,toolbar=yes,location=yes,menubar=yes'
 if (adresse.indexOf("panier.asp")!=-1) {
  parametres+=',status=yes'
 }
 if ((adresse.substring(adresse.length-3,adresse.length).toUpperCase()=="GIF") || (adresse.substring(adresse.length-3,adresse.length).toUpperCase()=="JPG")) {
  var h1=h-120,w1=w-20
  if (scroll!='no') {
   parametres='height='+h1+',width='+w1+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,resizable=yes'
  }
  else {
   parametres='height='+h1+',width='+w1+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no,resizable=no'
  }
  win=window.open("",nomFenetre,parametres)
  win.document.write("<html>\n<head>\n<title>cathares.org &copy;</title>\n\n")
  win.document.write("<meta http-equiv=\"imagetoolbar\" content=\"no\">\n")
  win.document.write("</head>\n<body bgcolor=#ffffff leftmargin=0 topmargin=0 onClick=\"alert('cathares.org - Droits de reproduction réservés')\" background=\""+adresse+"\" style=\"{background-repeat: no-repeat}\">\n")
  if (scroll!='no') {
   win.document.write("<img src=\""+adresse+"\">\n")
  }
  else {
   win.document.write("<img src=\"pixel.gif\" width="+w+" height="+h+">\n")
  }  
  win.document.write("</body>\n</html>\n")
  win.document.close()
 }
 else {
  win=window.open(adresse,nomFenetre,parametres)
 }
}

function ouvrirFenetreMultimedia(adresse,nomFenetre,w,h,scroll,effet,fondSonore,n) {
 var win
 TopPosition=(screen.height) ? (screen.height-h)/2 : 0
 LeftPosition=(screen.width) ? (screen.width-w)/2 : 0
 parametres='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=yes'
 if (effet) {
  var h1=h-20,w1=w-20
  if (scroll!='no') {
   parametres='height='+h1+',width='+w1+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,resizable=yes'
  }
  else {
   parametres='height='+h1+',width='+w1+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no,resizable=no'
  }
  win=window.open("",nomFenetre,parametres)
  win.document.write("<html>\n<head>\n<title>club.cathares.org &reg;</title>\n\n")
  win.document.write("<meta http-equiv=\"imagetoolbar\" content=\"no\">\n")
  win.document.write("</head>\n<body bgcolor=#ffffff leftmargin=0 topmargin=0 onClick=\"alert('cathares.org - Droits de reproduction réservés')\">\n")
  if (fondSonore!="") {
   win.document.write("<bgsound balance=0 src='"+fondSonore+"' volume=-1000 loop=-1>\n")
  }
  win.document.write("<applet cabbase=\"uaa.cab\" archive=\"uaa.zip\" code=\"ua2playe.class\" name=\"ua2playe\" width=\""+w+"\" height=\""+h+"\" hspace=\"0\" vspace=\"0\">\n")
  win.document.write("<param name=number value=\"1,1,0,1,0,10000,0,167776345,1,Ulead Animation.Applet 2.0,Chargement de l'animation...,1\">\n")
  win.document.write("<param name=sprite1 value=\"0,0,"+w+","+h+effet+"\">\n")
  win.document.write("<param name=image1 value=\"0,0,0,"+adresse+",\">\n")
  win.document.write("<param name=background1 value=\"1,ffffff,0,3,0,0,0,3,8,,\">\n")
  win.document.write("</applet>\n")
  win.document.write("</body>\n</html>\n")
  win.document.close()
 }
 else {
  if ((adresse.substring(adresse.length-3,adresse.length).toUpperCase()=="GIF") || (adresse.substring(adresse.length-3,adresse.length).toUpperCase()=="JPG")) {
   var h1=h-20,w1=w-20
   if (scroll!='no') {
    parametres='height='+h1+',width='+w1+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,resizable=yes'
   }
   else {
    parametres='height='+h1+',width='+w1+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no,resizable=no'
   }
   win=window.open("",nomFenetre,parametres)
   win.document.write("<html>\n<head>\n<title>club.cathares.org &reg;</title>\n\n")
   win.document.write("<meta http-equiv=\"imagetoolbar\" content=\"no\">\n")
   if (fondSonore!="") {
    if (n) {
     win.document.write("<bgsound balance=0 src='"+fondSonore+"' volume=-1000 loop="+n+">\n")
    }
	else {
     win.document.write("<bgsound balance=0 src='"+fondSonore+"' volume=-1000 loop=-1>\n")
	}
   }
   win.document.write("</head>\n<body bgcolor=#ffffff leftmargin=0 topmargin=0 onClick=\"alert('cathares.org - Droits de reproduction réservés')\" background=\""+adresse+"\" style=\"{background-repeat: no-repeat}\">\n")
   if (scroll!='no') {
    win.document.write("<img src=\""+adresse+"\">\n")
   }
   else {
    win.document.write("<img src=\"pixel.gif\" width="+w+" height="+h+">\n")
   }  
   win.document.write("</body>\n</html>\n")
   win.document.close()
  }
  else {
   win=window.open(adresse,nomFenetre,parametres)
  }
 }
}

function ouvrirFenetreCoinHautGauche(adresse,nomFenetre,w,h,scroll) {
 var win
 TopPosition=5
 LeftPosition=5
 parametres='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=yes'
 if ((adresse.substring(adresse.length-3,adresse.length).toUpperCase()=="GIF") || (adresse.substring(adresse.length-3,adresse.length).toUpperCase()=="JPG")) {
  var h1=h-20,w1=w-20
  if (scroll!='no') {
   parametres='height='+h1+',width='+w1+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,resizable=yes'
  }
  else {
   parametres='height='+h1+',width='+w1+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no,resizable=no'
  }
  win=window.open("",nomFenetre,parametres)
  win.document.write("<html>\n<head>\n<title>club.cathares.org &reg;</title>\n\n")
  win.document.write("<meta http-equiv=\"imagetoolbar\" content=\"no\">\n")
  win.document.write("</head>\n<body bgcolor=#ffffff leftmargin=0 topmargin=0 onClick=\"alert('cathares.org - Droits de reproduction réservés')\" background=\""+adresse+"\" style=\"{background-repeat: no-repeat}\">\n")
  if (scroll!='no') {
   win.document.write("<img src=\""+adresse+"\">\n")
  }
  else {
   win.document.write("<img src=\"pixel.gif\" width="+w+" height="+h+">\n")
  }  
  win.document.write("</body>\n</html>\n")
  win.document.close()
 }
 else {
  win=window.open(adresse,nomFenetre,parametres)
 }
 win.focus()
}

var dragapproved=false
var minrestore=0
var initialwidth,initialheight

function drag_drop(e) {
 if (ie5&&dragapproved&&event.button==1) {
  document.getElementById("dwindow").style.left=tempx+event.clientX-offsetxfm
  document.getElementById("dwindow").style.top=tempy+event.clientY-offsetyfm
 }
 else if (ns6&&dragapproved) {
  document.getElementById("dwindow").style.left=tempx+e.clientX-offsetxfm
  document.getElementById("dwindow").style.top=tempy+e.clientY-offsetyfm
 }
}

function initializedrag(e) {
 offsetxfm=ie5? event.clientX : e.clientX
 offsetyfm=ie5? event.clientY : e.clientY
 if (ie5)
  document.getElementById("saver").style.display=''
 tempx=parseInt(document.getElementById("dwindow").style.left)
 tempy=parseInt(document.getElementById("dwindow").style.top)
 dragapproved=true
 document.onmousemove=drag_drop
}

function loadwindow(url,width,height) {
 if (!ie5&&!ns6)
  window.open(url,"","width=width,height=height,scrollbars=1")
 else {
  document.getElementById("dwindow").style.display=''
  document.getElementById("dwindow").style.width=initialwidth=width
  document.getElementById("dwindow").style.height=initialheight=height
  document.getElementById("dwindow").style.left=212
  document.getElementById("dwindow").style.top=ns6? window.pageYOffset*1+20 : document.body.scrollTop*1+25
  document.getElementById("cframe").src=url
 }
}

function maximize() {
 if (minrestore==0) {
  minrestore=1
  document.getElementById("maxname").setAttribute("src","restore.gif")
  document.getElementById("dwindow").style.width=ns6? window.innerWidth-20 : document.body.clientWidth
  document.getElementById("dwindow").style.height=ns6? window.innerHeight-20 : document.body.clientHeight
 }
 else {
  minrestore=0
  document.getElementById("maxname").setAttribute("src","max.gif")
  document.getElementById("dwindow").style.width=initialwidth
  document.getElementById("dwindow").style.height=initialheight
 }
 document.getElementById("dwindow").style.left=ns6? window.pageXOffset : document.body.scrollLeft
 document.getElementById("dwindow").style.top=ns6? window.pageYOffset : document.body.scrollTop
}

function closeit() {
 document.getElementById("dwindow").style.display="none"
}

if (ie5||ns6)
 document.onmouseup=new Function("dragapproved=false;document.onmousemove=null;document.getElementById('saver').style.display='none'")

function styleObjet(objet) {
 if (document.getElementById && document.getElementById(objet)) {
  return document.getElementById(objet).style
 }
 if (document.all && document.all(objet)) {
  return document.all(objet).style
 }
 if (document.layers && document.layers[objet]) {
  return document.layers[objet]
 }
 else {
  return false
 }
}

function placerObj(objet,px,py) {
 var objet1=styleObjet(objet)
 if (ns6) {
  objet1.left=px+"px"
  objet1.top=py+"px"
 } 
 else {
  objet1.left=px
  objet1.top=py
 }
}

function voirObj(objet) {
 var objet1=styleObjet(objet)
 objet1.visibility=VISIBLE
}

function cacherObj(objet) {
 var objet1=styleObjet(objet)
 objet1.visibility=HIDDEN
}

function infosEditeur() {
 cacherTout()
 ouvrirFenetreCentree("infosEditeur.html","infosediteur",500,200)
}

function arrondir(nombre,decimale) {
 i=0
 while (i<=decimale) {
  nombre=nombre*10
  i++
 }
 calcul=parseInt(nombre).toString()
 dernierChiffre=calcul.substring(calcul.length-1,calcul.length)
 if (parseInt(dernierChiffre)>=5) {
  calcul=parseInt(calcul.substring(0,calcul.length-1))+1
 }
 else {
  calcul=parseInt(calcul.substring(0,calcul.length-1))
 }
 calcul=calcul.toString()
 return calcul.substring(0,calcul.length-decimale)+"."+calcul.substring(calcul.length-decimale,calcul.length)
}

if (lieuHebergement.substring(0,7)=="http://") {
 today=new Date
 sec=today.getTime()
}

function imprimer() {
 if (NS || ie5) {
  window.print()
 }
 else {
  var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>'
  document.body.insertAdjacentHTML('beforeEnd', WebBrowser)
  WebBrowser1.ExecWB(6, 2)
  WebBrowser1.outerHTML = ""
 }
}

function policeTexte(v) {
 document.all.t.style.fontSize=v
}

function metamoteur() {
 var str
 str=prompt("Entrez un ou plusieurs mot(s)-cle(s).",'')
 if (str.length>0) {
  if (VersionNavigateur(4.0,4.0)) {
   inj("<div id=\"messageAttente\" class=\"objB\"><table width=100% height=100% border=0 bgcolor=#cfa96a><tr><td align=center valign=middle><font face='tahoma,arial' color=#000000 size=2 style='font-size:13px'>")
   inj("VEUILLEZ PATIENTER...<br><br>La recherche s'effectuant sur l'ensemble des ressources,<br>celle-ci peut prendre plusieurs minutes.<br><br>Merci.<br></font></td></tr></table><\/div>")
  }
//  while (str.indexOf("à")!=-1) {str=str.replace("à","a")}
//  while (str.indexOf("â")!=-1) {str=str.replace("â","a")}
//  while (str.indexOf("ç")!=-1) {str=str.replace("ç","c")}
//  while (str.indexOf("é")!=-1) {str=str.replace("é","e")}
//  while (str.indexOf("è")!=-1) {str=str.replace("è","e")}
//  while (str.indexOf("ê")!=-1) {str=str.replace("ê","e")}
//  while (str.indexOf("ô")!=-1) {str=str.replace("ô","o")}
//  while (str.indexOf("ù")!=-1) {str=str.replace("ù","u")}
//  while (str.indexOf("û")!=-1) {str=str.replace("û","u")}
//  while (str.indexOf("ü")!=-1) {str=str.replace("ü","u")}
//  while (str.indexOf("ï")!=-1) {str=str.replace("ï","i")}
  document.location="metamoteur.aspx?kw="+str
 }
}

if (lieuHebergement.indexOf("philippe")==-1 && lieuHebergement.indexOf("localhost")==-1) {
// peopleChoice=new Image()
// peopleChoice.src="http://www.peoplechoice.net/cgi-bin/picturechoice.pl?ID=14405"
// peopleChoice=new Image()
// peopleChoice.src="http://www.peoplechoice.net/cgi-bin/picturechoice.pl?ID=36253"
// hitparade=new Image()
// hitparade.src="http://logp.hit-parade.com/logohp1.gif?site=p316"
// livecounter=new Image()
// livecounter.src="http://www.devparadise.com/cgi-bin/livecounter.pl?ID=13512"
// thecounter=new Image()
// thecounter.src="http://c3.thecounter.com/id=2377741"
// hebdotop=new Image()
// hebdotop.src="http://www.hebdotop.com/cgi-bin/vote.eur?id=16633"
 today=new Date
 sec=today.getTime()
// inj('<SCRIPT LANGUAGE="javascript" SRC="http://countus.editeurjavascript.com/countus.php3?pseudo=cathares&timer=')
// inj(sec)
// inj('&present=2"><\/SCRIPT>')
}

function VerifPlugIn(ExtensionFile) {
 var IsEnabled=true
 if (navigator.appName=="Netscape") {
  IsEnabled=false
  for(var x=0;(x<navigator.mimeTypes.length && !IsEnabled);x++) {
   if(navigator.mimeTypes[x].suffixes.indexOf(ExtensionFile)>=0)
    IsEnabled=navigator.mimeTypes[x].enabledPlugin
  }
 }
 return IsEnabled
}

function PlaySound(MyName,MyExtension,MyLoop) {
 var AudioEnable=VerifPlugIn(MyExtension),TheLoop=''
 if (navigator.appName=="Netscape" && MyLoop==1)  TheLoop='true';
 if (AudioEnable) eval('document.'+MyName+'.play('+TheLoop+')')
}

function StopSound(MyName,MyExtension) {
 var AudioEnable=VerifPlugIn(MyExtension);
 if (AudioEnable) eval('document.'+MyName+'.stop()')
}

inj("<META HTTP-EQUIV=\"imagetoolbar\" CONTENT=\"no\">")
