Help! LB with multiple ISP IPs?

I am new to iRule… can any one say to me will this help me or not?

I have some server NATed with specific IPs. I want this server to use specific pool of ISPs IPs with SNAT.

I have LC for two ISPs.

This is my iRule

when SERVER_CONNECTED {

set THEIP [ IP::server_addr ]

switch $THEIP {

172.16.1.17 { SNATPOOL SNAT_POOL_17

POOL IP_POOL_17

}

172.16.1.18 { SNATPOOL SNAT_POOL_18

POOL IP_POOL_18

}

172.16.1.19 { SNATPOOL SNAT_POOL_19

POOL IP_POOL_19

}

172.16.1.20 { SNATPOOL SNAT_POOL_20

POOL IP_POOL_20

}

172.16.1.21 { SNATPOOL SNAT_POOL_21

POOL IP_POOL_21

}

172.16.1.22 { SNATPOOL SNAT_POOL_22

POOL IP_POOL_22

}

default{ SNATPOOL SNAT_POOL_VIP

POOL IP_POOL_VIP

}

}

}

then what i do next after this iRule. How to apply it?