<!--------------- Mudança de cores no menu ----------------->
  function mOvr(src,clrOver,strTxt) {
    if (!src.contains(event.fromElement)) {
	  src.bgColor = clrOver;
	  window.status=strTxt;
	}
  }
  function mOut(src,clrIn) {
	if (!src.contains(event.toElement)) {
	  src.style.cursor = 'default';
	  src.bgColor = clrIn;
	  window.status='euclidesdacunha.com - O Portal da Cidade';
	}
  }

<!--------------- Checa os dados da busca ----------------->
function CheckFormTopo () {

	//Check for a word to search
	if (document.frmSiteSearchTopo.search.value==""){
		alert("Por favor, digite uma palavra para a busca.");
		document.frmSiteSearchTopo.search.focus();
		return false;
	}
	
	return true
}


<!------------------------ Pop-up ---------------------->
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


<!-------------------- Redirecionador -------------------->
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}


<!----------------- Pop-up Centralizado ------------------->
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+''
win = window.open(mypage,myname,settings)
if(win.window.focus){win.window.focus();}
}


<!------------------ Barra de Status ---------------------->
function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}
MM_displayStatusMsg('euclidesdacunha.com - O Portal da Cidade')

<!----------- Conta Caracteres no input nick -------------->
function ContaCarac () {

	if (document.batepapo.nick.value.length < 3){
		alert("Seu nick deve ter de 3 a 11 caracteres.");
		document.batepapo.nick.focus();
		return false;
	}
	
	return true
}

<!----------- Mostra e Esconde Popup interna -------------->
function AchaObjeto(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=AchaObjeto(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MostraEsconde() { //v6.0
  var i,p,v,obj,args=MostraEsconde.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=AchaObjeto(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='Mostra')?'visible':(v=='Esconde')?'hidden':v; }
    obj.visibility=v; }
}


<!----------- Componente Adiciona Flash -------------->
function addFlash(file,w,h,wmode,menu,scale,bgcolor,vgif){
	if(wmode  == null || wmode == "yes"){
		wmode = "transparent";
	}

	if(menu  == null || menu == "no"){
		menu = "false";
	}

	if(scale  == null || scale == "yes"){
		scale = "noscale";
	}

	if(bgcolor == null || bgcolor == ""){
		bgcolor = "#FFFFFF";
	}

	if(vgif == null || vgif == ""){
		vgif = "gif.gif";
	}

	gif = "<img src=\""+vgif+"\" width=\""+w+"\" height=\""+h+"\">";

	swf = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='"+w+"' height='"+h+"' align='middle'>";
	swf += "	<param name=\"allowScriptAccess\" value=\"sameDomain\"/>";
	swf += "	<param name=\"movie\" value=\""+file+"\" />";
	swf += "	<param name=\"menu\" value='"+menu+"' />";
	swf += "	<param name=\"scale\" value='"+scale+"' />";
	swf += "	<param name='quality' value='high' />";
	swf += "	<param name='wmode' value='"+wmode+"' />";
	swf += "	<param name='bgcolor' value='"+bgcolor+"' />";
	swf += "	<embed src='"+file+"' wmode='"+wmode+"' menu='"+wmode+"' scale='"+scale+"' quality='high' bgcolor='"+bgcolor+"' width='"+w+"' height='"+h+"' align='middle' allowScriptAccess='sameDomain' TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\"></embed>";
	swf += "</object>";

	MM_FlashDispatch(gif, swf, "5.0", false, !MM_FlashUserDemurred(), true)
	//MM_FlashDispatch(swf,gif, "5.0", false, !MM_FlashUserDemurred(), true)


}