function toggle(btn, id)
{
	if(btn.title == 'Show comments')
	{
		btn.title = 'Hide comments';
		btn.innerHTML = 'Hide comments';
		document.getElementById(id).style.display = "block";
	}
	else
	{
		btn.title = 'Show comments';
		btn.innerHTML = 'Show comments';
		document.getElementById(id).style.display = "none";
	}
}

/* Random comment generator */
var comments = new Array(0);	
comments[0] = 'Wow, (zero)seven you are my hero. ';
comments[1] = 'Yet more wise words from my favourite web company. ';
comments[2] = 'When I think of something that is awesome, it reminds me of (zero)seven. ';
comments[3] = 'Brilliant. Just Brilliant. ';
comments[4] = 'Can I suggest renaming your company to (zero) awesome seven. ';

var ptStatus = 0;
var ptText = comments[Math.floor(Math.random()*5)];
var predictiveText = new Array(0);
predictiveText = ptText.split('');

function randomComment()
{
	document.getElementById("comments").value = "";
	document.getElementById("comments").value = comments[Math.floor(Math.random()*5)];
}
function generateComment()
{	
	if(ptStatus == predictiveText.length)
	{
		document.getElementById("comments").value = '';
		ptText = comments[Math.floor(Math.random()*5)];
		predictiveText = ptText.split('');
		ptStatus = 0;
	}
	else
	{
		document.getElementById("comments").value = document.getElementById("comments").value + predictiveText[ptStatus];
		ptStatus++;
	}
}