Does anyone know why the following code would work perfectly in FireFox but error out in IE7?

The code:

function readPageNumber() {
	var split1 = document.cookie.split("=");
	var split2 = split1[1].split("/");    <-- This is the line that errors
	var split3 = split2[4].split(".");
	var page = split3[0];
	return page;

The error reads:

Error: '1' is null or not an object.

So why does FireFox execute the code correctly and IE7 does not?

Thanks for your time.