Well, you could use PHP to ascertain it it was longer than 500 characters and to put the extra text in a variable that you'd then hand to javascript to display if required.
as a rough example:
$someText = "xyz";//where xyz is the result of a database call or whatever
$lenSomeText=strlen($someText);
if($lenSomeText>500){
//this would add another 100 characters - if you want it by words it would be more complex
$extraTextChunk=substr($someText,500,100);
}
Then you'd need a PHP if/then to look see if $extraTextChunk had a value, and if it did then write the javascript you need (my javascript isn't too sharp, so I won't try it) with the variable for the javascript to display being the PHP variable $extraTextChunk
Hope this helps
/s