   var subMenu = "";
   function validEmail(s){
     if( s == null) return false;
     if( s.length <5) return false;
     for (i=0; i< s.length; i++){      
       if( (s.charAt(i) == "@") ) break;
       if( i== s.length ) return false;
     }
     return true;
   }
    
   function lefttrim(s){
      while(s.length >0 ){
        c = s.charAt(0);
        
        if( c == ' ' ){
          s = s.substring(1);
        }
        else break;  
      }
      return s;
    }
    function righttrim(s){
      while(s.length >0 ){
        c = s.charAt(s.length -1);
        if( c == ' ' ){
          s = s.substring(0, s.length -1);
        }
        else break;  
      }
      return s;
    }
    
    function alltrim(s){      
      s1 = lefttrim(s);
      s1 = righttrim(s1);
      return s1;
    }
    
    function isValidNumeric( str){
      for( i=0; i < str.length; i++){
        c = str.charAt(i);
        if( (c >'9' || c < '0' ) && c != '.'){
          return false;
        }
      }
      return true;
    }