
function Otro_Copy() {
  event.returnValue = false;
  window.clipboardData.setData("Text", texto);
}

function checkboxes() {
	var i=0;
	while (obj_chk=document.getElementById("ind_"+i))
		{
		if (obj_chk.checked)
			return true;
		i++;
		}
	return false;	
}
function checkradios() {
	var i=0;
	while (obj_chk=document.getElementById("prod_"+i))
		{
		if (obj_chk.checked)
			return true;
		i++;
		}
	return false;	
}
function revisa_lista(id_obj)
	{
	var obj_sel = document.getElementById(id_obj);
	var i;
	for (i=0; i<obj_sel.options.length; i++) 
  		{
	    if (obj_sel.options[i].selected && obj_sel.options[i].value>0) 
			return true;      
  		}
	return false;
	}
function check_brep() {
	var mensaje="";
	var accion="";
	if (forma=document.getElementById("form_op"))
		{	
		if(forma.oportunidad_tipo.selectedIndex=='0') 
			{
			mensaje+="\n"+leyenda['m_sel_tipo_op'];
			if (accion=="")
				accion="forma.oportunidad_tipo.focus()";
			}
		/*if (forma.usuarioqn)
			{
			if(forma.usuarioqn.value.length=='0') 	
				{
				mensaje+="\n"+leyenda['m_sel_usuario'];
				if (accion=="")
				accion="forma.usuarioqn.focus()";
				}
			}
		if(forma.passwordqn)
			{
			if(forma.passwordqn.value.length=='0') 	
				{
				mensaje+="\n"+leyenda['m_sel_password'];
				if (accion=="")
				accion="forma.passwordqn.focus()";
				}
			}*/
		if(forma.ventas.selectedIndex=='0') 
			{
			mensaje+="\n"+leyenda['m_sel_fact'];
			if (accion=="")
			accion="forma.ventas.focus()";
			}
		if(forma.producto.value.length=='0') 	
			{
			mensaje+="\n"+leyenda['m_sel_prod'];
			if (accion=="")
			accion="forma.producto.focus()";
			}
		if(!checkboxes()) 
			{
			mensaje+="\n"+leyenda['m_sel_ind'];
			} 
		if(!revisa_lista('pais_deseado')) 
			{
			mensaje+="\n"+leyenda['m_sel_pais'];
			if (accion=="")
			accion="forma.pais_deseado.focus()";
			}
		if (forma.casilla_verif.value.length=='0') 	
			{
			mensaje+="\n"+leyenda['m_sel_img'];
			if (accion=="")
			accion="forma.casilla_verif.focus()";
			}
		if (mensaje!="")
			{
			alert(mensaje);
			if (accion!="")
				eval (accion);
			return false;
			}
		else
			{
			forma.bus_representar.disabled=1; 
			forma.bus_representar_b.disabled=1; 			
			}
		}	
return true; 

}

