i=typeof innerWidth == 'number'?innerWidth:640
if(typeof document.getElementById == 'undefined' || i < 241) dom=0
else {
	str=new Object()
	str.add=		'Add new message'
	str.restore=	'Restore'
	str.name=	'Please give a name...'
	str.title=	'Please give your message a title...'
	str.write=	'Please write something or select "Cancel message" to abort'
	str.wait=	'Please wait...'
	str.save=	'Now saving...'
	str.reply=	'No reply'
	str.cancel=	'Cancel message'
	str.retry=	'Submit again!'
	str.send=	'Already sending'
	dom=1
	e=s=0
	old=[]
	elm=[
		'<form class="ed"><input type="submit" value="'+str.add+'" /></form>',
		'<input type="text" size="8" value="Bytes" style="background:#ccc; color:#000; border:0;" />',
		'<input type="button" value="'+str.cancel+'" accesskey="c" />',
		'<input type="button" value="'+str.restore+'" />'
	]
	fud=[
		'<p>[<a href="#fud" onclick="return fudGo()">Display the rest of this post...</a>]</p>',
		'<p style="font:bold 0.8125em sans-serif;margin-top:2em">[<a href="#fud" onclick="return fudGo()">Close again</a>]</p>'
	]
	fud.i=0
	c='@import url(dom);'
	c+='#fud {visibility:hidden;position:absolute;left:9%;width:80%;background:#edc;padding:0 3% 2em;border-style:groove ridge ridge groove;border-width:0.25em;border-color:#fff #555 #555 #fff}#fud h5 {padding-bottom:1em;border-bottom:#000 solid 1px}'
	if(typeof innerWidth == 'number') c+=innerWidth<650?'#msg,table.figs tr{font-size:0.8125em}tr.x span{display:none}':''
	document.writeln('<style type="text/css">'+c+'</style>')
	window.onload=wrapper
}

function wrapper() {
	if(typeof document.getElementById('add') != 'object') return
	tog=document.forms[0]
	app=document.forms[1]
	bag=app.parentNode.style
	fld=app.elements
	tog.onsubmit=msgAdd
	app.onsubmit=but
	app.onreset=ice
	fld[2].onfocus=len
	fld[2].onchange=len
	fld[5].onclick=redd
	fld[7].onclick=fire
	fld[7].style.visibility='hidden'
	tog.style.visibility='visible'
	bag.zIndex=-1
	lnk=document.links[0]
	if(!(em=lnk.style.pixelHeight)) em=lnk.offsetHeight
	fud=document.getElementById('fud')
}

function msgEd() {if(dom && e < elm.length) document.writeln(elm[e]), e++}

function msgAdd() {
	tog.style.visibility='hidden'
	app[str[bag.zIndex=2]]=str.restore
	bag.visibility='visible'
	setTimeout('fld[0].focus()', 1)
	return false
}

function but() {
	while(!fld[0].value || fld[0].value == 'null' || fld[0].value == 'undefined') fld[0].value=prompt(str.name)
	while(!fld[1].value || fld[1].value == 'null' || fld[1].value == 'undefined') fld[1].value=prompt(str.title)
	if(!fld[2].value.length) {
		alert(str.write)
		fld[2].focus()
		return false
	}
	if(s) {
		but.value=str.wait
		but.style.background='#ccc'
		return false
	}
	but=fld[4]
	clr=fld[5]
	but.value=str.save
	but.style.background='#9cf'
	s=1
	setTimeout("fld[3].value=str.reply; clr.value=str.cancel; but.value=str.retry; but.style.background='#fc0'; s=0", 20000)
}

function redd() {
	if(s) {
		clr.value=str.send
		return
	}
	ice()
	bag.visibility='hidden'
	bag.zIndex=-1
	tog.style.visibility='visible'
	scrollBy(0,0)
}

function ice() {
	if(!s) {
		for(i=0; i<3; i++) {
			old[i]=fld[i].value
			fld[i].value=''
		}
		fld[7].style.visibility='visible'
		len()
	}
	return false
}

function fire() {
	if(!s) {
		for(i=0; i<3; i++) fld[i].value=old[i]
		len()
	}
}str[2]='act'

function len() {fld[3].value=fld[2].value.length}

function fudGo() {
	b=document.forms[2].style
	b.visibility=b.visibility!='visible'?'visible':'hidden'
	fud.style.visibility=fud.style.visibility!='visible'?'visible':'hidden'
	return false
}str[2]+='ion'


function fudLnk() {
	if(typeof fud == 'undefined') return
	document.write(fud.i?fud[1]+"\n</div>":fud[0]+"\n<div id=\"fud\">\n"+fud[1])
	fud.i++
}

