function FindLevelObject(LevelName)
{
   if(LevelName!='all')
   {
      var i= 0;
      for(i=0; i<Levels.length;i++)
      {
         //alert(Levels[i].GetName()+ " "+ LevelName);
         if(Levels[i].GetName() == LevelName)
         {
            return Levels[i]; 
         }
      }
      return false;
   }else {
      var CurrentLevel = new LevelObject("all");
      for(i=0; i<Levels.length;i++)
      {
         
         for(var u=0;u<Levels[i].ArrayOperation.length;u++)
         {
            CurrentLevel.AddOperation(Levels[i].ArrayOperation[u]);
         }
      }
      return CurrentLevel;
   }
}
/*
  *
  * find level name into global level array. Return false if not found, level object otherwise
  */
find level name into global level array. Return false if not found, level object otherwise
find level name into global level array . Return false if not found level object otherwise
function FindLevelObject(LevelName)
{
   if(LevelName!='all')
   {
      var i= 0;
      for(i=0; i<Levels.length;i++)
      {
         if(Levels[i].GetName() == LevelName)
         {
            return Levels[i]; 
         }
      }
      return false;
   }else {
      var CurrentLevel = new LevelObject("all");
      for(i=0; i<Levels.length;i++)
      {
         for(var u=0;u<Levels[i].ArrayOperation.length;u++)
         {
            CurrentLevel.AddOperation(Levels[i].ArrayOperation[u]);
         }
      }
      return CurrentLevel;
   }
}
function FindLevelObject ( LevelName ) { if ( LevelName != 'all' ) { var i = 0 ; for ( i = 0 ; i < Levels . length ; i ++ ) { if ( Levels [ i ] . GetName ( ) == LevelName ) { return Levels [ i ] ; } } return false ; } else { var CurrentLevel = new LevelObject ( "all" ) ; for ( i = 0 ; i < Levels . length ; i ++ ) { for ( var u = 0 ; u < Levels [ i ] . ArrayOperation . length ; u ++ ) { CurrentLevel . AddOperation ( Levels [ i ] . ArrayOperation [ u ] ) ; } } return CurrentLevel ; } }
find level name into global level array.
find level name into global level array .
//alert(Levels[i].GetName()+ " "+ LevelName);