// heavily dependant on lightbox.js, but broken out for readability
function browser_compat(vals)
{
	set_popup_title('Notice: Browser Compatibility');
	var cont = vals.elem,
			close = function(){hide_page_popup(vals.elem)},
			margin = '14px',
			div, a;
	cont.update();

	div = new Element('div').insert('We have determined that you are using the following unsupported browser:');
		div.style.marginBottom = margin;
	cont.insert(div);

	div = new Element('div').insert(vals.browser);
		div.style.textAlign = 'center';
		div.style.color = '#C30000';
		div.style.marginBottom = margin;
	cont.insert(div);

	div = new Element('div').insert('For optimal results, please upgrade your browser by clicking on one of the following:');
		div.style.marginBottom = margin;
	cont.insert(div);

	div = new Element('div');
		div.style.textAlign = 'center';
		div.style.marginBottom = margin;

		a = new Element('a').insert('Internet Explorer');
			a.href = 'http://www.microsoft.com/windows/internet-explorer/';
			a.target = '_blank';
			a.style.marginRight = '4px';
			a.observe('click', close);
		div.insert(a);
		div.insert('| ');

		a = new Element('a').insert('Firefox');
			a.href = 'http://www.getfirefox.com/';
			a.target = '_blank';
			a.style.marginRight = '4px';
			a.observe('click', close);
		div.insert(a);
		div.insert('| ');

		a = new Element('a').insert('Safari');
			a.href = 'http://www.apple.com/safari/download/';
			a.target = '_blank';
			a.observe('click', close);
		div.insert(a);
	cont.insert(div);

	div = new Element('div');
		var inp = new Element('input');
			inp.id = 'cbx_browser_compatibility';
			inp.type = 'checkbox';
			inp.observe('click', function(){browser_compat_scold(cont)});
		div.insert(inp);

		var lbl = new Element('label').insert(' I do not wish to upgrade my browser at this time');
			lbl.htmlFor = inp.id;
		div.insert(lbl);
	cont.insert(div);
}

function browser_compat_scold(cont)
{
	var div;
	cont.update();

	div = new Element('div').insert('You have chosen NOT to upgrade your browser.');
		div.style.marginBottom = '14px';
	cont.insert(div);

	div = new Element('div').insert('Listingbook cannot guarantee that this Web site will function as intended.');
		div.style.marginBottom = '50px';
	cont.insert(div);

	div = new Element('div');
		div.style.textAlign = 'center';
		var a = new Element('a').insert('Close Window');
			a.observe('click', function(){hide_page_popup(cont)});
			a.addClassName('clickable');
		div.insert(a);
	cont.insert(div);
}
