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 NS4=(document.layers)
var IE4=(document.all)
var ie5=document.all&&document.getElementById
var ns6=document.getElementById&&!document.all
var firefox=(navigator.appName.indexOf("Firefox")>0)
var lieuHebergement=document.location.toString()
var zone=lieuHebergement
var HIDDEN=(isNS) ? 'hide' : 'hidden'
var VISIBLE=(isNS) ? 'show' : 'visible'
if (ns6) {
 HIDDEN='hidden'
 VISIBLE='visible'
}

var navigationTransversale
var navigationTransversale1
var menu0visible='non'
var menu1visible='non'
var y1

//if (lieuHebergement.substring(0,15)!="http://philippe") {
// meilleurduweb84787=new Image() //Khetemet
// meilleurduweb84787.src="http://www.meilleurduweb.com/rubriques/out.php?id=84787"
// meilleurduweb46717=new Image() //Histophile
// meilleurduweb46717.src="http://www.meilleurduweb.com/rubriques/out.php?id=46717"
// meilleurduweb129704=new Image() //Armurerie du Soleil levant
// meilleurduweb129704.src="http://www.meilleurduweb.com/rubriques/out.php?id=129704"
//}

if (!document.all) {
 y1=pageYOffset
}

function disableselect(e){
 return false
}

function reEnable(){
 return true
}

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

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

if (VersionNavigateur(4.0,4.0)) {
 img=new Image()
 img.src="pointeur.gif"
 mm0=new Image();mm0.src="ms0.gif"
 mm0a=new Image();mm0a.src="ms0a.gif"
 mm1=new Image();mm1.src="ms1.gif"
 mm1a=new Image();mm1a.src="ms1a.gif"
 mm2=new Image();mm2.src="ms2.gif"
 mm2a=new Image();mm2a.src="ms2a.gif"
 cdcPreChargement=new Image();cdcPreChargement.src="champDeComprehension608x447.gif"
 btPreChargement=new Image();btPreChargement.src="bandeauTitre750x65.gif"
}

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 ouvrirPhoto(url,x,y) {
 if (url != "") {
  x=x+18
  y=y+23
  var MinWin, winOpts="width="+x+",height="+y+",resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no"
  if (((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion)>3)) || (navigator.appName == "Netscape")) {
   pere=top
  }
  nouvelle_fenetre=window.open(url,'', winOpts)  
  if (((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion)>3)) || (navigator.appName == "Netscape")) {
   nouvelle_fenetre.pere=pere
  }
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion)<3)) {
   top.name="principale"
  }	
  if (navigator.appVersion.indexOf("(X11") != -1 || navigator.appVersion.indexOf("(Mac") != -1) {
   nouvelle_fenetre=window.open(url,'', winOpts)
  }
  if (navigator.appName == "Netscape" && (parseInt(navigator.appVersion) >=3 )) {
   nouvelle_fenetre.focus()
  }
 }
}

function ouvrirPhotoG(url,x,y) {
 if (url != "") {
  x=x+18
  y=y+23
  var MinWin, winOpts="width="+x+",height="+y+",resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no"
  if (((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion)>3)) || (navigator.appName == "Netscape")) {
   pere=top
  }
  nouvelle_fenetre=window.open(url,'', winOpts)  
  if (((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion)>3)) || (navigator.appName == "Netscape")) {
   nouvelle_fenetre.pere=pere
  }
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion)<3)) {
   top.name="principale"
  }	
  if (navigator.appVersion.indexOf("(X11") != -1 || navigator.appVersion.indexOf("(Mac") != -1) {
   nouvelle_fenetre=window.open(url,'', winOpts)
  }
  if (navigator.appName == "Netscape" && (parseInt(navigator.appVersion) >=3 )) {
   nouvelle_fenetre.focus()
  }
 }
}

function ouvrirFenetre(url,x,y) {
 if (url != "") {
  x=x+18
  y=y+23
  var winOpts="width="+x+",height="+y+",resizable=yes,scrollbars=yes,toolbar=yes,location=yes,directories=yes,status=yes"
  nouvelle_fenetre=window.open(url,'', winOpts)  
 }
}

