	function jqImgResize( imgElemen, nwWidth, nwHeight )
	{
		//////////////////////////////////////////////////////////////////////
		//
		// dependencia de jQuery
		//
		// autor.: WDF
		// fecha.: 20/05/2010
		//
		// parametros.: Todos son obligatorios
		// imgElemen --> tipo string; elemento del DOM
		// nwWidth ----> tipo numerico pixeles; 
		//				 Regla: -1 --> NO usamos este parametro
		//				 Regla: 0  --> NO usamos este parametro
		//				 Regla: Mayor que Cero --> SI usamos este parametro
		// nwHeight ---> tipo numerico pixeles; 
		//				 Regla: -1 --> NO usamos este parametro
		//				 Regla: 0  --> NO usamos este parametro
		//				 Regla: Mayor que Cero --> SI usamos este parametro
		//////////////////////////////////////////////////////////////////////
		
		//evaluamos cumplimiento de reglas
		if( imgElemen == null || imgElemen == '' || imgElemen.length < 3 ){ return false; }
		if( nwWidth + nwHeight == null ){ return false; }
		if( nwWidth + nwHeight < 1 ){ return false; }
		
		//varibles base
		var width		= 0;
		var new_width	= 0;
		var height    	= 0;
		var new_height	= 0;
		var scale 		= 0;
		
		//solo nwWidth
		if( nwWidth > 0 && nwHeight < 1 )
		{
			jQuery( imgElemen ).each(function()
			{
				width	 = jQuery( this ).width();
				new_width= nwWidth; // <-- parametro
				
				if( width > new_width )
				{
					height    = jQuery( this ).height();
					scale     = Math.round( ( new_width * 100 ) / width ); 
					new_height= Math.round( ( height * scale  ) / 100 );
					
					jQuery( this ).css({
						width : new_width  + 'px',
						height: new_height + 'px'
					});
				}
				
				return true;
			});
		}
		
		//solo nwHeight
		if( nwWidth < 1 && nwHeight > 0 )
		{
			jQuery( imgElemen ).each(function()
			{
				height    = jQuery( this ).height();
				new_height= nwHeight; // <-- parametro
				
				if( height > new_height )
				{
					width	 = jQuery( this ).width();
					scale    = Math.round( ( new_height * 100 ) / height ); 
					new_width= Math.round( ( width * scale ) / 100 );
					
					jQuery( this ).css({
						width : new_width  + 'px',
						height: new_height + 'px'
					});
				}
				
				return true;
			});
		}
		
		//ambos nwWidth y nwHeight
		if( nwWidth > 0 && nwHeight > 0 )
		{
			jQuery( imgElemen ).each(function()
			{
				width	  = jQuery( this ).width();
				height    = jQuery( this ).height();
				new_width = nwWidth;  // <-- parametro
				new_height= nwHeight; // <-- parametro
				
				if( width > new_width || height > new_height )
				{
					scale 	  = Math.min(( new_width / width ),( new_height / height ), 1 ); 
					new_width = Math.floor( scale * width  ); 
					new_height= Math.floor( scale * height ); 
					
					jQuery( this ).css({
						width : new_width  + 'px',
						height: new_height + 'px'
					});
					
				}
				
				return true;
			});
		}
		
		return true;
	}
