var count=0
function showNextPosition(){
	count++
	n=document.getElementById('mainNode').cloneNode(true);//alert(n)
	inps=n.getElementsByTagName('INPUT')
	selects=n.getElementsByTagName('SELECT')
	spans=n.getElementsByTagName('SPAN')
	for (i=0;i<inps.length;i++) {
		inps[i].name+=count.toString()
		inps[i].id+=count.toString()
		inps[i].value=''
	}
	for (i=0;i<selects.length;i++) {
		selects[i].name+=count.toString()
		selects[i].id+=count.toString()
	}	
	for (i=0;i<spans.length;i++) {
		if (spans[i].className=='x')
			spans[i].style.display=""
		if (spans[i].className=='pos_num') {
			tr_num=document.getElementById('mainNode').parentNode.getElementsByTagName('TR').length
			spans[i].innerHTML=tr_num-4//5
		}
	}		
	np=document.getElementById('nextposition')
	if(count>10) {
		np.style.display="none"
		return false	
	}
	document.getElementById('anfragetable').insertBefore(n,np)

}

function setMenu() {
		as=document.getElementById('menu').getElementsByTagName('A')
		for (i=0;i<as.length;i++) {
			if (as[i].href.indexOf(cf)>-1) {
				as[i].parentNode.className=as[i].parentNode.className.replace('menuitem','currentitem')
				as[i].removeAttribute('href')
			}
		}
}

function getSelectedIndexFromValue(_value,eltSelectBox) {
	opts=eltSelectBox.options
	for(i=0;i<opts.length;i++) { //alert(opts[i].value+' '+_value)
		if(opts[i].value==_value)
			return i
	}
	return 0
} 

function removeTR(elt) {
	tr=elt.parentNode.parentNode
	tr.parentNode.removeChild(tr,true);

}
