	  /**
    * DrawImage
    *
    * Version 0.1
    * 2008.8
    *
    * autor:Genshing   mail:genshing@163.com
    *
    * 4Vstudio (http://www.4Vstudio.com)
    * Dual licensed under the MIT and GPL licenses.
    * http://www.opensource.org/licenses/mit-license.php
    * http://www.opensource.org/licenses/gpl-license.php
    * 
    **/
	var width;
	var height;
    $.fn.DrawImage = function(options) {
            return this.each(function(index) {
              var $this = jQuery(this);
        
              var opts = jQuery.extend({
                       width:150,
                       height:150
                   }, options || {}
              );
  
             var flag=false;
           
            if($this.width()>0 && $this.height()>0){
               flag=true;
  
               if($this.width()/$this.height()>= width/height){
                   if($this.width()>width){
                       $this.width(width);
                       $this.height(($this.height()*width)/$this.width());
                   }
               }else{
                   if($this.height()>height){
                       $this.height(height);
                       $this.width(($this.width()*height)/$this.height());
                   }
                   
               }
  
               $this.css("display","inline");
           }
        });
    };