function check_op_venta()
	{
	var mensaje="";
	var accion="";
	if (forma=document.getElementById("form_op"))
		{
		/*if (forma.usuarioqn)
			{
			if(forma.usuarioqn.value.length=='0') 	
				{
				mensaje+="\n"+leyenda['m_sel_usuario'];
				if (accion=="")
				accion="forma.usuarioqn.focus()";
				}
			}
		if(forma.passwordqn)
			{
			if(forma.passwordqn.value.length=='0') 	
				{
				mensaje+="\n"+leyenda['m_sel_password'];
				if (accion=="")
				accion="forma.passwordqn.focus()";
				}
			}*/
		if(forma.oportunidad_tipo.selectedIndex=='0') 
			{
			mensaje+="\n"+leyenda['m_sel_tipo_prod'];
			if (accion=="")
				accion="forma.oportunidad_tipo.focus()";
			}
		if(forma.tipo_oportunidad.selectedIndex=='0') 
			{
			mensaje+="\n"+leyenda['m_sel_tipo_op_venta'];
			if (accion=="")
				accion="forma.tipo_oportunidad.focus()";
			}
		if(forma.tipo_operacion.selectedIndex=='0') 
			{
			mensaje+="\n"+leyenda['m_sel_tipo_operacion'];
			if (accion=="")
				accion="forma.tipo_operacion.focus()";
			}
		if(forma.producto.value.length=='0') 	
			{
			mensaje+="\n"+leyenda['m_sel_prod_venta'];
			if (accion=="")
			accion="forma.producto.focus()";
			}
		if(forma.categoria_producto.selectedIndex=='0') 
			{
			mensaje+="\n"+leyenda['m_sel_categoria_prod'];
			if (accion=="")
				accion="forma.categoria_producto.focus()";
			}	
		if(forma.grado.selectedIndex=='0') 
			{
			mensaje+="\n"+leyenda['m_sel_grado'];
			if (accion=="")
				accion="forma.grado.focus()";
			}	
		if(forma.especificaciones.value.length=='0') 	
			{
			mensaje+="\n"+leyenda['m_sel_esp'];
			if (accion=="")
			accion="forma.especificaciones.focus()";
			}
		if(forma.aplicacion.value.length=='0') 	
			{
			mensaje+="\n"+leyenda['m_sel_aplic'];
			if (accion=="")
			accion="forma.aplicacion.focus()";
			}
		if(forma.cantidad.value.length=='0') 	
			{
			mensaje+="\n"+leyenda['m_sel_cant'];
			if (accion=="")
			accion="forma.cantidad.focus()";
			}
		if(isNaN(forma.cantidad.value)) 	
			{
			mensaje+="\n"+leyenda['m_sel_cant_num'];
			if (accion=="")
			accion="forma.cantidad.focus()";
			}
		if(forma.unidad.selectedIndex=='0') 
			{
			mensaje+="\n"+leyenda['m_sel_unidad_cant'];
			if (accion=="")
				accion="forma.unidad.focus()";
			}
		if(forma.frecuencia.selectedIndex=='0') 
			{
			mensaje+="\n"+leyenda['m_sel_frec'];
			if (accion=="")
				accion="forma.frecuencia.focus()";
			}
		if(forma.precio.value.length=='0') 	
			{
			mensaje+="\n"+leyenda['m_sel_precio'];
			if (accion=="")
			accion="forma.precio.focus()";
			}	
		if(isNaN(forma.precio.value)) 	
			{
			mensaje+="\n"+leyenda['m_sel_precio_num'];
			if (accion=="")
			accion="forma.precio.focus()";
			}
		if(forma.moneda.selectedIndex=='0') 
			{
			mensaje+="\n"+leyenda['m_sel_moneda'];
			if (accion=="")
				accion="forma.moneda.focus()";
			}
		if(forma.unidad2.selectedIndex=='0') 
			{
			mensaje+="\n"+leyenda['m_sel_unidad_precio'];
			if (accion=="")
				accion="forma.unidad2.focus()";
			}
		
		
		if(!checkradios()) 
			{
			mensaje+="\n"+leyenda['m_sel_cat_prod'];
			}
			
		if(!checkboxes()) 
			{
			mensaje+="\n"+leyenda['m_sel_ind'];
			}	
			
		if (forma.casilla_verif.value.length=='0') 	
			{
			mensaje+="\n"+leyenda['m_sel_img'];
			if (accion=="")
			accion="forma.casilla_verif.focus()";
			}
		
		if (mensaje!="")
			{
			alert(mensaje);
			if (accion!="")
				eval (accion);
			return false;
			}
		else
			{
			forma.oport_pizz.disabled=1; 
			forma.oport_pizz_b.disabled=1; 			
			}
		
	}
	return true; 
	}

function cambia_boton_img()
	{
	if (typeof (form_cambia_img)!="undefined")
		{			
		var bot='<input type="button" onclick="cambia_imagen();"  value="'+form_cambia_img+'" class="bt_cambia_img"/>';
		if (obj_img=document.getElementById("bot_val_img"))
			obj_img.innerHTML=bot;
		}
	}