void GetDescription(char d[])
{
  strcpy(d,"Fullscreen picture preview by Parus.Script by Димастый. Beast Edition");
  
}

int GetPriority()
{
  return 256;
}


int GetValueAfter(char str[])
{
  char val[100];
  char line[200];
  int i, l, k;
   
  GetLineByStr(str,line);
  
  l = strlen(str);
  for (i = 0, k= 0; i <= l; i++) 
  {  
    if (line[l+i] != ' ') val[k++] = line[l+i];
    else if (k) break;
  }  
  return atol(val);
}



void DeleteBlock(char block[])
{
   int val, i, num;
   val = GetValueAfter(block);
   num = GetLineNum(block);
   RemoveLineByNum(num);
   for (i = 0; i < val; i++) RemoveLineByNum(num);
}

int IsResMore176()
{
    int DigClockX;  
    DigClockX = GetValueAfter("1 574 ");
    return (DigClockX > 144);
}


void PatchSKI()
{   
   if (IsResMore176())
   {
      log("This script only for 176x220 phones.");
      return;
   }
   DeleteBlock("0 14 ");
   DeleteBlock("0 15 ");
   DeleteBlock("0 16 ");
   DeleteBlock("0 20 ");
   DeleteBlock("0 21 ");

   AddLine("0 14 1");
   AddLine("1 0 0 -1 -1");

   AddLine("0 15 1");
   AddLine("1 0 0 176 220");

   AddLine("0 16 1");
   AddLine("1 4 161 18 175");

   AddLine("0 20 1");
   AddLine("1 0 175 79 195");

   AddLine("0 21 1");
   AddLine("1 80 175 170 195");

   

}

