function abre(url,w,h,scr)
{
	window.open(url,'uolblog','width='+w+',height='+h+',directories=0,location=0,menubar=0,resizable=0,scrollbars='+scr+',status=0,toolbar=0,marginleft=0,margintop=0,left=25,top=25');
}
function Checker(fd)
{
	(fd.value.length>2000) ? fd.value=fd.value.substring(0,2000) : document.getElementById('sobra').innerText=(2000-fd.value.length);
}

function enviar()
{
	campo = document.forms['comment'].commentText.value;
	return (checkPhrase(campo,30));
}


function checkPhrase(phrase,chars)
{
	// checkPhrase by Rafael Faria
	lines = phrase.split("\r\n");	
	palavras = "";
	for (k=0,n=0;n<lines.length;n++)
	{
		foo = lines[n].split(" ");
		for (i=0;i<foo.length;i++)
		{
			if (foo[i].length > chars)
			{
			palavras += foo[i] + ", ";
			k++;
			}
		}
	}
	if (phrase.indexOf('\r\n\r\n\r\n\r\n') != -1) {
		alert('Não é possivel continuar.\nNão são aceitos mais do que 4 linhas em branco em um comentário.');
		return false;
	} else 	if (k > 1) {
		alert('Não é possível enviar palavras com mais de ' + chars + ' caracteres.');
		return false;
	} else if (k > 0) {
		alert('Não é possível enviar palavras com mais de ' + chars + ' caracteres.');
		return false;
	} else {
		return true
	}
}