<!--
// proibe especiais
var key = new Array();
key['\''] = "1";
key['/'] = "1";
key['|'] = "1";
key['\\'] = "1";
key['´'] = "1";
key['`'] = "1";
key['¨'] = "1";
key['"'] = "1";
key['~'] = "1";
key['!'] = "1";
key['?'] = "1";
key['#'] = "1";
key['%'] = "1";
key['&'] = "1";
key['*'] = "1";
key['('] = "1";
key[')'] = "1";
key['='] = "1";
key['+'] = "1";
key['{'] = "1";
key['['] = "1";
key['}'] = "1";
key[']'] = "1";
key['^'] = "1";
key['.'] = "1";
key[','] = "1";
key[';'] = "1";
key[':'] = "1";
key['>'] = "1";
key['<'] = "1";
key[' '] = "1";

function getKey(keyStroke) {
	isNetscape=(document.layers);
	eventChooser = (isNetscape) ? keyStroke.which : event.keyCode;
	which = String.fromCharCode(eventChooser).toLowerCase();
	for (var i in key) if (which == i) {
		if (i == " ") {
			if(getcookie("cookie_busca") == "2") alert("\nDICA:\n\nProcurar por mais de uma palavra ou utilizando-se de palavras compostas\nfaz com que fique mais difícil encontrar o que se procura.\n\nPrefira palavras simples.");
			if(getcookie("cookie_busca") != "0") setcookie('cookie_busca', 2);
			else setcookie('cookie_busca', 1);
			return true;
		}
		else {
			alert("Por favor, não use caracteres especiais.");
			return false;
		}
	}
}

function getcookie(cookiename) {
	var cookiestring=""+document.cookie;
	var index1=cookiestring.indexOf(cookiename);
	if (index1==-1 || cookiename=="") return ""; 
	var index2=cookiestring.indexOf(';',index1);
	if (index2==-1) index2=cookiestring.length; 
	return unescape(cookiestring.substring(index1+cookiename.length+1,index2));
}

function setcookie(name,value){
	cookiestring=name+"="+escape(value);
	document.cookie=cookiestring;
	if(!getcookie(name)){
		return false;
	} else {
		return true;
	}
}

document.onkeypress = getKey;
// finaliza proibe especiais
//-->

