I got this working, below is the correct code snippet.
<html>
<head>
<script language="JavaScript" type="text/javascript">
var message = " This is the Message to Scroll ";
function scroll() {
message = message.substring(1, message.length) + message.substring(0, 1);
document.title = message;
setTimeout("scroll()", 300);
}
</script>
</head>
<body>
<a href="javascript:scroll()">StartScrolling</a>
</body>
</html>
Thanks