// Everything needed to browser detect and open an IB window

// Browser detection. Taken from www.apple.com/developer
// Use: var its = new its()
//      if (its.nn) { do something

function its() {
	var n = navigator;
	// string comparisons are much easier if we lowercase everything now.
	// to make indexOf() tests more compact/readable, we prepend a space
	// to the userAgent string (to get around '-1' indexOf() comparison)
	var ua = ' ' + n.userAgent.toLowerCase();
	var pl = n.platform.toLowerCase(); // not supported in NS3.0
	var an = n.appName.toLowerCase();

	// browser version
	this.version = n.appVersion;

	this.nn = ua.indexOf('mozilla') > 0;

	// 'compatible' versions of mozilla aren't navigator
	if(ua.indexOf('compatible') > 0) {
		this.nn = false;
	}

	this.opera = ua.indexOf('opera') > 0;
	this.webtv = ua.indexOf('webtv') > 0;
	this.ie = ua.indexOf('msie') > 0;
	this.aol = ua.indexOf('aol') > 0;

	this.safari = ua.indexOf('safari') > 0;

	this.firefox = ua.indexOf('firefox') > 0;

	this.major = parseInt( this.version );
	this.minor = parseFloat( this.version );

	// platform
	this.mac = ua.indexOf('mac') > 0;
	this.mac68k = (ua.indexOf('68k') > 0 || ua.indexOf('68000') > 0);
	this.macppc = (ua.indexOf('ppc') > 0 || ua.indexOf('powerpc') > 0);

	this.win = ua.indexOf('win') > 0;
	this.win16 = (ua.indexOf('16') > 0 && ua.indexOf('win') > 0);
	this.win31 = this.win16;
	this.win95 = (ua.indexOf('95') > 0 && ua.indexOf('win') > 0);
	this.win98 = ((ua.indexOf('98') > 0) && (ua.indexOf('win 9x 4.90')==-1) && ua.indexOf('win') > 0);
//	this.win00 = (ua.indexOf('00') > 0 && ua.indexOf('win') > 0);
	this.winnt = (ua.indexOf('nt') > 0 && ua.indexOf('win') > 0);
	this.win2k = ((ua.indexOf("windows nt 5.0")!=-1) || (ua.indexOf("windows 2000")!=-1)); 
	this.winxp = ((ua.indexOf("windows nt 5.1")!=-1) || (ua.indexOf("windows xp")!=-1));
	this.winme = (ua.indexOf("win 9x 4.90")!=-1);
	this.vista = (ua.indexOf("windows nt 6.0") !=-1);
	this.win7  = (ua.indexOf("windows nt 6.1") !=-1);

	this.os2 = ua.indexOf('os/2') > 0;

	this.sun = ua.indexOf('sunos') > 0;
	this.irix = ua.indexOf('irix') > 0;
	this.hpux = ua.indexOf('hpux') > 0;
	this.aix = ua.indexOf('aix') > 0;
	this.dec = (ua.indexOf('dec') > 0 || ua.indexOf('alpha') > 0 || ua.indexOf('osf1') > 0 || ua.indexOf('ultrix') > 0);
	this.sco = (ua.indexOf('sco') > 0 || ua.indexOf('unix_sv') > 0);
	this.vms = (ua.indexOf('vax') > 0 || ua.indexOf('openvms') > 0);
	this.linux = ua.indexOf('linux') > 0;
	this.sinix = ua.indexOf('sinix') > 0;
	this.reliant = ua.indexOf('reliantunix') > 0;
	this.freebsd = ua.indexOf('freebsd') > 0;
	this.openbsd = ua.indexOf('openbsd') > 0;
	this.netbsd = ua.indexOf('netbsd') > 0;
	this.bsd = ua.indexOf('bsd') > 0;
	this.unixware = ua.indexOf('unix_system_v') > 0;
	this.mpras = ua.indexOf('ncr') > 0;

	this.unix = ua.indexOf("x11") > 0;

	// workarounds
	// - IE5/Mac reports itself as version 4.0
   // This appears to be the case for PC as well and IE6.
	if (this.ie) {
		if ( (ua.indexOf("msie 5")) || (ua.indexOf("msie 6")) ) {
			this.major = 5;
			var first_comma = ua.indexOf(";");
			var second_comma = ua.lastIndexOf(";");
			var actual_major = ua.substring(first_comma + 6, second_comma);
			this.minor = parseFloat(actual_major);
		}

	   // There appears to be a problem with PC/IE 4.01
		else if(ua.indexOf("msie 4.01")) {
      	this.minor = "4.01";
      }
   }

   // - NN6.2 reports itself as version 5.0
   if ((this.nn) && (ua.indexOf("netscape6"))) {
		this.major = 6;
		var nn_index = ua.lastIndexOf("/");
		var actual_major = ua.substring(nn_index + 1);
		this.minor = parseFloat(actual_major);
   }

	if (this.firefox)
	{
		var is_moz_ver = (navigator.vendorSub)?navigator.vendorSub:0;
		if(!is_moz_ver) {
           is_moz_ver = ua.indexOf('firefox/');
           is_moz_ver = ua.substring(is_moz_ver+8);
           is_moz_ver = parseFloat(is_moz_ver);
        }
		var is_fx_ver = is_moz_ver;
		this.minor = is_fx_ver;
	}
	return this;
}

