/////////////////////////////////////////////////////////////
function busca_submit(){
	var field = document.aspnetForm.pesquisaCampo.value;
	if(field == ''){
		alert('Digite algo para Pesquisar !');
	}else{
		window.open('/?filter='+field,'_self');
	}
}
/////////////////////////////////////////////////////////////
// Sistema de Scroll dos Projetos
function projetos(id){
	$.ajax({
		type:"GET",
		url:"/Style Library/projetos/projetos.aspx",		
		data:"projectID="+id,
		cache:false,
		beforeSend: function(){
			// Exibe o carregando, enquanto a função esta sendo processada
			$('#projetos_ajax').html('<div id="projeto_loading"></div>');
		},
		success: function(txt){
			// Exibe o resultado
			$('#projetos_ajax').html(txt);
		},
		error: function(){
			// Exibe o Erro
			$('#projetos_ajax').html('<div id="projeto_error">Ocorreu um erro ao carregar, tente novamente.</div>');
		}
	});
}
////////////////////////////////////////////////
//// function Nossos Projetos
function atualizaDados(dado, obj){
	jQuery.ajax({ url: "/_CONTROLTEMPLATES/VWPNossosProjetosImagens/NossosProjetosImages/hdrNossosProjetosImagens.ashx?AjaxCommandParamID=" + dado,
	    dataType: 'json',
	    data: '',
	    success: function (dados) {
	    	jQuery('#ctl00_PlaceHolderMain_g_f34681ab_10d0_407d_9f0b_1dd70419c61a_ctl00_lblTituloProjeto').html(dados.titulo);
			jQuery('#ctl00_PlaceHolderMain_g_f34681ab_10d0_407d_9f0b_1dd70419c61a_ctl00_lblDescricao').html(dados.descricao);
			jQuery('#ctl00_PlaceHolderMain_g_f34681ab_10d0_407d_9f0b_1dd70419c61a_ctl00_imgProjeto').attr( "src", obj.src) 
	     },
	    error: function () {
			jQuery('#ctl00_PlaceHolderMain_g_f34681ab_10d0_407d_9f0b_1dd70419c61a_ctl00_lblTituloWebPart').html('ERRO!!');
	     }
	 });
	 return false;
} 
////////////////////////////////////////////////
