function typenr(value){
	var typed= document.getElementById('typed')
	var typedfield= document.getElementById('typedfield')
	typedfield.value += value
	if (typedfield.value.length < 21){
		typed.innerHTML= typedfield.value
	}
	else {
		typed.innerHTML= 'Error: number too big'
	}
}

function backspace(){

	var typed= document.getElementById('typed')
	var typedfield= document.getElementById('typedfield')
	var tlen= typedfield.value.length -1
	typedfield.value = typedfield.value.substring(0,tlen)
	typed.innerHTML= typedfield.value
}

function confirmClick() {
	
	if (document.body.className != 'landscape'){
		var posx= this.offsetLeft + 10
		var posy= this.offsetTop + 307
	}
	else {	
		var posx= this.offsetLeft + 317
		var posy= this.offsetTop + 36 
	}
	
	var hl
	if(!hl){
		hl=document.createElement('b')
		setHighlight(hl,posx,posy)
		document.body.appendChild(hl)
				
	} else{
		hl.removeAttribute('style')
		setHighlight(hl,posx,posy)
	}
}

function setHighlight(el,posx,posy){

	el.setAttribute('style','position:absolute;z-index:99999;width:40px;height:40px;top:'+posy+'px;left:'+posx+'px;background:url(img/pushed.png) no-repeat;')
	el.setAttribute('id','highlight')
	setTimeout("removeIt('highlight')",100)
}

function removeIt(id){
	x= document.getElementById(id)
	x.parentNode.removeChild(x)
}