<!----------------------------->
<!-- RELOGIO SITE          //-->
<!----------------------------->
 function showTimer() {
  var time=new Date();
  var hour=time.getHours();
  var minute=time.getMinutes();
  var second=time.getSeconds();
  if(hour<10)   hour  ="0"+hour;
  if(minute<10) minute="0"+minute;
  if(second<10) second="0"+second;
  var st=hour+":"+minute;
  document.getElementById("timer").innerHTML=st; 
 }
 function initTimer() {
  // O metodo nativo setInterval executa uma determinada funcao em um determinado tempo  
  setInterval(showTimer,1000);
 }
<!----------------------------->
<!----------------------------->
<!----------------------------->


 
<!----------------------------->
<!-- VALIDA BUSCA GOOGLE   //-->
<!----------------------------->

function valida_busca() {
if (document.busca_google.q.value.length == 0) {
alert('Por favor, digite o que deseja buscar...');
document.busca_google.q.focus();
return false;
}

}
<!----------------------------->
<!----------------------------->
<!----------------------------->


<!----------------------------->
<!-- LINK FAVORITOS        //-->
<!----------------------------->
var URLSite = window.location.href;
var TituloSite = document.title;
function addfav(){
if (document.all) window.external.AddFavorite(URLSite,TituloSite);
}
<!----------------------------->
<!----------------------------->
<!----------------------------->





<!----------------------------->
<!-- ABRIR POPUP NO CENTRO //-->
<!----------------------------->
function abrir_popup(theURL,winName,width,height,features) { 
    var window_width = width;
    var window_height = height;
    var newfeatures= features;
    var window_top = (screen.height-window_height)/2;
    var window_left = (screen.width-window_width)/2;
    newWindow=window.open(''+ theURL + '',''+ winName + '','width=' + window_width + ',height=' + window_height + ',top=' + window_top + ',left=' + window_left + ',' + newfeatures + '');
    newWindow.focus();
}
<!----------------------------->
<!----------------------------->
<!----------------------------->


<!------------------------------>
<!-- VALIDA FORM DE CONTATO //-->
<!------------------------------>
function verifica() {
if (document.contato.nome.value.length == 0) {
alert('Por favor, digite seu nome!');
document.contato.nome.focus();
return false;
}
if (document.contato.email.value.length == 0) {
alert('Por favor, preencha seu e-mail!');
document.contato.email.focus();
return false;
}
if (document.contato.email.value.length != 0) {
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.contato.email.value))){
		alert("Por favor, digite seu e-mail corretamente!");
		document.contato.email.focus();
		return false;
		}
}
if (document.contato.ddd.value.length == 0) {
alert('Por favor, digite o DDD de sua cidade!');
document.contato.ddd.focus();
return false;
}
if (document.contato.telefone.value.length == 0) {
alert('Por favor, digite seu telefone!');
document.contato.telefone.focus();
return false;
}
if (document.contato.mensagem.value.length == 0) {
alert('Por favor, digite a mensagem!');
document.contato.mensagem.focus();
return false;
}

}

<!----------------------------->
<!----------------------------->
<!----------------------------->

function validaPromo(frm)
{
	if ((frm.nome.value == '') || (frm.nome.value == 'Nome:'))
	{
		alert('Preencha seu Nome.');
		frm.nome.focus();
		return false;
	} 
	else if ((frm.email.value == '') || (frm.email.value == 'E-Mail:'))
	{
		alert('Preencha o seu E-Mail.');
		frm.email.focus();
		return false;
	}
	else if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(frm.email.value))) 
	{
		alert('Preencha seu E-Mail Corretamente.');
		frm.email.focus();
		return false;
	} 
	else if ((frm.nome_amigo_1.value == '') || (frm.nome_amigo_1.value == 'Nome:'))
	{
		alert('Preencha o Nome do seu Amigo 1.');
		frm.nome_amigo_1.focus();
		return false;
	} 
	else if ((frm.email_amigo_1.value == '') || (frm.email_amigo_1.value == 'E-Mail:'))
	{
		alert('Preencha o E-Mail do seu Amigo 1.');
		frm.email_amigo_1.focus();
		return false;
	}
	else if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(frm.email_amigo_1.value))) 
	{
		alert('Preencha o E-Mail do seu Amigo Corretamente 1.');
		frm.email_amigo_1.focus();
		return false;
	} 
	else if ((frm.nome_amigo_2.value == '') || (frm.nome_amigo_2.value == 'Nome:'))
	{
		alert('Preencha o Nome do seu Amigo 2.');
		frm.nome_amigo_2.focus();
		return false;
	} 
	else if ((frm.email_amigo_2.value == '') || (frm.email_amigo_2.value == 'E-Mail:'))
	{
		alert('Preencha o E-Mail do seu Amigo 2.');
		frm.email_amigo_2.focus();
		return false;
	}
	else if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(frm.email_amigo_2.value))) 
	{
		alert('Preencha o E-Mail do seu Amigo Corretamente 2.');
		frm.email_amigo_2.focus();
		return false;
	}
	else if ((frm.nome_amigo_3.value == '') || (frm.nome_amigo_3.value == 'Nome:'))
	{
		alert('Preencha o Nome do seu Amigo 3.');
		frm.nome_amigo_3.focus();
		return false;
	} 
	else if ((frm.email_amigo_3.value == '') || (frm.email_amigo_3.value == 'E-Mail:'))
	{
		alert('Preencha o E-Mail do seu Amigo 3.');
		frm.email_amigo_3.focus();
		return false;
	}
	else if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(frm.email_amigo_3.value))) 
	{
		alert('Preencha o E-Mail do seu Amigo Corretamente 3.');
		frm.email_amigo_3.focus();
		return false;
	} 

	else if ((frm.email_amigo_1.value == frm.email_amigo_2.value) || (frm.email_amigo_1.value == frm.email_amigo_3.value) || (frm.email_amigo_2.value == frm.email_amigo_3.value) || (frm.email_amigo_1.value == frm.email.value) || (frm.email_amigo_2.value == frm.email.value) || (frm.email_amigo_3.value == frm.email.value))
	{
		alert('Utilize apenas e-mails diferentes.');
		frm.email_amigo_1.focus();
		return false;
	}		
	else 
	{
		return true;
	}
}