function marca(){
      document.write("<marquee scrolldelay='120'>");
      document.write("Bem Vindo ao Guia de Itanha&eacute;m Virtual ! Encontre aqui os melhores Estabelecimentos Comerciais de Itanha&eacute;m. Pousadas, Restaurantes, Pizzarias, Imobili&aacute;rias e muito mais ... Anuncie no Guia de Itanha&eacute;m Virtual, o mais completo Guia Virtual do Munic&iacute;pio.");
      document.write("</marquee>");
}
function addFav(){
    var url      = "http://www.guiamongagua.com.br";
    var title    = "GUIA MONGAGUÁ";
    if (window.sidebar) window.sidebar.addPanel(title, url,"");
    else if(window.opera && window.print){
        var mbm = document.createElement('a');
        mbm.setAttribute('rel','sidebar');
        mbm.setAttribute('href',url);
        mbm.setAttribute('title',title);
        mbm.click();
    }
    else if(document.all){window.external.AddFavorite(url, title);}
}
function onlynum(e) {
			var keyNumber = (isIE) ? event.keyCode : e.which;
			if (((keyNumber<48)||(keyNumber>57)) && (keyNumber!=13) && (keyNumber!="0") && (keyNumber!=8)) {
			if (isIE) event.keyCode=0;
			return false;
			}
			}				
function Valida_senha() {
				
			a = document.alteraSenha.novaSenha.value
			b = document.alteraSenha.repeteSenha.value
		
			if (a == "" || b == ""){
			alert ("Preencha os campos de senha")
			document.alteraSenha.novaSenha.value=""
			document.alteraSenha.repeteSenha.value=""
			document.alteraSenha.novaSenha.focus()
			return false}	 
		
			if (a == b){
				return true
				}
				else {		
					alert ("Os campos devem ser iguais !!!")
					document.alteraSenha.novaSenha.value=""
					document.alteraSenha.repeteSenha.value=""
					document.alteraSenha.novaSenha.focus()			
				return false }			
		}		
function volta(){
		history.back(-1);
		}				
function vazio(palavra){
		if (palavra=="" || palavra=="digite sua busca..."){
			alert('Este campo não pode ficar vazio!')
			return false;
			}			
			else{
		return true;}
		}
function escreve_trend(){
 document.write('<!--[if !IE]> -->');
 document.write('<object type="application/x-shockwave-flash" data="images/trend.swf" width="468" height="74">'); 
 document.write('<!-- <![endif]-->'); 
 document.write('<!--[if IE]>'); 
 document.write('<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="468" height="74">'); 
 document.write('<param name="movie" value="images/trend.swf" />'); 
 document.write('<!--><!----> <param name="loop" value="true" /> <param name="menu" value="false" />'); 
 document.write('<p>Aguarde Leitura ! < /p> </object> <!– <![endif]–>');
}
function escreve_amigos(){
 document.write('<!--[if !IE]> -->');
 document.write('<object type="application/x-shockwave-flash" data="images/carinhas.swf" width="550" height="200">'); 
 document.write('<!-- <![endif]-->'); 
 document.write('<!--[if IE]>'); 
 document.write('<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="550" height="200">'); 
 document.write('<param name="movie" value="images/carinhas.swf" />'); 
 document.write('<!--><!----> <param name="loop" value="true" /> <param name="menu" value="false" />'); 
 document.write('<p>Aguarde Leitura ! < /p> </object> <!– <![endif]–>');
}

var limite = 250;
function soma() {	

var mais_um=eval(document.form.resposta.value.length-1);
mais_um++;

	if (document.form.resposta.value.length>limite) 
	{
		document.form.resposta.value='';
		document.form.resposta.value=valor_limite;
		alert("Você deve digitar no máximo "+limite+" caracteres");
	}
	else
	{
		document.form.exibe.value='';
		document.form.exibe.value=eval(mais_um);
		valor_limite=document.form.resposta.value;
		document.form.exibe2.value='';
		document.form.exibe2.value=(limite-mais_um);
	}

document.form.resposta.focus();
}

function mostra_tamanho(){
document.form.exibe2.value=limite;
}
function escreve_topo(){
  document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" style="width: 980px; height: 323px;" />');
    document.write('<param name="movie" value="swf/topo.swf" />');
    document.write('<param name="quality" value="high" />');
	document.write('<param name="wmode" value="transparent" />');
    document.write('<embed wmode="transparent" src="swf/topo.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" style="width: 980px; height: 323px;" /></embed>');
  document.write('</object>');
}
function chama_menu(){
	new Ajax.Updater('sidebar', 'lateral.asp');
}
function chama_index(){
	new Ajax.Updater('index', 'ajax_i.asp');
}
function chama_tel(tel){
	new Ajax.Updater('tels', 'ajax_tels.asp?id_tel=' + tel);
}
