
function OpenWin()
{
	var sUrl = "/commande/ajouterpanier.jsp";
	var sWprops = eval("'left=0,top=0,menubar=0,scrollbars=0,resizable=0,width=400,height=250'");
	var oPW = self.open(sUrl, '', sWprops);
	return;
}

function AffichageTitre()
{
	var url = "/affichage/affichagelong.jsp?produitAccedeAvecCatalogue=" + document.form1.acces_rapide_titre.options[document.form1.acces_rapide_titre.selectedIndex].value;
	window.location.href = url;
}
function AffichageAuteur() {

	var url = "/affichage/affichagecourt.jsp?noPage=1&accesRapideAuteur=" + document.form1.acces_rapide_auteur.options[document.form1.acces_rapide_auteur.selectedIndex].value;
	window.location.href = url;
}

function AffichageSousRubrique()
{
	if (document.form1.acces_rapide_sous_rubrique.options[document.form1.acces_rapide_sous_rubrique.selectedIndex].value == "")
	{
		alert("Veuillez sélectionner une sous-rubrique.");
		return;
	}

	var url = "/affichage/affichagecourt.jsp?noPage=1&listeProduitsALaUneRub=" + document.form1.acces_rapide_sous_rubrique.options[document.form1.acces_rapide_sous_rubrique.selectedIndex].value;
	window.location.href = url;
}

function AffichageRubrique()
{
	if (document.form1.acces_rapide_rubrique.options[document.form1.acces_rapide_rubrique.selectedIndex].value == "")
	{
		alert("Veuillez sélectionner une rubrique.");
		return;
	}

	var url = "/affichage/affichagecourt.jsp?noPage=1&listeProduitsALaUneRub=" + document.form1.acces_rapide_rubrique.options[document.form1.acces_rapide_rubrique.selectedIndex].value;
	window.location.href = url;
}

function AffichageUnivers()
{
	var url = "/affichage/affichagecourt.jsp?noPage=1&listeProduitsALaUne=" + document.form1.acces_rapide_univers.options[document.form1.acces_rapide_univers.selectedIndex].value;
	window.location.href = url;
}

function FiltreUnivers()
{
	var url = "/affichage/affichagecourt.jsp?noPage=1&filtreUnivers=" + document.form1.filtreUnivers[document.form1.filtreUnivers.selectedIndex].value;
	window.location.href = url;
}

function AffichageLong()
{
	var url = "/affichage/affichagelong.jsp?produitAccedeAvecCatalogue=" + document.form1.acces_rapide_titre.options[document.form1.acces_rapide_titre.selectedIndex].value;
	window.location.href = url;
}

function AffichageAuteur() {

	var url = "/affichage/affichagecourt.jsp?noPage=1&accesRapideAuteur=" + document.form1.acces_rapide_auteur.options[document.form1.acces_rapide_auteur.selectedIndex].value;
	window.location.href = url;
}

function closeTraitement()
{
	var theWindowToClose = window.open('','traitement', 'height=200,width=500 toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=no,status=yes');
	
	theWindowToClose.close();
}

function NePlusAfficher()
{	
	var urlAAfficher = window.location.pathname + "?NePlusAfficher=" + window.document.Options.NePlusAfficher.checked;
	window.location.href= urlAAfficher;
}

function initialise()
{
	var myRe = new RegExp( "NePlusAfficher=(.+)(\&|$)","i");
	myRe.exec( window.location.search);

	window.document.Options.NePlusAfficher.checked= (RegExp.$1 == "true");
}

function isNumberString (InString)
{
    if (InString.length==0) return (false);

    var RefString="1234567890";

    for (Count=0; Count < InString.length; Count++) {
        TempChar=InString.charAt(Count);
        if (RefString.indexOf (TempChar, 0)==-1) return (false);
    }

    return (true);
}

function Message()
{
   alert ("Très prochainement, vous aurez la possibilité d'effectuer vos paiements sécurisés par carte de crédit. Ceci uniquement sur http://www.belgiqueloisirs.com");
}

function numOnly(e)
{
	var keyChar;

	if ( navigator.appName == "Microsoft Internet Explorer") {
		target= event.srcElement;
		keyChar= event.keyCode;
	}
	else { // Netscape
		target= e.target;
		keyChar= e.which;

		// Process the backspace character.
		if ( keyChar == 8) {
			 return( true);
		}
	}

	// Convert the keypressed to a character.
	keyChar= String.fromCharCode( keyChar);

	// Verify the control for which the event occurs.
	if ( target.name == "Client0") {
		//var keyChar = String.fromCharCode(e.which);
		//alert( keyChar);

		if (keyChar < '0' || keyChar > '9') {
			return false;
		}
	}
	
	return( true);
}
