<byondprompt name="alert">
<style type="text/css">
.byond_prompt {
	padding: 10px;
	text-align: center;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	-o-user-select: none;
	user-select: none;
}
.byond_prompt_title {
	text-align: center;
	font-size: 1.25em;
	font-weight: bold;
	margin: 0 0 10px 0;
}
.byond_prompt_help {
	display: table;
	text-align: left;
	max-width: 100%;
	margin: 0 auto 10px auto;
}
.byond_prompt_button {
	display: inline-block;
	min-width: 5em;
	margin: 0 20px;
	padding: 5px 0;
	text-align: center;
	border-width: 1px;
	border-style: solid;
	font-weight: bold;
	cursor: pointer;
}
.byond_prompt_buttons {
	text-align: center;
	margin-top: 20px;
}
</style>
<script type="text/javascript">
{
	fn: {
		fill: function() {
			var e=this.elem,ui=this.ui,p=this.params,c=p.choices,i,cn,bt,b,bn,d,l;
			if(!c||!c.length) c=p.choices=['OK'];
			(ui.title||{}).innerHTML=byond.htmlEncode(p.title);
			(ui.help||{}).innerHTML=byond.htmlEncode(p.help);
			cn=c.length;
			if(bt=ui.button) {
				for(i=0;i<cn;++i) {
					ui['button'+(i+1)]=b=bt.cloneNode(true);
					bt.parentNode.insertBefore(b,bt);
					b.innerHTML=byond.htmlEncode(c[i]);
					b.addEventListener('click',this.reply.bind(this,c[i]));
				}
				bt.parentNode.removeChild(bt);
			}
			e.className=e.className+' buttons'+cn;
		},
		keyEvent: function(e) {
			if(e.type != 'keydown') {byond.event.end(e); return true;}
			if(e.keyCode==10 || e.keyCode==13) {
				var p=this.params;
				if(p.defaultChoice) this.reply(p.defaultChoice);
			}
			byond.event.end(e);
			return true;
		},
		onclickoff: function(){
			var p=this.params,c=p.choices;
			if(!c) this.cancel();
			else if((c.length||1)<2) this.reply(c[1]);
			return true;
		}
	}
}
</script>
<div class=byond_prompt_title id=title></div>
<div class=byond_prompt_help id=help></div>
<div class=byond_prompt_buttons>
	<div class="byond_prompt_button byond_buttonbk" id=button></div>
	<div style="clear:both"></div>
</div>
</byondprompt>