function solonumeros(cadena, obj,texto,e){ 
var unavez
var charCode
opc = false; 
 cad=texto
 decimal=cad.indexOf(',','') 
 if (decimal == -1 )
 if (texto.length >= 1 ){
 unavez2 = "no"}
 else{
  unavez2 = "si"}
else
  unavez2 = "si"
 
 if (navigator.appName == "Netscape"){
 charCode = e.which // leo la tecla que ingreso
  if ((charCode > 47 && charCode < 58) || charCode==8 || charCode==0) opc = true;
   if(opc == false)  e.preventDefault();
 }
 else{
 charCode = e.keyCode // leo la tecla que ingreso
 if (charCode > 47 && charCode < 58) opc = true; 
 if(opc == false) 	 event.returnValue = false; 
   } 
}


function solonumerosdecimales(cadena, obj,texto,e){ 
var unavez
var charCode
var ult
opc = false; 
cad=texto
decimal=cad.indexOf(',','') 

 if (decimal == -1 )
 	if (texto.length >= 1 ){
 	unavez2 = "no"}
 	else{unavez2 = "si"}
 else{
  unavez2 = "si"
  ult= (texto.length - decimal);
 }

 if (navigator.appName == "Netscape"){
	   charCode = e.which // leo la tecla que ingreso
  if ((charCode > 47 && charCode < 58) || charCode==8 || charCode==0) opc = true;
  if(charCode == 44  && unavez2 == 'no') opc = true; 
  if(charCode == 46 && ult != 44 && ult != 46 && unavez == 'no') opc = true;
  if (ult > 2 && charCode!=8) opc = false; 
  if(opc == false)  e.preventDefault();
 }
 else{
 charCode = e.keyCode // leo la tecla que ingreso

  if ((charCode > 47 && charCode < 58) || charCode==8 || charCode==0) opc = true;
  if(charCode == 44  && unavez2 == 'no') opc = true;
  if (ult > 2 && charCode!=8) opc = false; 
if(opc == false) 	 event.returnValue = false; 
   } 
}

 
  
   
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function MM_openBrWindow(theURL,winName,features) { //v2.0
  ventana=window.open(theURL,winName,features);
  ventana.focus();
}
function ninguna(ima)
{
 if (ima ==1)
   {
		 document.form.imagen.value = "sinfoto.gif"
	     document.form.img.src = "imagenes/sinfoto.gif"
		 }
	if (ima ==2){
	     document.form.imagenamp.value = "sinfoto.gif"
	     document.form.img2.src = "imagenes/sinfoto.gif"
		 }
		
}
function ninguna2(ima)
{
 if (ima ==1)
   {
		 document.form.archivo.value = "sinarchivo.gif"
	     document.form.img2.src = "archivos/sinarchivo.gif"
		 document.form.archivooriginal.value = ""
		 }
	
		
}
function ninguna3(ima)
{
 if (ima ==1)
   {
		 document.form.imagen.value = "sinfoto.gif"
	     document.form.img.src = "imagenesprod/sinfoto.gif"
		 }
	if (ima ==2){
	document.form.imagenamp.value = "sinfoto.gif"
	     document.form.img2.src = "imagenesprod/sinfoto.gif"
		 }
		
}
