/*****Make Urls clickable in JS*****/
function prepareHtml(s)
{
if(!s) return '';
// make URLs clickable
s = s.replace(/(^|s|>)(www.([w#$%&~/.-+;:=,?[]@]+?))(,|.|:|)?(?=s|"|<|>|"|<|>|$)/gi, '$1<a href="http://$2" target="_blank">$2</a>$4');
return s.replace(/(^|s|>)((?:http|https|ftp)://([w#$%&~/.-+;:=,?[]@]+?))(,|.|:|)?(?=s|"|<|>|"|<|>|$)/ig, '$1<a href="$2" target="_blank">$2</a>$4');
};