How to create the "More" link button to display rest of the text

hi, just want to ask the javascript code can don’t use jquery like pure javascript…cause i need to hide long text and show a shorter version …so i have the below cause…what code should i add to count the text so that the extra words are hide and a show more link is presented to user.
function ShowHide(divId)
{
if(document.getElementById(divId).style.display == ‘none’)
{document.getElementById(divId).style.display=‘block’;}
else{document.getElementById(divId).style.display = ‘none’;}
}
</script>
i need something like what you comment in your second comment but i cannot use jquery