switch (Attr.val) {
    case 0:
        Item.val = "enter";
        break;
    case 1:
        Item.val = "leave";
        break;
    case 2:
        Item.val = "enterleft";
        break;
    case 3:
        Item.val = "rightleave";
        break;
    case 4:
        Item.val = "enterright";
        break;
    case 5:
        Item.val = "leftleave";
        break;
    case 6:
        Item.val = "approaching";
        break;
    case 7:
        Item.val = "absenting";
        break;
    case 8:
        Item.val = "8";
        break;
    case 9:
        Item.val = "9";
        break;
}