//fonction qui verifie que l'utilisateur a entre un chiffre variant de 1 a NBPAGES
function isEmpty(s)
{   return ((s == null) || (s.length == 0))
}
function isDigit (c)
{   return ((c >= "0") && (c <= "9"))
}
function isInteger (s)

{   var i;

    if (isEmpty(s)) 
      return false;

    // Search through string's characters one by one
    // until we find a non-numeric character.
    // When we do, return false; if we don't, return true.

    for (i = 0; i < s.length; i++)
    {   
        // Check that current character is number.
        var c = s.charAt(i);

        if (!isDigit(c)) return false;
    }

    // All characters are numbers.
    if (s + 0 ==0)return false;	    
    return true;
}

function checkIsInteger(theBox){
	if(!isInteger(theBox.value)){
		alert("VOUS DEVEZ ENTRER UN NUMERO DE PAGE VALIDE");
		return false;
	}
	return true;
}