// Detect the browser type
function detectBrowser() {
   var thing = new its();
   var browser = "incorrect";
	if(thing.opera) {
		browser = "incorrect";
	}
	// If MAC
	// Valid browsers NN 7.0 to less than 7.20 and IE 5.1 to 5.2
	// MAC operating systems cannot be detected.
	else if (thing.mac) {
		if ((thing.nn && thing.minor >= 7.0 && thing.minor <= 7.20) || (thing.ie && thing.minor >= 5.1 || thing.minor <= 5.2) || (thing.safari)) {
			browser = "correct";
		}
	}
	// If PC and either win95, win98, winnt or win2k.
	// Valid browsers NN 7.0 to less than 7.20 and IE 5.01 to 6.0.
	else if (thing.win95 || thing.win98 || thing.win2k || (thing.winnt && !(thing.win2k) && !(thing.winxp) && !(thing.vista) && !(thing.win7))) {
		if ((thing.nn && thing.minor >= 7.0 && thing.minor <= 7.20) || (thing.ie && thing.minor >= 5.01 && thing.minor <= 6)) {
			browser = "correct";
		}
	}
	// If PC and winme.
	// Valid browsers NN 7.0 to 7.20 and IE 5.5 to 6.0.
	else if (thing.winme) {
		if ((thing.nn && thing.minor >= 7.0 && thing.minor <= 7.20) || (thing.ie && thing.minor >= 5.5 && thing.minor <= 6)) {
			browser = "correct";
		}
	}
	// If PC and winxp.
	// Valid browsers NN 7.0 to 7.20 and IE6 to 8.
	else if (thing.winxp) {
		if ((thing.nn && thing.minor >= 7.0 && thing.minor <= 7.20) || (thing.ie && thing.minor >= 6 && thing.minor <= 8)) {
			browser = "correct";
		}
	}
	// if vista
	else if (thing.vista) {
		if (thing.ie && thing.minor <= 8) {
			browser = "correct";
		}
	}
	// if win7
	else if (thing.win7) {
		if (thing.ie && thing.minor <= 8) {
			browser = "correct";
		}
	}
	//If any OS and Firefox 3.5 to 3.6
	if (thing.firefox) {
		ffVer = thing.minor;
		ffVer = ffVer + "";
		if (ffVer != 0) {
			ffVerArray = ffVer.split(".");
			if (ffVerArray.length == 3) {
				ffVer = ffVerArray[0] + "." + ffVerArray[1] + ffVerArray[2];
			}
			if (ffVer >= 3.5 && ffVer <= 3.6) {
				browser = "correct";
			}
		}
	}

   return browser;
}

