function $(sId) {
  return document.getElementById(sId);
}

function showMenu(sId) {
  sId = sId.substr(0, 1).toUpperCase() + sId.substr(1, sId.length);
  $('td' + sId).className = 'tdSubMenuOver';
}

function hideMenu(sId) {
  sId = sId.substr(0, 1).toUpperCase() + sId.substr(1, sId.length);
  $('td' + sId).className = 'tdMenuWidth';
}

function gotoMenu(sId) {
  sId = sId.substr(4);
  sId = sId.substr(0, 1).toLowerCase() + sId.substr(1, sId.length);
	document.location.href = sId + '.php';
}

function setMenu(sId) {
  sId = sId.substr(0, 1).toUpperCase() + sId.substr(1, sId.length);
  $('tdMenu' + sId).className = 'tdSubMenuOver';
	$('menu' + sId).onmouseover = function() {};
	$('menu' + sId).onmouseout  = function() {};
	$('menu' + sId).onclick     = function() {};
	$('menu' + sId).className = '';
}

function validateContato() {
	oNome     = $('sNome');
	oEmail    = $('sEmail');
	oTelefone = $('sTelefone');
	oAssunto  = $('sAssunto');
	oMensagem = $('sMensagem');
	bReturn = false;
	
	if (oNome.value != '' && oEmail.value != '' && oTelefone.value != '' && oAssunto.value != '' && oMensagem.value != '') {
	  bReturn = true;
	} else {
		alert('Todos os campos devem ser preenchidos!');
	}
  return bReturn;	
}

function validateNewsletter() {
	oNome   = $('sNome');
	oEmail  = $('sEmail');
	bReturn = false;
	
	if (oNome.value != '' && oEmail.value != '') {
	  bReturn = true;
	} else {
		alert('Todos os campos devem ser preenchidos!');
	}
  return bReturn;	
}