function linkf(zx) {

x=document.getElementById("newform")
for (i=1413; i< 1563; i++) if(zx.name==x.elements[i].name) z=i

p=document.newform.elements[z]
r=document.newform.elements[z+1]
		dlist=r.name
		dl=document.getElementById(dlist)
		if (dl.options.length) for (k=dl.options.length-1;k>=0;k--) dl.options[k].remove()
		r.value=""
		//dl.options.length=0 
//alert (z+1+" r.name="+r.name+" type="+r.type+" datalist="+r.name)
for (j in li) if(j==p.value)
	{
	//	var dlist = document.createElement("datalist")
		for (k=0;k<li[j]+0;k++)
		{
				var option = document.createElement("option")
				option.value=optv[j+""+k]
				dl.appendChild(option)
		}
	}
}