// Open Window
function openIBWindow(url,winName) {
	var thing = new its();
	if (winName == "") winName = "ib";

	if (url.indexOf("cgi") != -1) {
		var correctBrowser = detectBrowser();
		if (correctBrowser == "incorrect") {
			url = url + "?browser=incorrect";
		} else {
			url = url + "?browser=correct";
		}
	}

	var wOpen;
	var sOptions = 'directories=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=yes,toolbar=no,hotkeys=true';
	var ibWinSize = getIBWSizeCookieValue();
	var winWidth = (screen.availWidth - 10).toString();
	var winHeight = (screen.availHeight - 122).toString();
	var lPos = 0;
	var tPos = 0;

	if (ibWinSize == null) {
		sOptions = sOptions + ',width=' + winWidth.toString();
		sOptions = sOptions + ',height=' + winHeight.toString();
	} else {
		var regPattern = /([0-9]{1,}[x]{1}[0-9]{1,}[s]{1}[0-9]{1,}[x]{1}[0-9]{1,}$)/;
		if (regPattern.test(ibWinSize) == true) {
			var ibSizePos = ibWinSize.split("s");
			var ibWidthHeight = ibSizePos[0].split("x");
			winWidth = ibWidthHeight[0];
			winHeight = ibWidthHeight[1];
			var ibLeftTop = ibSizePos[1].split("x");
			lPos = ibLeftTop[0];
			tPos = ibLeftTop[1];
			// Window position fix for IE
			if (/msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent)) {
				lPos = lPos - 2;
				tPos = tPos - 30;
				if (lPos <= 10) { lPos = 0; }
				if (tPos <= 10) { tPos = 0; }
			}
		}
		sOptions = sOptions + ',width=' + winWidth.toString();
		sOptions = sOptions + ',height=' + winHeight.toString();
	}
	sOptions = sOptions + ',screenX=0,screenY=0,left='+lPos.toString()+',top='+tPos.toString();

	wOpen = window.open( '', winName, sOptions );

	if (ibWinSize == null) {
		wOpen.moveTo( 0, 0 );
		if (document.layers) {
			wOpen.resizeTo( screen.availWidth - window.outerWidth, screen.availHeight  - window.outerHeight );
		} else {
			wOpen.resizeTo( screen.availWidth, screen.availHeight );
		}
	} else {
		// Window resize fix for FF
		if( typeof( window.outerHeight ) == 'number' ) {
			wOpen.resizeTo(winWidth, winHeight);
		}
	}
	wOpen.location = url;
	wOpen.focus();	
}

// Open Window
function openNCWindow(url,winName) {
	var thing = new its();

	if (winName == "") winName = "nabconnect";

	// Open window to screen extents
	var wOpen;
	var sOptions;

	sOptions = 'directories=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=yes,toolbar=no,hotkeys=true';
	sOptions = sOptions + ',width=' + (screen.availWidth - 10).toString();
	sOptions = sOptions + ',height=' + (screen.availHeight - 122).toString();
	sOptions = sOptions + ',screenX=0,screenY=0,left=0,top=0';

	wOpen = window.open( '', winName, sOptions );
	wOpen.location = url;
	wOpen.focus();
	wOpen.moveTo( 0, 0 );
	if (document.layers) {
		wOpen.resizeTo( screen.availWidth - window.outerWidth, screen.availHeight  - window.outerHeight );
	}
	else {
		wOpen.resizeTo( screen.availWidth, screen.availHeight );
	}
}

/* ibRedireect functions below */ 
campaignsArray = new Array();
campaignsArray = new Array(
new campaignObj("/Personal_Finance/0,,94828,00.html?campaignID=LHZ&WT.mc_id=LHZ", 20),
new campaignObj("/Personal_Finance/0,,93884,00.html?campaignID=RPP&WT.mc_id=RPP", 20),
new campaignObj("/Personal_Finance/0,,95165,00.html?campaignID=VAO&WT.mc_id=VAO", 7),
new campaignObj("/Personal_Finance/0,,95883,00.html?campaignID=MWK&WT.mc_id=MWK", 20),
new campaignObj("/Personal_Finance/0,,94983,00.html", 10),
new campaignObj("/Personal_Finance/0,,95542,00.html", 15)
);

