function isEmpty(s) // Check If the string is empty.
{ 
	return ((s == null) || (s.length == 0)) 
}
function isWhitespace (s)
{
   var i;
   // Is s empty?
   if (isEmpty(s)) return true;
			
	for (i = 0; i < s.length; i++)
        {
	  //alert("THis isFlase")
              // Check that current character isn't whitespace.
		var c = s.charAt(i);
	        //if (s.indexOf(c) == -1)
		if(c!=" ")
		return false;
         }
         // All characters are whitespace.
         return true;
    }

