function ver_imagem(src){
	var winW;
	var winH;
	var y;
	if(document.all){
		y = document.documentElement.scrollTop;
	}else{
		y = window.pageYOffset;
	}		
	if (parseInt(navigator.appVersion)>3) {
	 if (navigator.appName=="Netscape") {
	  winW = window.innerWidth;
	  winH = window.innerHeight;
	 }
	 if (navigator.appName.indexOf("Microsoft")!=-1) {
	  winW = document.documentElement.offsetWidth;
	  winH = document.documentElement.offsetHeight;
	 }
	}
	var posx = (winW - 600) / 2;
	var posy = ((winH - 300) / 2)+y;
	document.getElementById('ver_imagem').innerHTML="<img border='0' src='" + src + "' />";
	document.getElementById('ver_imagem').style.left = posx+"px";
	document.getElementById('ver_imagem').style.top = posy+"px";
	document.getElementById('ver_imagem').style.display = "block";
}

function ver_imagem2(src){
	var winW;
	var winH;
	var y;
	if(document.all){
		y = document.documentElement.scrollTop;
	}else{
		y = window.pageYOffset;
	}		
	if (parseInt(navigator.appVersion)>3) {
	 if (navigator.appName=="Netscape") {
	  winW = window.innerWidth;
	  winH = window.innerHeight;
	 }
	 if (navigator.appName.indexOf("Microsoft")!=-1) {
	  winW = document.documentElement.offsetWidth;
	  winH = document.documentElement.offsetHeight;
	 }
	}
	var posx = (winW - 781) / 2;
	var posy = ((winH - 300) / 2)+y;
	document.getElementById('ver_imagem').innerHTML="<img border='0' src='" + src + "' />";
	document.getElementById('ver_imagem').style.left = posx+"px";
	document.getElementById('ver_imagem').style.top = posy+"px";
	document.getElementById('ver_imagem').style.display = "block";
}


function fecha_imagem(){
	document.getElementById('ver_imagem').style.display = "none";
}

// executa após a leitura do documento
$(document).ready
(

	function()
	{ 
		//funções com os efeitos dos botões da direita no site(antigo links)
		$("#btIntranet").mouseover
		( 
			function() 
			{ 
				$("#btIntranet").css({ backgroundColor: "#996600" });
				document.getElementById('btIntranetBullet').src="img/bulletmenulinksover.gif";
				$("#btIntranetLi").css({ color: "#DDD9CD" });
			} 
		);

		$("#btIntranet").mouseout
		( 
			function() 
			{ 
				$("#btIntranet").css({ backgroundColor: "#DDD9CD" });
				document.getElementById('btIntranetBullet').src="img/bulletmenulinks.gif";
				$("#btIntranetLi").css({ color: "#996600" });
			} 
		);
		
		$("#btAdmin").mouseover
		( 
			function() 
			{ 
				$("#btAdmin").css({ backgroundColor: "#996600" });
				document.getElementById('btAdminBullet').src="img/bulletmenulinksover.gif";
				$("#btAdminLi").css({ color: "#DDD9CD" });
			} 
		);

		$("#btAdmin").mouseout
		( 
			function() 
			{ 
				$("#btAdmin").css({ backgroundColor: "#DDD9CD" });
				document.getElementById('btAdminBullet').src="img/bulletmenulinks.gif";
				$("#btAdminLi").css({ color: "#996600" });
			} 
		);
		
		$("#btGERPROJ").mouseover
		( 
			function() 
			{ 
				$("#btGERPROJ").css({ backgroundColor: "#996600" });
				document.getElementById('btGERPROJBullet').src="img/bulletmenulinksover.gif";
				$("#btGERPROJLi").css({ color: "#DDD9CD" });
			} 
		);

		$("#btGERPROJ").mouseout
		( 
			function() 
			{ 
				$("#btGERPROJ").css({ backgroundColor: "#DDD9CD" });
				document.getElementById('btGERPROJBullet').src="img/bulletmenulinks.gif";
				$("#btGERPROJLi").css({ color: "#996600" });
			} 
		);
		
		/* início do HACK PARA CORRIGIR O LI:HOVER NO IE6*/
		over = function() 
		{
			var sfEls = document.getElementById("menuPrincipal").getElementsByTagName("LI");
			for (var i=0; i<sfEls.length; i++)
			{
				sfEls[i].onmouseover=function() 
				{
					this.className+=" over";
				}
				sfEls[i].onmouseout=function() 
				{
					this.className=this.className.replace(new RegExp(" over\\b"), "");
				}
			}
		}
			if (window.attachEvent) window.attachEvent("onload", over);		
		/* final do HACK PARA CORRIGIR O LI:HOVER NO IE6*/
	
		$("#colSecondary table").width(180);
		$("#colSecondary table td").height(25);
		
	}
);

function loadPage(idCategoriaPai,idSubcategoria,page,language)
{
	$("#contentAjax").load("page.php?idpai="+idCategoriaPai+"&idsub="+idSubcategoria+"&page="+page+"&language="+language);
}

function loadNew(idNoticia,language)
{
	$("#contentAjax").load("news.php?id="+idNoticia+"&language="+language);
}

function loadAd(idAnuncio,language)
{
	$("#contentAjax").load("ads.php?id="+idAnuncio+"&language="+language);
}

function postCurriculo()
{
	$.post("salva_curriculo.php",
	{ 
		nome:$("#nome").val(),
		sexo:$("#sexo").val(),
		data_nasc:$("#data_nasc").val(),
		identidade:$("#identidade").val(),
		estado_civil:$("#estado_civil").val(),
		telefone:$("#telefone").val(),
		endereco:$("#endereco").val(),
		cidade: $("#cidade").val(),
		cep:$("#cep").val(),
		estado: $("#estado").val(),
		pais: $("#pais").val(),
		email: $("#email").val(),
		area_atuacao:$("#area_atuacao").val(),
		estudos: $("#estudos").val(),
		nome_instituicao:$("#nome_instituicao").val(),
		curso_pos_graduacao: $("#curso_pos_graduacao").val(),
		outros_cursos:$("#outros_cursos").val(),
		experiencia_trabalho:$("#experiencia_trabalho").val(),
		tempo_experiencia_trabalho: $("#tempo_experiencia_trabalho").val(),
		perfil_tarefas: $("#perfil_tarefas").val(),
		areas_interesse: $("#areas_interesse").val(),
		idiomas:$("#idiomas").val(),
		referencias:$("#referencias").val()
	},
	function()
	{
		alert("Seu currículo foi enviado com sucesso.");
		$("#formCurriculo")[0].reset();
	}
	);
}
											