function ibRedirect() {
	openIBWindow("/cgi-bin/ib/301_start.pl","ib");

	var cookieEnabled=(navigator.cookieEnabled)? true : false;
	if (typeof navigator.cookieEnabled=="undefined" && !cookieEnabled) { 
		document.cookie= "testcookie";
		cookieEnabled=(document.cookie.indexOf("testcookie")!=-1)? true : false;
	}
	if (cookieEnabled) {
		var sum_of_all_percentages = 100;
		var redirectChance = Math.round((sum_of_all_percentages - 1) * Math.random()) + 1;
		var percent_limit = 0;
		var campaignChoice = -1;
		for (i = 0; i < campaignsArray.length; i++) {
			percent_limit += campaignsArray[i].camp_per;
			if (redirectChance <= percent_limit) {
				campaignChoice = campaignsArray[i].camp_url;
				break;
			}
		}

		if (campaignChoice != -1) {
			if (getOptOutCookie("ibOptOut")) {
				var dc = document.cookie;
				if (dc.indexOf(campaignChoice) < 0) {
					if (campaignChoice.indexOf("campaignID") < 0) {
						window.location = campaignChoice + "?optOut=true";
					} else {
						window.location = campaignChoice + "&optOut=true";
					}
				}
			} else {
				if (campaignChoice.indexOf("campaignID") < 0) {
					window.location = campaignChoice + "?optOut=true";
				} else {
					window.location = campaignChoice + "&optOut=true";
				}
			}
		}
	}
}

function campaignObj(camp_url,camp_per) {
	this.camp_url = camp_url;
	this.camp_per = camp_per;
}

function createOptOutCookie(campaign) {
	var currentURL = window.location.href;
	var exp = new Date();
	var expiryDate = exp.getTime() + (180 * 24 * 60 * 60 * 1000);
	exp.setTime(expiryDate);

	if (currentURL.indexOf("nab.com.au") > 0) {
		document.cookie = "ibOptOut=" + campaign + "; expires=" + exp.toGMTString() + "; path=/; domain=.nab.com.au";;
	} else {
		document.cookie = "ibOptOut=" + campaign + "; expires=" + exp.toGMTString() + "; path=/; domain=.national.com.au";;
	}
}

function getOptOutCookie(name) {
	var nameEq = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++){
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEq) == 0) return c.substring(nameEq.length,c.length);
	}
	return null;
}

function updateOptOutCookie(campaign) {
	if (eval(optOutForm.optOutBox.checked) == true) {
		if (getOptOutCookie("ibOptOut")) {
			var optOutCampaigns = getOptOutCookie("ibOptOut");
			var optOutCampaignArray = optOutCampaigns.split(" ");
			var numCampaigns = optOutCampaignArray.length;
			var newOptOutCampaigns = "";

			for (i = 0; i < numCampaigns; i++) {
				for (j = 0; j < campaignsArray.length; j++) {
					if (optOutCampaignArray[i] == campaignsArray[j].camp_url) {
						newOptOutCampaigns = newOptOutCampaigns + " " + optOutCampaignArray[i];
					}
				}
			}

			newOptOutCampaigns = newOptOutCampaigns + " " + campaign;
			createOptOutCookie(newOptOutCampaigns);
		} else {
			createOptOutCookie(campaign);
		}
	}
	window.location = "/";
}

function optOut() {
	var currentURL = window.location.href;
	var campaign;
	var temp;
	
	if (currentURL.indexOf("nab.com.au") > 0) {
		campaign = currentURL.split("nab.com.au");
		currentURL = campaign[1];
	} else if (currentURL.indexOf("national.com.au") > 0) {
		campaign = currentURL.split("national.com.au");
		currentURL = campaign[1];
	}

	if (currentURL.indexOf("optOut=true") > 0) {
		if (currentURL.indexOf("campaignID") > 0) {
			temp = currentURL.split("&optOut=true");
		} else {
			temp = currentURL.split("?optOut=true");
		}
		currentURL = temp[0];		
		writit("<form name='optOutForm'><input type='checkbox' name='optOutBox' id='optOutBox' /> <label for='optOutBox'>Acknowledge - Don't show this again.</label>&nbsp;&nbsp;&nbsp;&nbsp;<a href='Javascript:updateOptOutCookie(\"" + currentURL + "\")'><img src='/vgnmedia/images/Personal_Finance/returnweb.gif' border='0' alt='Return to nab.com.au'></a></form>", "optOut");
	}
}

