function listAllLinks( strSrc,blnClickable,optAtt ) {
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
// listAllLinks function
// author: T. Kang
// contact: txkang@hotmail.com
// Extract every link in string and list them in order.
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
var arrAllLinks
if ( !blnClickable ) {
arrAllLinks = strSrc.match(/(https:\/\/|http:\/\/|ftp:\/\/|www.)([^\s]*)/gi );
return arrAllLinks.join( ',' );
}
else {
arrAllLinks = strSrc.match(/(https:\/\/|http:\/\/|ftp:\/\/|www.)([^\s]*)/gi );
return arrAllLinks.join( ',' ).replace( /(https:\/\/|http:\/\/|ftp:\/\/|www.)([^,]*)/gi,
'<a href=http://$2 ' + optAtt + '>$1$2</a>' );
}
}