(function() {
	if (true || !/fbIE6Shown=.+/.test(document.cookie)) {  // true so it will always show from the demo page example
		var language = fb.language,
			match;
		// look for a language request on the querystring
		if ((match = /ie6eol\.js\?.*language=(\w\w)/.exec(document.getElementsByTagName('head')[0].innerHTML))) {
			language = match[1];
		}
		// browser choice page has only the following language versions
		var choiceLang = /bg|cs|da|de|el|es|et|fi|fr|hr|hu|it|nl|pl|pt|ro|sk|sl|sv/.test(language) ? language : 'en',
			choicePath = 'http://www.browserchoice.eu/BrowserChoice/browserchoice_' + choiceLang + '.htm',
			choiceHeight = /bg|de|el/.test(language) ? 456 : 420;
		// direct load html and use a javascript object for the options parameter
		fb.start(
			'<div style="padding:10px 20px 0 20px; color:black;">' +
			'<span style="font-size:20px; font-weight:bold;">Internet Explorer 6 - End of Life<br /></span>' +
			'<span>We notice that you are using Internet Explorer version 6.0. ' +
			'Please be advised that this site and many others will have reduced functionality under this very old browser. ' +
			'There are also security risks involved in continuing to use IE6. ' +
			'To make your browsing experience safer and better, and to help web site developers everywhere, ' +
			'please replace your browser with one of the choices available below. ' +
			'</span></div>' +
			'<iframe src="' + choicePath + '" width="816" height="' + choiceHeight + '" frameborder="0" scrolling="no">' +
			'</iframe>',
			{ width:816, enableDragResize:false, controlsPos:'tr', backgroundColor:'#DAF3FD', graphicsType:'international',
				caption: '<input type="checkbox" id="fbIE6check" />' +
				'<span id="fbIE6noshow">Do not show this again (not operative in this example)</span>',
				// translate the content and caption
				// and set session cookie when the box is up
				afterItemStart: function() {
					if (language !== 'en') fb.translate(null, language);
					document.cookie = 'fbIE6Shown=true; path=/';
				},
				// if the checkbox is checked, set permanent cookie on box exit
				beforeItemEnd: function() {
					if (fb$('fbIE6check').checked) {
						var date = new Date;
						date.setTime(date.getTime() + 75*24*60*60*1000);  // 75 days in msecs
						document.cookie = 'fbIE6Shown=true; expires=' + date.toGMTString() + '; path=/';
					}
				}
			}
		);
	}
})();