function flashOptOut(optOutURL) {
	var currentURL = window.location.href;
	var variableText = "";
	var variables = new Array();
	var temp;

	variables = currentURL.split("?");
	variableText = variables[1];	
	optOutURL = optOutURL + "?" + variableText;
	
	if (optOutURL.indexOf("optOut=true") > 0) {
		temp = optOutURL.split("&optOut=true");
		optOutURL = temp[0];
		writit("<form name='optOutForm'><input type='checkbox' name='optOutBox' id='optOutBox' /> <label for='optOutBox'>Acknowledge - Don't show this again.</label>&nbsp;&nbsp;&nbsp;&nbsp;<a href='Javascript:updateOptOutCookie(\"" + optOutURL + "\")'><img src='/vgnmedia/images/Personal_Finance/returnweb.gif' border='0' alt='Return to nab.com.au'></a></form>", "optOut");
	}
}

function writit(text,id) { 
	if (document.getElementById)
	{
		x = document.getElementById(id);
		x.innerHTML = '';
		x.innerHTML = text;
	}
	else if (document.all)
	{
		x = document.all[id];
		x.innerHTML = text;
	}
	else if (document.layers)
	{
		x = document.layers[id];
		x.document.open();
		x.document.write(text);
		x.document.close();
	}
}

/* Login panel */
var artifactHeadingLogin = "<h3>login to...</h3>";

var artifactBodyLogin = "";
now = new Date(); mo = now.getMonth(); da = now.getDate(); da = (da <10) ? ("0" + da) : da; we = now.getDay(); ye = now.getFullYear(); Mon = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
//var artifactSecUpdate = '<a class="labelBold" href="/hoax" title="Security notice">Security notice - '+da+' '+Mon[mo]+' '+ye+'</a>';
var artifactSecUpdate = '';
var nabConnectMsg = '<a class="labelBold" href="/Business_Solutions/0,,94535,00.html" title="NAB Connect security tips">NAB Connect security tips</a>';

function changeMsg() {
	if (document.login.cbxLogin.selectedIndex == 1) {
		document.getElementById("nabConnectMsg").style.display = 'block';
		document.getElementById("artifactSecUpdate").style.display = 'none';
	} else {
		document.getElementById("artifactSecUpdate").style.display = 'block';
		document.getElementById("nabConnectMsg").style.display = 'none';
	}
}

function loginRegister() {
	if (document.login.cbxLogin.selectedIndex == 0) {
		var thing = new its();
		var correctBrowser = detectBrowser();
		if (correctBrowser == "incorrect") {
			var urlExt = "?browser=incorrect";
		} else {
			var urlExt = "?browser=correct";
		}
		location = "/cgi-bin/ib/301_register.pl" + urlExt;
	} else if (document.login.cbxLogin.selectedIndex == 1) {
		location = "/Business_Solutions/0,,91939,00.html";
	} else if (document.login.cbxLogin.selectedIndex == 2) {
		location = "/cgi-bin/nolt/nolt_redirect.pl?id=noltRegister";
	} else if (document.login.cbxLogin.selectedIndex == 3) {
		location = "/Personal_Finance/0,,89182,00.html?ncID=ZBA";
	} else if (document.login.cbxLogin.selectedIndex == 4) {
		location = "/wps/wcm/connect/nab/nab/home/business_solutions/1/3/12";
	}
}

