ts = new Array(
	"p1.gif",
	"p1.gif",
	"p1.gif",
	"p1.gif",
	"p1.gif",
	"p1.gif",
	"p2.gif",
	"p2.gif",
	"p2.gif",
	"p2.gif",
	"p3.gif",
	"p3.gif",
	"p3.gif",
	"p4.gif",
	"p4.gif",
	"p5.gif")
	
dots = 0
olddots = -1

function init() {
	if(document.layers) {
		document.f.text.onkeyup = count
		document.f.n.onkeyup = namecheck
		count()
	}
	if(document.all) {
		if(navigator.userAgent.indexOf("Mac")>-1) {
			setInterval("count()",200)
		} else {
			document.f.text.onkeyup = count
			document.f.n.onkeyup = namecheck
			count()
		}
	}
}
function namecheck() {
	if(document.f.text.value.length>0) {
		if(document.f.n.value.length==0) {
			if(document.an.src!="/img/blinkpfeil.gif") document.an.src="/img/blinkpfeil.gif"
		} else {
			if(document.an.src!="/img/0.gif") document.an.src="/img/0.gif"
		}
	} else { 
		document.an.src="/img/0.gif"
	}
}
function count() {
	chars = document.f.text.value.length
	
	if(chars==0) dots = 0
	if(chars>0) dots = 1
	if(chars>16) dots = 2
	if(chars>48) dots = 3
	if(chars>96) dots = 4
	if(chars>150) dots = 5
	if(chars>250) dots = 6
	if(chars>400) dots = 7
	if(chars>450) dots = 8
	if(chars>600) dots = 9
	if(chars>800) dots = 10
	if(chars>1000) dots = 11
	if(chars>1300) dots = 12
	if(chars>1600) dots = 13
	if(chars>2000) dots = 14
	if(chars>2500) dots = 15
	if(chars>4096) dots = 16
	
	if(dots!=olddots) {
		for(i=0;i<dots;i++)	eval("document.t"+i+".src = '/img/'+ts[i]")
		for(i=dots;i<16;i++) eval("document.t"+i+".src = '/img/p0.gif'")
		olddots = dots;
	}
	namecheck()
}

