function showWarningWindow(title, question, confirmText, confirmLink, denyText, width, height)
{
	var win;

	var mainEl = document.createElement('div');
	mainEl.className = 'warningContents';
	mainEl.innerHTML = question;

	var noLink = document.createElement('div');
	noLink.className = 'warningNo';
	noLink.onclick = function() {win.close();};
	noLink.innerHTML = denyText;
	mainEl.appendChild(noLink);

	var yesLink = document.createElement('div');
	yesLink.className = 'warningYes';
	yesLink.href = confirmLink;
	yesLink.innerHTML = '<a href="'+confirmLink+'">'+confirmText+'</a>';
	mainEl.appendChild(yesLink);

	win = new Ext.Window({
		  layout:'fit',
		  width:width,
		  height:height,
		  closeAction:'hide',
		  plain: true,
		  contentEl : mainEl,
		  modal:true,
		  title: title,
		  autoScroll: true
	  });
	win.show();
}

function ConfirmCutoffToggle()
{
	var warning = "You are attempting to access older Daydream stories that aren't up to the current"
		+ " standard of quality in both writting and drawing. Due to their complete lack of"
		+ " restriction, they may contain a higher level of material that some could find"
		+ " offensive. Read them at your own risk.";

	showWarningWindow('Are you sure?', warning, "I'm not easily offended, unlock the older stories for me!",
		'?toggleCutoff=1', 'No, thanks!', 500, 250);
}

