

function encode( strValue )
{
	var strReturnValue;

	if( strValue == "" || strValue == null )	
		return "";

	try
	{
		var strReturnValue = encodeURIComponent( strValue );
		strReturnValue = strReturnValue.replace( /'/g, "%27" );
	}
	catch(e)
	{
		strReturnValue = escape( strValue );
	}
	return strReturnValue;
}
function decode( strValue )
{
	var strReturnValue;	

	if( strValue == "" || strValue == null )	
		return "";
	
	//strValue = strValue.replace( /\%27/g, "'" );
	try
	{
		strReturnValue = decodeURIComponent( strValue );
	}
	catch(e)
	{
		strReturnValue = unescape( strValue );
	}
	return strReturnValue;
}

