int tyes()
{digitalWrite(13, LOW); 
  byte cur=1;
  boolean fl=0;
  boolean ret=0;
  second1=0;
//secold=now.second();
  delay (300);
 do { 
   //irem();
  // button();
  delay (100);
 
 second1++;
if (second1>1) 
{ fl=!fl;
 second1=0;
}

    u8g.firstPage(); 
   do {
        u8g.setColorIndex(1);
        u8g.drawXBMP(0, 0, 128, 64, timery);
        u8g.setColorIndex(1);
        
        if (cur==1)
 {
   if(fl==0){u8g.setColorIndex(0);}
    if(fl==1){u8g.setColorIndex(1);}
   u8g.drawBox(19,37,7,7);
   u8g.drawBox(40,37,9,7);
   
 }
  if (cur==2)
{
   if(fl==0){u8g.setColorIndex(0);}
    if(fl==1){u8g.setColorIndex(1);}
   u8g.drawBox(66,37,7,7);
   u8g.drawBox(89,37,7,7);
   
 }


   } while( u8g.nextPage() );
   
   //**********************PDY********************  
 if (irrecv.decode(&results)) 
   {
         irrecv.resume(); // Receive the next value
          digitalWrite(13, HIGH);  
           if(results.value == 0xE904BD5) //right E904BD5
             {
              cur=cur+1;
              if (cur>2){cur=2;}
              }
               if(results.value == 0xE90CB55)   //left E90CB55
             {
              cur=cur-1;
              if (cur<1){cur=1;}
              } 
               if(results.value == 0xE101A04) //enter E101A04
                   {
                        ret=1;
                                              
                      } //выход с сохранением
         
         delay (300);
                irrecv.resume(); // Receive the next value
                 digitalWrite(13, LOW); 
 }
}while (ret<1);  
delay (200);
return cur;
}
