
  function Trim(value)
    {
	    try
	    {
		    return value.replace(/(^\s+)|(\s+$)/g,"");
	    }
	    catch(e) 
	    {
		    return value;
	    }
    }
    function chgCondition(value)
    {
	    try
	    {
		    return value.replace(/&/g,"$");
	    }
	    catch(e) 
	    {
		    return value;
	    }
    }
    function check_null(check_obj)
    {
	    var str = '';
	    for(i = 0; i < check_obj.length; i++) 
	    {
		    str = str + ' ';
	    }
	    return (str == check_obj);
    }

function   DrawImage(ImgD){  
        var   flag=false;  
        var   image=new   Image();   
        image.src=ImgD.src;   
        if(image.width>0   &&   image.height>0){   
          flag=true;   
          if(image.width/image.height>=   150/140){   
            if(image.width>150){       
            ImgD.width=150;   
            ImgD.height=(image.height*150)/image.width;   
            }else{   
            ImgD.width=image.width;       
            ImgD.height=image.height;   
            }   
            }   
          else{   
            if(image.height>140){       
            ImgD.height=140;   
            ImgD.width=(image.width*140)/image.height;             
            }else{   
            ImgD.width=image.width;       
            ImgD.height=image.height;   
            }   
            }   
          }   
  } 
   function   DrawImage2(ImgD){  
        var   flag=false;  
        var   image=new   Image();   
        image.src=ImgD.src;   
        if(image.width>0   &&   image.height>0){   
          flag=true;   
          if(image.width/image.height>=   120/130){   
            if(image.width>120){       
            ImgD.width=120;   
            ImgD.height=(image.height*120)/image.width;   
            }else{   
            ImgD.width=image.width;       
            ImgD.height=image.height;   
            }   
            }   
          else{   
            if(image.height>130){       
            ImgD.height=130;   
            ImgD.width=(image.width*130)/image.height;             
            }else{   
            ImgD.width=image.width;       
            ImgD.height=image.height;   
            }   
            }   
          }   
  } 
  