function loginMore() {
	if (document.login.cbxLogin.selectedIndex == 0) {
		location = "/Personal_Finance/0,,81203,00.html?ncID=ZBA";
	} else if (document.login.cbxLogin.selectedIndex == 1) {
		location = "/Business_Solutions/0,,91542,00.html";
	} else if (document.login.cbxLogin.selectedIndex == 2) {
		location = "/cgi-bin/nolt/nolt_redirect.pl?id=noltInfo";
	} else if (document.login.cbxLogin.selectedIndex == 3) {
		location = "/Personal_Finance/0,,80937,00.html?ncID=ZBA";
	} else if (document.login.cbxLogin.selectedIndex == 4) {
		location = "/wps/wcm/connect/nab/nab/home/business_solutions/1/3/12";
	}
}

function loginGoHP() {
	if (document.login.cbxLogin.selectedIndex == 0) {
		openIBWindow("/cgi-bin/ib/301_start.pl","ib");
//		ibRedirect();
	} else if (document.login.cbxLogin.selectedIndex == 1) {
		openNCWindow("http://www.nab.com.au/cgi-bin/nabconnect/nc_start.pl","nabconnect")
	} else if (document.login.cbxLogin.selectedIndex == 2) {
		location = "/cgi-bin/nolt/nolt_redirect.pl?id=online_trading_header";
	} else if (document.login.cbxLogin.selectedIndex == 3) {
		location = "https://marginlending.nab.com.au/Public/login.asp";
	} else if (document.login.cbxLogin.selectedIndex == 4) {
		setLastLoginCookieValue(4);
		openNCWindow("https://transact.nab.com.au/nablogin/index.jsp","nab_transact");
	}
}

function loginGo() {
	if (document.login.cbxLogin.selectedIndex == 0) {
		setLastLoginCookieValue(0);
		openIBWindow("/cgi-bin/ib/301_start.pl","ib");
	} else if (document.login.cbxLogin.selectedIndex == 1) {
		setLastLoginCookieValue(1);
		openNCWindow("http://www.nab.com.au/cgi-bin/nabconnect/nc_start.pl","nabconnect")
	} else if (document.login.cbxLogin.selectedIndex == 2) {
		setLastLoginCookieValue(2);
		location = "/cgi-bin/nolt/nolt_redirect.pl?id=online_trading_header";
	} else if (document.login.cbxLogin.selectedIndex == 3) {
		setLastLoginCookieValue(3);
		location = "https://marginlending.nab.com.au/Public/login.asp";
	} else if (document.login.cbxLogin.selectedIndex == 4) {
		setLastLoginCookieValue(4);
		openNCWindow("https://transact.nab.com.au/nablogin/index.jsp","nab_transact");
	}
}

function setLastLoginCookieValue(selection) {
	var exp = new Date();
	var currDate = exp.getTime();
	var newExpDate = currDate + (182 * 24 * 60 * 60 * 1000);
	exp.setTime(newExpDate);
	document.cookie = "lastLogin=" + selection + "; expires=" + exp.toGMTString() + "; path=/";
}

function showLastLogin() {
	var nameEq = "lastLogin=";
	var lastLoginValue = 0;
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++){
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEq) == 0) lastLoginValue = c.substring(nameEq.length,c.length);
	}
	document.login.cbxLogin.selectedIndex = lastLoginValue;
	changeMsg();
}

function getIBWSizeCookieValue() {
	var nameEq = "ibWSize=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++){
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEq) == 0) return c.substring(nameEq.length,c.length);
	}
	return null;
}

function setIBWSizeCookieValue() {
	var ibWinSize = "";
	var exp = new Date();
	var currDate = exp.getTime();
	var newExpDate = currDate + (182 * 24 * 60 * 60 * 1000);
	exp.setTime(newExpDate);

	var winX = (document.all)?window.screenLeft:window.screenX;
	var winY = (document.all)?window.screenTop:window.screenY;

	var myWidth = 0, myHeight = 0;
	if( typeof( window.outerHeight ) == 'number' ) {
		//Non-IE
		myWidth = window.outerWidth;
		myHeight = window.outerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth + 15;
		myHeight = document.body.clientHeight;
		
	}
	
	ibWinSize = myWidth +"x"+myHeight+"s"+winX+"x"+winY;
	document.cookie = "ibWSize=" + ibWinSize + "; expires=" + exp.toGMTString() + "; path=/";
}
