function chng(x) {
if(x==0) valact()
}
//function exswap()
//{
	//return
//}
function cons(xx) { botonpres=xx.value }
function insert(rrow)
{
row=nhd+nrd*ncd+rrow*(ncd+1)
rw=(document.entreform.elements[row].value)-1
if(document.entreform.elements[row+1].value !="")
if(document.entreform.elements[nhd+(nrd-1)*ncd].value=="")
{
	swapin()
	for(i=nrd-1;i>rw;i--) for (j=0;j<ncd;j++)
	document.entreform.elements[nhd+i*ncd+j].value=document.entreform.elements[nhd+i*ncd+j-ncd].value
	for (j=0;j<ncd;j++) document.entreform.elements[nhd+i*ncd+j].value=""
	swapout()
}
else alert ("NO PERMITE NUEVA INSERCION")
else
{
	swapin()
	for(i=rw; i<nrd-1;i++) for (j=0;j<ncd;j++)
	document.entreform.elements[nhd+i*ncd+j].value=document.entreform.elements[nhd+i*ncd+j+ncd].value
	for (j=0;j<ncd;j++)
	document.entreform.elements[nhd+i*ncd+j].value=""
	swapout()
}
}
function clearform()
{
lreg=nhd+nrd*ncd+lin*(ncd+1)
for (i=0;i<lreg;i++)
{
	document.entreform.elements[i].value=""
	if(document.entreform.elements[i].type=="checkbox")
		document.entreform.elements[i].checked=false
}
document.entreform.elements[i++].disabled=false
document.entreform.elements[i++].disabled=false
document.entreform.elements[0].readOnly=false
tp=0
for (j=i;j< document.entreform.elements.length;j++)
if(document.entreform.elements[j].type=="text") document.entreform.elements[j].value=""
swapout()
}
mynew=window.opener.document.wrkorform.elements.wrkorH14.value
ret="\n"
b=mynew.split("|")
	document.entreform.elements[0].value=b[0]
	d=b[1]
	c=d.split("{")
	for (j=0;j<c.length;j++) document.entreform.elements[1].value=document.entreform.elements[1].value+c[j]+ret
	document.entreform.elements[2].value=b[2]
	document.entreform.elements[3].value=b[3]
	document.entreform.elements[4].value=b[4]
function closeform()
{
xx=document.entreform.length -2
mynew=document.entreform.elements[0].value+"|"
d=document.entreform.elements[1].value
c=d.split(ret)
for (j=0;j<c.length;j++) if(c[j]!="") mynew=mynew+c[j]+"{"
mynew=mynew+"|"+document.entreform.elements[2].value+"|"
mynew=mynew+document.entreform.elements[3].value+"|"
mynew=mynew+document.entreform.elements[4].value+"|"
window.opener.document.wrkorform.elements[14].value=mynew
self.close()
}

