there is a really nice FAQ section on this.

TCP/IP Primer, Part I - IP Addresses
TCP/IP Primer, Part II - Classless Inter-Domain Routing (CIDR)
TCP/IP Primer, Part III - IP Addresses and KiXtart

there are a numbr of UDF's to do a proper subnet check on ipaddresses, my personal favorite and one not in the FAQ.... is Richard's : IPDecimal() - IP Address to Decimal (network calc)

code example using it...

Code:

$IP=EnumIPInfo(0,0)
$Mask=EnumIPInfo(0,1)

Select
case IPDecimal(IPDecimal($IP) & IPDecimal($Mask)) = "192.168.1.0"
;you are in the 192.168.1.0 subnet

case IPDecimal(IPDecimal($IP) & IPDecimal($Mask)) = "192.168.1.2"
;you are in the 192.168.1.1 subnet

case IPDecimal(IPDecimal($IP) & IPDecimal($Mask)) = "192.168.1.3"
;you are in the 192.168.1.2 subnet

case IPDecimal(IPDecimal($IP) & IPDecimal($Mask)) = "192.168.1.4"
;you are in the 192.168.1.3 subnet
endselect