//=========================================================================
//=== BEGIN: TRIM WHITE SPACES FROM PARSED STRING						===
//=== ----------------------------------------------------------------- ===
//=== trimspaces(thisvalue)												===
//=== this will trim all white spaces from the left and the right		===
//=== of the parsed string and returns the trimmed string				===
//=========================================================================
	function trimSpaces(thisvalue)
	{
	    var newvalue = "" ;
	    var startpos = 0  ;
	    var endpos   = 0  ;
	    
	    if (thisvalue!="")
	    {
	        for (startposcounter=0;startposcounter<=thisvalue.length-1;startposcounter++)
	        {
	            thischar = thisvalue.charAt(startposcounter)
	            
	            if (thischar!=" ")
	            {
	                startpos = startposcounter ;
	                break ;
	            }
	        }
	        
	        for (endposcounter=thisvalue.length-1;endposcounter>=0;endposcounter--)
	        {
	            thischar = thisvalue.charAt(endposcounter)
	            
	            if (thischar!=" ")
	            {
	                endpos = endposcounter + 1 ;
	                break ;
	            }
	        }
	        
	        newvalue = thisvalue.substring(startpos,endpos) ;
	        return newvalue ;
	    }
	    else
	    {
			return thisvalue
		}
	}
//=========================================================================
//=== END: TRIM WHITE SPACES FROM PARSED STRING							===
//=========================================================================