var browserType = navigator.userAgent;
if (browserType.indexOf("Netscape") == -1) {
	document.cookie = "testCookie=yes";
	if (document.cookie) {
		var expireDate = new Date();
		expireDate.setTime(expireDate.getTime() - (24 * 60 * 60 * 1000 * 365));
		expireDate.toGMTString();
		document.cookie = "testCookie=yes; expires=" + expireDate;

		var path = document.location.href;

		// CHECK FOR TUTORIAL COOKIES
		var checkCookie1 = document.cookie.indexOf("moneyTutorial=yes");
		var checkCookie2 = document.cookie.indexOf("entrepreneurTutorial=yes");
		var checkCookie3 = document.cookie.indexOf("siteTutorial=yes");

		var checkPath1 = path.indexOf("my_money");
		var checkPath2 = path.indexOf("entrepreneur");
		var checkPath3 = path.indexOf("google");

		if ((checkPath1 != -1) && (checkPath3 == -1) && (checkCookie1 == -1)) {
			// is 'my_money' and money tutorial doesn't exist

			expireDate = new Date();
			expireDate.setTime(expireDate.getTime() + (24 * 60 * 60 * 1000 * 365));
			expireDate.toGMTString();
			document.cookie = "moneyTutorial=yes; expires=" + expireDate;
			window.open("http://www.canadianbusiness.com/tutorial/TUTORIALmoneysense.html","moneyTutorial","width=700,height=400");
		}

		if ((checkPath2 != -1) && (checkPath3 == -1) && (checkCookie2 == -1)) {

			// is 'entrepreneur' and entrepreneur tutorial doesn't exist
			expireDate = new Date();
			expireDate.setTime(expireDate.getTime() + (24 * 60 * 60 * 1000 * 365));
			expireDate.toGMTString();
			document.cookie = "entrepreneurTutorial=yes; expires=" + expireDate;
			window.open("http://www.canadianbusiness.com/tutorial/TUTORIALpro.html","entrepreneurTutorial","width=700,height=400");
		}

		if ((checkPath1 == -1) && (checkPath2 == -1) && (checkPath3 == -1) && (checkCookie3 == -1)) {
			// not 'my_money' or 'entrepreneur' and site cookie doesn't exist

			expireDate = new Date();
			expireDate.setTime(expireDate.getTime() + (24 * 60 * 60 * 1000 * 365));
			expireDate.toGMTString();
			document.cookie = "siteTutorial=yes; expires=" + expireDate;
			window.open("http://www.canadianbusiness.com/tutorial/tutorial2.html","siteTutorial","width=700,height=400");
		}
	}
}
