var test = 0;

function checkHistory() {
	var proceed = (test == 0)
	if (proceed) doSecureCheck();
}

function doSecureCheck() {
	var contents = secure.split(';');
	var hit = 0;
	for (var i = 0; i < contents.length; i++) {
		var loc = window.location.href.indexOf(contents[i]);
		if (loc > -1) hit++;
	}
	if (hit > 0 && document.cookie.toLowerCase().indexOf('customernr') == -1) {
//		if (test == 0)alert('redirect here');
		window.location.href=nextpage;
	}
	test = 1;
}

checkHistory();
