var dayarray=new Array("Domingo","Segunda-Feira","Terça-Feira","Quarta-Feira","Quinta-Feira","Sexta-Feira","Sábado")
var montharray=new Array("janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro")

function getthedate()
{
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var hours=mydate.getHours()
var minutes=mydate.getMinutes()
var seconds=mydate.getSeconds()
var dn="AM"
if (hours>=12)
dn="PM"
if (hours>12){
hours=hours-12
}
if (hours==0)
hours=12
if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
//change font size here
//aqui com hora var cdate="<small><font color='#FFFFFF' face='Verdana' size='1'>"+dayarray[day]+", "+daym+" de "+montharray[month]+" de "+year+" - "+hours+":"+minutes+":"+seconds+" "+dn

//var cdate="<small><font face='Verdana' size='1'><strong>"+dayarray[day]+"</strong>, "+daym+" de "+montharray[month]+" de "+year+"   <strong>"+hours+":"+minutes+":"+seconds+"</strong>"+"</font></small>"

var cdate="<small><font face='Verdana' size='1'><strong>"+dayarray[day]+"</strong>, "+daym+" de "+montharray[month]+" de "+year+", <strong>"+hours+":"+minutes+":"+seconds+"</strong>."+"</font></small>"

if (document.all)
document.all.clock.innerHTML=cdate
//document.all.horario.innerHTML=ctime
else if (document.getElementById)
document.getElementById("clock").innerHTML=cdate
//document.getElementById("horario").innerHTML=ctime
else
document.write(cdate)
//document.write(ctime)
}
if (!document.all&&!document.getElementById)
getthedate()
function goforit(){
if (document.all||document.getElementById)
setInterval("getthedate()",1000)
}

function checa_formulario(icqlist){
if (icqlist.nick.value == ""){
alert("Por Favor Coloque Seu Nick !!!");
icqlist.nick.focus();
return (false);
}
if (icqlist.txtEmail.value == ""){
alert("O Campo E-mail está Vazio !!!");
icqlist.txtEmail.focus();
return (false);
}
if (icqlist.txtEmail.value.indexOf('@', 0) == -1){
alert("O E-mail é Ivalido !!!");
icqlist.txtEmail.focus();
return (false);
}
if (icqlist.icq.value == ""){
alert("O campo ICQ Está Vazio !!!");
icqlist.icq.focus();
return (false);
}
var ver_numero = "1234567890";
var sk15 = icqlist.icq.value;
var invalido = true;
for (i = 0;  i < sk15.length;  i++){
ch = sk15.charAt(i);
for (j = 0;  j < ver_numero.length;  j++)
if (ch == ver_numero.charAt(j))
break;
if (j == ver_numero.length){
invalido = false;
break;
}}
if (!invalido){
alert("O Campo ICQ Deve Conter Apenas Números !!!");
icqlist.icq.focus();
return (false);
}
if (icqlist.icq.value.length < 7){
alert("O campo ICQ Deve Ter No Minimo 7 Números !!!")
icqlist.icq.focus();
return (false);
}
if (icqlist.icq.value.length > 10){
alert("O campo ICQ Deve Ter No Maximo 10 Numeros !!!")
icqlist.icq.focus();
return (false);
}
if (icqlist.senha.value == ""){
alert("O campo senha Está Vazio !!!");
icqlist.senha.focus();
return (false);
}
if (icqlist.senha.value.length < 4){
alert("O campo senha Deve Ter No Minimo 4 Números !!!")
icqlist.senha.focus();
return (false);
}
if (icqlist.senha.value.length > 8){
alert("O campo senha Deve Ter No Maximo 8 Números !!!")
icqlist.senha.focus();
return (false);
}
if (icqlist.senha2.value == ""){
alert("O campo Comfirma senha Está Vazio !!!");
icqlist.senha2.focus();
return (false);
}
if (icqlist.senha.value != icqlist.senha2.value){
alert("A Senha do Comfirma Senha é diferenete do 1º Campo !!!");
icqlist.senha2.focus();
return (false);
}
if (icqlist.idade.value == ""){
alert("O campo Idade Está Vazio !!!");
icqlist.idade.focus();
return (false);
}
if (icqlist.idade.value.length > 2){
alert("O campo Idade Deve Ter No Maximo 2 Números !!!")
icqlist.idade.focus();
return (false);
}
var ver_numero = "1234567890";
var sk15 = icqlist.idade.value;
var invalido = true;
for (i = 0;  i < sk15.length;  i++){
ch = sk15.charAt(i);
for (j = 0;  j < ver_numero.length;  j++)
if (ch == ver_numero.charAt(j))
break;
if (j == ver_numero.length){
invalido = false;
break;
}}
if (!invalido){
alert("O Campo Idade Deve Conter Apenas Números !!!");
icqlist.idade.focus();
return (false);
}
if (icqlist.sexo.value == "selecione"){
alert("Por Favor Selecione Um Sexo !!!");
icqlist.sexo.focus();
return (false);
}
if (icqlist.cidade.value == ""){
alert("O campo Cidade Está Vazio !!!");
icqlist.cidade.focus();
return (false);
}
if (icqlist.homepage.value == "http://"){
alert("O campo Home-Page Está Vazio !!!");
icqlist.homepage.focus();
return (false);
}
return (true);
}




function verifica(frm)
	{ 	
	   if (frm.txtNome.value == "")	   
	   		{
				alert("Você deve digitar seu nome!");
				return false
			}
	   if (frm.txtEmail.value == "")	   
	   		{
				alert("Você deve digitar seu e-mail!");
				return false
			}		
		if (VerificaEmailAcesso(frm.txtEmail.value))
		{
			return false;
		}
		return true;
			
	}
	
	
	
	function VerificaEmailAcesso(em_um)//Objetos)
	{
		situacao = true;
		if (em_um != "")
		{
			if (ValidaEmail(em_um) == false)
				situacao = false;
		}
		else
			situacao = true;
		if(!situacao)
		{ 
			alert ("E-Mail inválido.");
			return true;
		}
		return false;
	}

	function ValidaEmail(elm)
	{
		if(elm == "")
			return false;
		if(elm != "")
		{
			if(elm.indexOf("@") != "-1" &&
					elm.indexOf(".") != "-1" &&
					elm.indexOf("@.") == "-1" &&
					elm.indexOf(".br.") == "-1" &&
					elm.indexOf("\"") == "-1" &&
					elm.indexOf(" ") == "-1" &&
					elm.indexOf("'") == "-1" &&
					elm.indexOf(";") == "-1" &&
					elm.indexOf(",") == "-1" &&
					elm.indexOf("{") == "-1" &&
					elm.indexOf("}") == "-1" &&
					elm.indexOf("[") == "-1" &&
					elm.indexOf("]") == "-1" &&
					elm.indexOf("<") == "-1" &&
					elm.indexOf(">") == "-1" &&
					elm.indexOf("?") == "-1" &&
					elm.indexOf("|") == "-1" &&
					elm.length > 5 )
			{

				return true;
			}
			else
			{
				return false;
			}
		}
	} 
