
			function Trim(TRIM_VALUE)
			{
			if(TRIM_VALUE.length < 1)
			{
			return"";
			}
			TRIM_VALUE = RTrim(TRIM_VALUE);
			TRIM_VALUE = LTrim(TRIM_VALUE);
			if(TRIM_VALUE=="")
			{
			return "";
			}
			else
			{
			return TRIM_VALUE;
			}
			} //End Function
			///////////////////////////////////////////////////

			function RTrim(VALUE)
			{
			var w_space = String.fromCharCode(32);
			var v_length = VALUE.length;
			var strTemp = "";
			if(v_length < 0)
			{
			return"";
			}
			var iTemp = v_length -1;

			while(iTemp > -1)
			{
			if(VALUE.charAt(iTemp) == w_space)
			{
			}
			else
			{
			strTemp = VALUE.substring(0,iTemp +1);
			break;
			}
			iTemp = iTemp-1;

			} //End While
			return strTemp;

			} //End Function
			////////////////////////////////////////////////

			function LTrim(VALUE)
			{
			var w_space = String.fromCharCode(32);
			if(v_length < 1){
			return"";
			}
			var v_length = VALUE.length;
			var strTemp = "";

			var iTemp = 0;

			while(iTemp < v_length)
			{
			if(VALUE.charAt(iTemp) == w_space)
			{
			}
			else
			{
			strTemp = VALUE.substring(iTemp,v_length);
			break;
			}
			iTemp = iTemp + 1;
			} //End While
			return strTemp;
			} //End Function
			/////////////////////////////////
			function validempty(instr)
			{
			var len=instr.length;
			var ch,count=0;
			for(var i=0;i< len;i++)
			{
				ch=instr.charAt(i);
				if(ch==" ")
				{
					count++;
				}
			}	
	
			if(len==count)
			{
				return true;
			}
		}
		
		
 function CheckdecimalKeyInfo( e ,object)
    {
    e = e || window.event;
    ch = e.which || e.keyCode;
    if(ch != null)
    {

        if((ch >= 48 && ch <= 57)|| (ch == 8)|| (ch == 46) )
        {
        	var aa=object.value;
	    	var len=aa.length;
		    var kk=0;
	    	var charval;
	    	
	    	for(i=1;i<len+1;i++)
		    {
		         charval=aa.charAt(i-1);
			    if(charval==".")
			    {
			    kk=i;
			    }
			    if(kk>0)
			    {
			        if(ch == 46)
			        {
			        return false;
			        }
			    }
		   }
        return true;
        }
        else
        {
        return false;
        }
    }
    else
    {
    return false;
    }
   }