// Fonction de "http://www.pbdr.com/vbtips/asp/JavaNumberValid.htm"
function is_numeric( strString )
//  check for valid numeric strings	
{
	var strValidChars = "0123456789.-";
	var strChar;
	var blnResult = true;
	if (strString.length == 0) return false;
	
		//  test strString consists of valid characters listed above
		for (i = 0; i < strString.length && blnResult == true; i++)
		{
			strChar = strString.charAt(i);
			
			if (strValidChars.indexOf(strChar) == -1)
			{
				blnResult = false;
			}
		}
		return blnResult;
}
function DateInt()
{
	var now = new Date();
		var h = now.getHours();
	        var m = now.getMinutes();
       		var s = now.getSeconds();
				
	return ( h * 60 * 60 ) + ( m * 60 ) + s;
}
function sleep( intTime )
{
	if( !is_numeric( intTime ) )
	{
		return;  // Arret de l'éxecution
	}
		
	intTime = ( intTime / 1000 );
	var Exp = DateInt() + intTime; // TimeOut
		
		while( Exp > DateInt() )
		{
			;
		}
}