// JavaScript Document
function validaEmail() { /*valida email*/
	var pe=document.form1.email.value; //variavel com o nome do campo de email
 
	if (pe.indexOf("@") == -1 || pe.indexOf(".") == -1) { //se no campo de email nao tiver '@' nem '.' retorna como email invalido
		window.alert("E-mail inválido.");                     
		document.form1.email.focus();
		return false;
	}
	return true;
	document.form1.submit();
}

function vazio(){
	nome = document.form1.nome.value;
	email = document.form1.email.value;
	data = document.form1.data.value;
	endereco = document.form1.endereco.value;
	bairro = document.form1.bairro.value;
	if(nome=="" || email=="" || data=="" || endereco=="" || bairro==""){
		window.alert("Campo Obrigatório");
		//document.form1.nome.focus();
		return false;
	}
	else{
        return true;
	  	//document.form1.submit();
	}
}
$(document).ready(function(){
	$("#content-tab > div").hide();
	$("#content-tab > div:eq(0)").show();
	$("#tabs > a:eq(0)").css("background", "url(../images/aba_select.png) top left no-repeat");
});
function opentab(num) {
	$("#content-tab > div").hide();
	$("#content-tab > div:eq(" + (num-1) + ")").fadeIn();
	$("#tabs > a").css("background", "url(../images/aba.png) top left no-repeat");
	$("#tabs > a:eq(" + (num-1) + ")").css("background", "url(../images/aba_select.png) top left no-repeat");	
}

function redireciona(){
	document.location.href="/admin/default.asp?m=conv&conv=add";	
}
function cad_Curr(){
	document.location.href="/mercado/cad_curr.asp";
}
function cad_Oport(){
	document.location.href="/mercado/cad_oport.asp";
}
function mais_curr(){
	document.location.href="/mercado/curriculos.asp";
}
function mais_opor(){
	document.location.href="/mercado/vagas.asp";
}
function openModal(pUrl, pWidth, pHeight) {
	if (window.showModalDialog) {
		return window.showModalDialog(pUrl, window,
		  "dialogWidth:" + pWidth + "px;dialogHeight:" + pHeight + "px");
	} else {
		try {
			netscape.security.PrivilegeManager.enablePrivilege(
			  "UniversalBrowserWrite");
			window.open(pUrl, "wndModal", "width=" + pWidth
			  + ",height=" + pHeight + ",resizable=no,modal=yes");
			return true;
		}
		catch (e) {
			alert("Script não confiável, não é possível abrir janela modal.");
			return false;
		}
	}
}

function VeriField(){
	nome = document.associe.nome.value();
	email = document.associe.email.value();
	tel = document.associe.tel.value();
	area_act = document.associe.area_act.value();
	cidade = document.associe.cidade.value();
	endereco = document.associe.endereco.value();
	
	if(nome==""){
		alert("Campo obrigatório: Nome");
		return false;
		document.asssocie.nome.focus();
	}
	else if(email==""){
		alert("Campo obrigatório: E-mail");
		return false;
		document.associe.email.focus();
	}
	else if(tel==""){
		alert("Campo obrigatório: Telefone");
		return false;
		document.associe.tel.focus();
	}
	else if(area_act==""){
		alert("Campo obrigatório: Area de Atuação");
		return false;
		document.associe.area_act.focus();
	}
	else if(cidade==""){
		alert("Campo obrigatório: Cidade");
		return false;
		document.associe.cidade.focus();
	}
	else if(endereco==""){
		alert("Campo obrigatório: Endereço");
		return false;
		document.associe.endereco.focus();
	}
	else{
		documento.associe-se.submit();
	}
}
// ||  ||  ||  ||  || 
