// JavaScript Document
//Bibliothèque hotelterminus-larochelle.com
<!--
/*Permet d'envoyer des données en GET ou POST en utilisant les XmlHttpRequest*/
function sendData(param, page, someid) {
	if(document.all) {
		//Internet Explorer
		var XhrObj = new ActiveXObject("Microsoft.XMLHTTP") ;
	}//fin if
	else {
		   //Mozilla
		var XhrObj = new XMLHttpRequest();
	}//fin else
    //définition de l'endroit d'affichage:
	var content = document.getElementById(someid);
	XhrObj.open("POST", page);
	//Ok pour la page cible
	XhrObj.onreadystatechange = function() {
		if (XhrObj.readyState == 4 && XhrObj.status == 200)
		content.innerHTML = XhrObj.responseText ;
	}
	XhrObj.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	XhrObj.send(param);
}//fin fonction SendData
//-->

<!--Gestion popups
var infoShow;
function createInfoShow(urlInfo,width,height)
{
	infoShow = window.open('info.php' + urlInfo,'infoShow','scrollbars=yes,width=' + width + ',height=' + height + ',screenX=0,screenY=0,top=10,left=10');
}
function info(url,width,height)
{
	if(typeof(infoShow)!="undefined")
	{
		if(infoShow.closed!=true)
			infoShow.close();
	}
	var urlInfo  = '?info=' + url;
	createInfoShow(urlInfo,width,height);
}
function closeInfoShow()
{
	if(typeof(infoShow)!="undefined")
	{
		if(infoShow.closed!=true)
			infoShow.close();
	}
}
//-->
//barre de statuts vierge
window.defaultStatus = 'Vins Ducamin - Bruges - www.vins-ducamin.com'
<!--Alerte suppression-->
function supp(texte,lien) {
	if (confirm(texte))
		window.location=lien;
}
<!--Alerte archivage-->
function archive(texte,lien) {
	if (confirm(texte))
		window.location=lien;
}
function carClavier(e) {
	if (window.event)
		// Pour IE Explorer
		return String.fromCharCode(window.event.keyCode);
	else
		// Pour Netscape
		return String.fromCharCode(e.which);
}

function testNum(e) {
	caractere = carClavier(e);
	if (caractere < "0" || caractere > "9") return false;
	else return true;
}

<!-- ajout favoris
function addFav() {
	if ((navigator.appName.search('Microsoft Internet Explorer') != -1)&&(navigator.userAgent.search('Opera') == -1))  { 
		url_site="http://www.web-13.com/democcaz/";
		titre_site = "! Solution WEB-13 !";
		document.write('<a href="#" onClick="window.external.AddFavorite(url_site,titre_site);return(false);">Ajouter ce site à vos favoris</a>')
	} 
	if ((navigator.appName.search('Microsoft Internet Explorer') != -1)&&(navigator.userAgent.search('Opera') != -1))  { 
		document.write('Ctrl+T pour ajouter à vos signets'); 
	} 
	if (navigator.appName == "Netscape")  { 
		document.write('Ctrl+D pour marquer cette page'); 
	} 
} 
//ajout favoris -->
function JumpSelect(targ,adresse,selObj,restore){ 
  eval(targ+".location='"+adresse+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
