function validNumeric(f) {
if (!/^\d*$/.test(f.value)) {
alert('solo se permiten números en este campo')
f.value = f.value.replace(/[^\d]/g,"");
}
} 

function popuplauncher(documento,ventana,ancho,alto) {
	var x = (screen.width - ancho) / 2 ;
	var y = (screen.height - alto) / 2 ;
	var popup = open(documento, ventana, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+ancho+',height='+alto+',left='+x+',top='+y);
}

function popupform(myform, windowname, ancho, alto) {
	if (! window.focus)return true;
	var x = (screen.width - ancho) / 2 ;
	var y = (screen.height - alto) / 2 ;
	window.open('', windowname, 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+ancho+',height='+alto+',left='+x+',top='+y);
	myform.target=windowname;
	return true;
}


function popUp(strURL,strType,strHeight,strWidth)
{
	var x = (screen.width - strWidth) / 2 ;
	var y = (screen.height - strHeight) / 2 ;
	var strOptions="";
	if (strType=="console") strOptions="resizable,height="+strHeight+",width="+strWidth;
	if (strType=="fixed") strOptions="status,height="+strHeight+",width="+strWidth+",top="+y+",left="+x;
	if (strType=="elastic") strOptions="scrollbars,resizable,status,height="+strHeight+",width="+strWidth+",top="+y+",left="+x;
	//if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth;
	window.open(strURL, 'newWin', strOptions);
}