function ouvrirFenetreCentree(adresse,nomFenetre,w,h,scroll) {
 var win
 LeftPosition=(screen.width) ? (screen.width-w)/2 : 0
 TopPosition=(screen.height) ? (screen.height-h)/2 : 0
 parametres='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=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-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>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 ouvrirFenetreCentreePub(adresse,nomFenetre,w,h,scroll,lien) {
 var win
 LeftPosition=(screen.width) ? (screen.width-w)/2 : 0
 TopPosition=(screen.height) ? (screen.height-h)/2 : 0
 parametres='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=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-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>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 background=\""+adresse+"\" style=\"{background-repeat: no-repeat}\">\n")
  if (scroll!='no') {
   win.document.write("<img src=\""+adresse+"\">\n")
  }
  else {
   win.document.write("<a href='"+lien+"' target='_blank'><img src=\"pixel.gif\" width="+w+" height="+h+" border=0></a>\n")
  }  
  win.document.write("</body>\n</html>\n")
  win.document.close()
 }
 else {
  win=window.open(adresse,nomFenetre,parametres)
 }
}

function ouvrirFenetreCentreeOnBlurFermer(adresse,nomFenetre,w,h,scroll) {
 var win
 LeftPosition=(screen.width) ? (screen.width-w)/2 : 0
 TopPosition=(screen.height) ? (screen.height-h)/2 : 0
 parametres='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=no'
 if ((adresse.substring(adresse.length-3,adresse.length).toUpperCase()=="GIF") || (adresse.substring(adresse.length-3,adresse.length).toUpperCase()=="JPG")) {
  win=window.open("",nomFenetre,parametres)
  win.document.write("<html><head><title>cathares.org &copy;</title>\n")
  win.document.write("<meta http-equiv=\"imagetoolbar\" content=\"no\">\n")
  win.document.write("</head><body bgcolor=#ffffff background='telechargementEnCours800x600.gif' onBlur='close()'>\n")
  win.document.write("<img src='"+adresse+"'>\n")
  win.document.write("</body></html>\n")
  win.document.close()
 }
 else {
  win=window.open(adresse,nomFenetre,parametres)
 }
}

function SetCookie(name, value) {
 var argv = SetCookie.arguments;
 var argc = SetCookie.arguments.length;
 var expires = (argc > 2) ? argv[2] : null;
 var path = (argc > 3) ? argv[3] : null;
 var domain = (argc > 4) ? argv[4] : null;
 var secure = (argc > 5) ? argv[5] : false;
 document.cookie = name + "=" + escape (value) +
 ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
 ((path == null) ? "" : ("; path=" + path)) +
 ((domain == null) ? "" : ("; domain=" + domain)) +
 ((secure == true) ? "; secure" : "");
}

function GetCookie(name) {
 var arg = name + "=";
 var alen = arg.length;
 var clen = document.cookie.length;
 var i = 0;
 while (i < clen) {
	 var j = i + alen;
	 if (document.cookie.substring(i, j) == arg)
	 return getCookieVal (j);
 i = document.cookie.indexOf(" ", i) + 1;
 if (i == 0) break;
 }
 return null;
}

function getCookieVal(offset) {
 var endstr = document.cookie.indexOf (";", offset);
 if (endstr == -1)
 endstr = document.cookie.length;
 return unescape(document.cookie.substring(offset, endstr));
}

function placerObj(objet,px,py) {
 objet.left=px
 objet.top=py
}

function voirObj(objet) {
 objet.visibility=VISIBLE
}

function cacherObj(objet) {
 objet.visibility=HIDDEN
}

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)
}

function imprimer() {
 if (NS) {
  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 styleObjetMenu(objet) {
 if (document.getElementById && document.getElementById(objet)) {
  return window.menu.document.getElementById(objet).style
 }
 if (document.all && document.all(objet)) {
  return window.menu.document.all(objet).style
 }
 if (document.layers && document.layers[objet]) {
  return window.menu.document.layers[objet]
 }
 else {
  return false
 }
}

function enregistrerCookie(nom,valeur,jours) {
 var expDate = new Date()
 expDate.setTime(expDate.getTime() + (jours * 24 * 3600 * 1000))
 document.cookie = nom + "=" + escape(valeur)
 + ";expires=" + expDate.toGMTString()
}

function lireCookie(nom) {
 deb = document.cookie.indexOf(nom + "=")
 if (deb >= 0) {
  deb += nom.length + 1
  fin = document.cookie.indexOf(";",deb)
  if (fin < 0) fin = document.cookie.length
   return unescape(document.cookie.substring(deb,fin))
 }
 return ""
}

function effacerCookie(nom) {
 enregistrerCookie(nom,"",-1) 
}

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