// detect content for help
function showDynamicHelp() {
	var cookie = $('content-detect-cookies');
	var jsTips = $$('.content-detect');
	// close down all JS tips
	for(var i=0; i<jsTips.length; i++)
		Element.hide(jsTips[i]);
	
	switch(BrowserDetect.browser) {
		case 'Firefox':
		case 'Netscape':
			if($('title-js-ff')) {
				content =  '<ol><li>In the toolbar, go to ';
				content += (BrowserDetect.OS == 'Mac') ? 'the <i>' + BrowserDetect.browser + '</i> menu > <i>Preferences</i>' : '<i>Tools</i> > <i>Options</i>'
				content += '</li><li>Select the <i>Privacy</i> button</li>';
				content += '<li>Check the <i>Accept Cookies from sites</i> checkbox</li>';
				content += '<li>Click the <i>OK</i> button</li></ol>';
				Element.show('title-js-ff');
				Element.show('js-ff');
			}
			break;
		case 'Explorer':
			if($('title-js-ie')) {
				content =  '<ol><li>Go to <i>Tools</i> > <i>Internet Options</i></li>';
				content += '<li>Select the <i>Privacy</i> tab</li>';
				content += '<li>Under "Settings", move the slider bar to <i>Medium-High</i></li>';
				content += '<li>Click the <i>OK</i> button</li></ol>';
				Element.show('title-js-ie');
				Element.show('js-ie');
			}
			break;
		case 'Safari':
			if($('js-safari')) {
				content =  '<ol><li>In the toolbar, go to ';
				content += (BrowserDetect.OS == 'Mac') ? 'the <i>' + BrowserDetect.browser + '</i> menu' : '<i>Edit</i>'
				content += ' > <i>Preferences</i></li>';
				content += '<li>Select the <i>Security</i> button</li>';
				content += '<li>Under "Accept Cookies" check the option for <i>Only from sites you navigate to</i></li>';
				content += '<li>Click the X button to close the window</li></ol>';
				Element.show('title-js-safari');
				$('js-safari').style.display = 'list-item';
				$('js-safari').style.listStyle = 'none';
				var safariList = $$('#js-safari li')
				for(var i=0; i<safariList.length; i++)
					safariList[i].style.listStyle = 'decimal';
			}
			break;
		case 'Opera':
			if($('title-js-opera')) {
				content =  '<ol><li>In the toolbar, go to <i>Tools</i> > <i>Preferences</i></li>';
				content += '<li>Select the <i>Advanced</i> tab</li>';
				content += '<li>In the left pane, select <i>Cookies</i></li>';
				content += '<li>Check the option for <i>Accept cookies</i></li>';
				content += '<li>Click the <i>OK</i> button</li></ol>';
				Element.show('title-js-opera');
				Element.show('js-opera');
			}
			break;
		default:
			content = '<p>Check the preferences or options in your browser menu and select the option that Allows Cookies.</p>';
	}
	
	if(cookie) {
		new Insertion.Bottom(cookie, '&nbsp;<i>' + BrowserDetect.browser + ' on ' + BrowserDetect.OS + '</i>');
		new Insertion.After(cookie, content);
	}
}