
function confirmarRemover(item, link) {
	if (confirm("Deseja excluir o item "+item+"?"))
		window.location.href=link;
}
function link(link) {
	window.location.href=link;
}
function linkPai(link) {
	//window.opener.location.href=link;
	
	pai = window.opener;
	//if (pai.closed)
	if (pai==null) {
		janela(link);
	}
	else {
		pai.location.href=link;
		pai.focus();
	}
}

function popUp(link,width,height,scroll) {
    
 	var parametro = "top=0,left=0,titlebar=yes,menubar=no,toolbar=no,resizable=yes,status=1,width="+width+",height="+height;
	 
    if (scroll==1)	
        parametro += ",scrollbars=yes";
	 	
    var janela = window.open(link,"",parametro);
    janela.focus();
}
function fullPopUp(link,scroll) {
            
	var parametro = "top=0,left=0,titlebar=yes,menubar=no,toolbar=no,resizable=yes,status=1";
	 
    if (scroll==1)	
        parametro += ",scrollbars=yes";
	 	
    var janela = window.open(link,"",parametro);
    janela.focus();    
    janela.resizeTo(screen.availWidth,screen.availHeight);
}
function fullHeightPopUp(link,width,scroll) {
            
	var parametro = "top=0,left=0,titlebar=yes,menubar=no,toolbar=no,resizable=yes,status=1";
	 
    if (scroll==1)	
        parametro += ",scrollbars=yes";
	 	
    var janela = window.open(link,"",parametro);
    janela.focus();    
    janela.resizeTo(width,screen.availHeight);
}

function janela(link) {               	    
	var janela = window.open(link, '', "top=0,left=0,width=750,height=550,menubar=yes,toolbar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes");
	janela.focus();    
    janela.resizeTo(screen.availWidth,screen.availHeight);
}

function OpenRequestedPopup(strUrl, strTarget) {               	    
	window.open(strUrl, '', "top=0,left=0,width=750,height=550,menubar=yes,toolbar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes");
}

function popUpImagem1(idFoto,width,height) {
    
 	var parametro = "";

    //quando for imagem maior que as dimensoes minimas, de 800x600, colocar barra de rolagem
    if (width>750 || height>550) {
        parametro += "scrollbars=yes,";
        
        if (width>750)
            width = 750;
        if (height>550)    
            height = 550;
    }
    
    parametro += "top=0,left=0,titlebar=no,menubar=no,toolbar=no,resizable=yes,status=no,width="+width+",height="+height;
	 	
    var janela = window.open(appName+'/foto/exibirFotoOriginalPopUp&idFoto='+idFoto,"",parametro);
    janela.focus();
}
//imagens da tabela arquivo
function popUpImagem2(idArquivo,width,height) {
    
 	var parametro = "";

    //quando for imagem maior que as dimensoes minimas, de 800x600, colocar barra de rolagem
    if (width>750 || height>550) {
        parametro += "scrollbars=yes,";
        
        if (width>750)
            width = 750;
        if (height>550)    
            height = 550;
    }
    
    parametro += "top=0,left=0,titlebar=no,menubar=no,toolbar=no,resizable=yes,status=no,width="+width+",height="+height;
	 	
    var janela = window.open(appName+'/arquivo/exibirFotoPopUp&idArquivo='+idArquivo,"",parametro);
    janela.focus();
}
//imagens do banner
function popUpImagem3(idBanner,width,height) {
    
 	var parametro = "";

    //quando for imagem maior que as dimensoes minimas, de 800x600, colocar barra de rolagem
    if (width>750 || height>550) {
        parametro += "scrollbars=yes,";
        
        if (width>750)
            width = 750;
        if (height>550)    
            height = 550;
    }
    
    parametro += "top=0,left=0,titlebar=no,menubar=no,toolbar=no,resizable=yes,status=no,width="+width+",height="+height;
	 	
    var janela = window.open(appName+'/banner/exibirBannerPopUp&idBanner='+idBanner,"",parametro);
    janela.focus();
}
function popUpImagem4(idFotoGaleria,width,height) {
    
 	var parametro = "";

    //quando for imagem maior que as dimensoes minimas, de 800x600, colocar barra de rolagem
    if (width>750 || height>550) {
        parametro += "scrollbars=yes,";
        
        if (width>750)
            width = 750;
        if (height>550)    
            height = 550;
    }
    
    parametro += "top=0,left=0,titlebar=no,menubar=no,toolbar=no,resizable=yes,status=no,width="+width+",height="+height;
	 	
    var janela = window.open(appName+'/fotoGaleria/exibirFotoGaleriaOriginalPopUp&idFotoGaleria='+idFotoGaleria,"",parametro);
    janela.focus();
}
function popUpImagem5(imagem,width,height) {
    
 	var parametro = "";

    //quando for imagem maior que as dimensoes minimas, de 800x600, colocar barra de rolagem
    if (width>750 || height>550) {
        parametro += "scrollbars=yes,";
        
        if (width>750)
            width = 750;
        if (height>550)    
            height = 550;
    }
    
    parametro += "top=0,left=0,titlebar=no,menubar=no,toolbar=no,resizable=yes,status=no,width="+width+",height="+height;
	 	
    var janela = window.open(appName+'/privado/noticia/exibirFotoPopUp&imagem='+imagem,"",parametro);
    janela.focus();
}

function exibirPagina(idPagina) {
	$('formu').idPagina.value = idPagina;
	$('formu').submit();
}
function enviarFormu2(action,target) {
	$('formu').target = target;
	$('formu').action = action;
	$('formu').submit();
}





//--
var tam = 11;
function mudaFonte( tipo ) {
    if( tipo == 'mais' ) {
        if( tam < 14 ) tam += 1 ;    			 
    }
    else {
        if( tam > 10 ) tam -= 1 ;
    }
    if( document.getElementById( 'mudaFonte' ) )
        mudaFonteRecursiva( tipo , document.getElementById( 'mudaFonte' ) ) ;
}
function mudaFonteRecursiva( tipo , domElement ) {		
    for( var i = 0 ; i < domElement.childNodes.length ; i++ ) {
        mudaFonteRecursiva( tipo , domElement.childNodes.item( i )  ) ;
    }
    if( domElement.style )
        domElement.style.fontSize = tam+'px';
}

function desabilitar(botao) {
    botao.value="Aguarde...";
    botao.style.color = "#8B8B8B";
    botao.style.borderColor = "#8B8B8B";
    botao.disabled=true;
    
    //var isChrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;    
    
    //no ie, ao desabilitar o botao, o formulario nao eh enviado, entao entao envia com um submit
    //if (document.all || isChrome)
    
    //se nao for Firefox executa submit
    if(navigator.userAgent.search("Firefox") == -1)
    	botao.form.submit();
        
}
function desabilitar2(botao) {
    botao.value="Aguarde...";
    botao.style.color = "#ACA899";
    
    //ja clicou
    if (botao.style.color=="#ACA899")
        return;
        
    botao.form.submit();
}

removerEspaco = function(string) {
	while (string.indexOf(" ", 0)!=-1)
		string = string.replace(" ","");
	return string;	
}

//-----
carregarFlashUpload = function(corFundo, hide, _op, _width, _height, id) {	
    
    var _allowedExt = '*.*';
    var _allowedExtDescr = '.*';
    
	var swf = 'jqUploader.swf';
    		
    if (_op==1 || _op==2) {//geral, mensagem
	}
	else if (_op==3) {//curriculo
		var swf = 'jqUploaderCurriculo.swf';
		_allowedExt = '*.doc;*.docx;*.rtf;*.pdf';
        _allowedExtDescr = '.doc;.docx;.rtf;.pdf';
	}
	else if (_op==4) {//forum
		var swf = 'jqUploaderForum.swf';
	}
	else if (_op==5) {//mp3
		_allowedExt = '*.mp3';
        _allowedExtDescr = '.mp3';
	}
	else if (_op==6) {//zip
		_allowedExt = '*.zip';
        _allowedExtDescr = '.zip';
	}
	else if (_op==7) {//mp3
		_allowedExt = '*.mp3';
        _allowedExtDescr = '.mp3';
	}
	else if (_op==8) {//flv, swf
		_allowedExt = '*.flv;*.swf';
        _allowedExtDescr = '.flv;.swf';
	}
	else if (_op==9) {//pdf
		_allowedExt = '*.pdf';
        _allowedExtDescr = '.pdf';
	}
	
	if (id==null) {
		id = 'uploadAnexo';
	}
	
	$('#'+id).jqUploader({
		width:_width,
		height:_height,
		background:corFundo,
		barColor:'007a37',
		src: appName+'/conteudo/svn/js/jqUploader/'+swf,
		allowedExt: _allowedExt,
		allowedExtDescr: _allowedExtDescr,
		startMessage: 'Clique em BUSCAR para selecionar um arquivo',
		errorSizeMessage: 'Arquivo maior que o limite',
		validFileMessage: 'OK, Clique em ENVIAR!',
		progressMessage: 'Aguarde, o arquivo está sendo enviado',						
		endMessage: 'OK, arquivo enviado com sucesso',
		hideSubmit: hide,
		params: {op:_op} });
    
}

function inserirArquivoSessao(arquivo, nome) {
	var param = '&arquivo='+arquivo;
	if (nome!=null)
		param += '&nome='+nome;
	
	$.ajax({
		type: 'get',
		url: appName+'/arquivo/inserirArquivoAjax',
		data: param
	});
}
function removerArquivoSessaoAjax(corFundo, hide, _op, _width, _height, id) {
	if (confirm("Deseja remover o arquivo?")) {
		
		$.ajax({
			type: 'get',
			url: appName+'/arquivo/removerArquivoSessaoAjax'
		});
	
		carregarFlashUpload(corFundo, hide, _op, _width, _height, id);
	}
}

function removerArquivoAjax(tipo, idTabela, corFundo, hide, _op, _width, _height) {
	if (confirm("Deseja remover o arquivo?")) {
		var param = '&tipo='+tipo+'&idTabela='+idTabela;
		
		$.ajax({
			type: 'get',
			url: appName+'/arquivo/removerArquivoAjax',
			data: param
		});
			
		carregarFlashUpload(corFundo, hide, _op, _width, _height);
	}
}
function removerArquivoAjax2(idArquivo, corFundo, hide, _op, _width, _height, id) {
	if (confirm("Deseja remover o arquivo?")) {
		var param = '&idArquivo='+idArquivo;
		
		$.ajax({
			type: 'get',
			url: appName+'/arquivo/removerArquivoAjax2',
			data: param
		});
		
		carregarFlashUpload(corFundo, hide, _op, _width, _height, id);
	}
}
function removerArquivoAjaxPDF(idCapitulo, corFundo, hide, _op, _width, _height, id) {
	if (confirm("Deseja remover o arquivo?")) {
		var param = '&idCapitulo='+idCapitulo;
		
		$.ajax({
			type: 'get',
			url: appName+'/arquivo/removerArquivoAjaxPDF',
			data: param
		});
				
		carregarFlashUpload(corFundo, hide, _op, _width, _height, id);
	}
}
function removerArquivoCDAjaxPDF(idCapituloCD, corFundo, hide, _op, _width, _height, id) {
	if (confirm("Deseja remover o arquivo?")) {
		var param = '&idCapituloCD='+idCapituloCD;
		
		$.ajax({
			type: 'get',
			url: appName+'/arquivo/removerArquivoCDAjaxPDF',
			data: param
		});
				
		carregarFlashUpload(corFundo, hide, _op, _width, _height, id);
	}
}
removerArquivoPost = function(corFundo, hide, _op, _width, _height, id) {
	if (confirm("Deseja remover o arquivo?")) {
		
		$.ajax({
			type: 'get',
			url: appName+'/arquivo/removerArquivoPost',
			data: param
		});
					
		carregarFlashUpload(corFundo, hide, _op, _width, _height, id);	
	}
}

//-- Boletim
function inserirBoletimAjax() {
    $('#preencha').html("<img src='conteudo/svn/imagem/principal/loading.gif' height='10' alt='Loading...' /> Carregando...");
    
    var param = $("#formuBoletim").serialize();
    
    $.ajax({
		type: 'post',
	   	url: appName+'/usuario/inserirBoletimAjax',
	   	data: param,
	   	dataType: 'html',
	   	success: function(msg) {			
			$("#preencha").html(msg);
		}
	});
}
function removerBoletimAjax() {
    $('#preencha').html("<img src='conteudo/svn/imagem/principal/loading.gif' height='10' alt='Loading...' /> Carregando...");
    
    var param = $("#formuBoletim").serialize();
    
	$.ajax({
		type: 'post',
		url: appName+'/usuario/removerBoletimAjax',
		data: param,
		dataType: 'html',
		success: function(msg) {			
			$("#preencha").html(msg);
		}
	});
}
//--

function topo() {
    var link = window.location.href;
    if (link.indexOf("#")!=-1)
        link = link.substring(0,link.lastIndexOf("#"));
    window.location.href = link + "#topo";
}

function monitorarAjax(tipo, idTabela) {

	$('#monitorarAjax').html('<span class="atencaosimples"> <img src="conteudo/svn/imagem/principal/loading.gif" height="10"> Carregando...</span>');	

	if (document.getElementById('monitorar_elem').checked) 
		var monitorar = 1;
	else
		var monitorar = 0;
				
	var param = '&tipo='+tipo+'&idTabela='+idTabela+'&monitorar='+monitorar;
    
    $.ajax({
		type: 'get',
		url: appName+'/privado/app/monitorarAjax',
		data: param,
		dataType: 'html',
		success: function(msg) {			
			$("#monitorarAjax").html(msg);
		}
	});

}


function procurarSite(formulario) {
    
    if (removerEspaco(formulario.q.value)=="") {
		alert("Digite algo!");
		return false;
	}
	
	
}

function procurarGoogle(formulario) {
    formulario.opProcura[0].checked=true;
    //OpenRequestedPopup(appName+'/app/procurarGooglePopUp', 'blank');
	OpenRequestedPopup('http://www.google.com/cse?cx=001557566295923100681:5uloerfbs3k','blank');
}


function listarFotoAjax(tipo, idTabela, idFoto) {
	$('#fotototal').html('<span class="negrito"> <img src="conteudo/svn/imagem/principal/loading.gif" height="10"> Carregando...</span>');	
	
	var param = '&tipo='+tipo+'&idTabela='+idTabela+'&idFoto='+idFoto;
	$.ajax({
		type: 'get',
		url: appName+'/foto/listarFotoAjax',
		data: param,
		dataType: 'html',
		success: function(msg) {			
			$("#fotototal").html(msg);
		}
	});
	
}


//--
function loginAjax() {
    $('#preenchaLogin').html("<img src='conteudo/svn/imagem/principal/loading.gif' height='10'> Verificando...");
	
	var param = $("#acesseConta").serialize();
    
	$.ajax({
		type: 'post',
		url: appName+'/usuario/loginAjax',
		data: param,
		dataType: 'html',
		success: function(msg) {			
			$("#preenchaLogin").html(msg);
		}
	});
}

function loginLimpar() {
	document.acesseConta.loginEmail.value='Email';
	document.acesseConta.loginSenha.value='Senha';
	$('#preenchaLogin').html('<a href="usuario/inserirUsuario">Cadastrar</a> | <a href="usuario/esqueciSenha">Esqueci senha</a>');
}

function focusLoginEmail() {
	if (document.acesseConta.loginEmail.value=="Email")
		document.acesseConta.loginEmail.value="";
}

function focusLoginSenha() {
	if (document.acesseConta.loginSenha.value=="Senha") {
		document.acesseConta.loginSenha.value="";		 
	}
}
function blurLoginEmail() {
	if (document.acesseConta.loginEmail.value=="")
		document.acesseConta.loginEmail.value="Email";
}
function blurLoginSenha() {
	if (document.acesseConta.loginSenha.value=="") {
		document.acesseConta.loginSenha.value="Senha";
	}
}
function verificarEnter(e) {
    teclaAtual = e.keyCode;
    
    //enter, enviar formulario
    if (teclaAtual==13) {
        loginAjax();
        
        
        if (typeof(e.preventDefault)=='function'){
        	e.preventDefault();
        } else {
        	e.returnValue = false;
            e.keyCode = 0;
        }
        return false;
    }
    
    //return true;
}   
//--


function focusCampo(id, msg) {
	if (id.value==msg)
		id.value="";
}
function blurCampo(id, msg) {
	if (id.value=="")
		id.value=msg;
}


//--

function controleTamanho(elem, tamanho, prox) {
	if (elem.value.length==tamanho) {		
		if (prox!=null) {			
			prox.focus();
		}
		
		return false;
	}
}

controleSomenteNumero = function(event) {
	valido = false;

	tecla = event.keyCode;	
		
	if (tecla>=37 && tecla<=40) //setas
		valido = true;	
	
	if (tecla==35 || tecla==36 || tecla==9) //pgup, pgdown, tab
		valido = true;
	
	if (tecla==8 || tecla==46)//backspace delete
		valido = true;	
	
	tecla = ( document.all ? event.keyCode : event.which);		

	if (tecla>=48 && tecla<=57)//numeros
		valido = true;
	
	if (!valido)
		return false;
											
	return true;
}

function CLEditor(tipo, campo, largura, altura) {
	var controles = "";
	
	//completo
	if (tipo==1) {
		/*controles = "bold italic underline strikethrough subscript superscript | font size " +
                        "style | color highlight removeformat | bullets numbering | outdent " +
                        "indent | alignleft center alignright justify | undo redo | " +
                        "rule image link unlink | cut copy paste pastetext | print source";*/
        $('#'+campo).cleditor({
			width: largura,
			height: altura
		});
	}
	//basico 
	else if  (tipo==2) {
		controles = "bold italic underline " +
                        "color highlight " +
                        "alignleft center alignright justify | " +
                        "link unlink | source";
        $('#'+campo).cleditor({
			width: largura,
			height: altura,
			controls: controles
		});                   
	}
}


//Uploadify--------------------------------------------------------------

function carregarUploadifySom(multiplo,extensoes,idUsuario) {
	if (multiplo==0) {
		load_uploadify('file_upload_som','idArquivosSom','arquivosSom',extensoes,idUsuario);
	}
	else {
	}
}


function carregarUploadifyVideo(multiplo,extensoes,idUsuario) {
	if (multiplo==0) {
		load_uploadify('file_upload_video','idArquivosVideo','arquivosVideo',extensoes,idUsuario);
	}
	else {
	}
}

function carregarUploadifyImagemBoletim(multiplo,extensoes,idUsuario) {
	if (multiplo==0) {
		load_uploadify('file_upload_imagem_boletim','idArquivosImagemBoletim','arquivosImagemBoletim',extensoes,idUsuario);
	}
	else {
	}
}

function carregarUploadifyAssinatura(multiplo,extensoes,idUsuario) {
	if (multiplo==0) {
		load_uploadify('file_upload_assinatura','idArquivosAssinatura','arquivosAssinatura',extensoes,idUsuario);
	}
	else {
	}
}

function carregarUploadifyImagemBoletim1(multiplo,extensoes,idUsuario) {
	if (multiplo==0) {
		load_uploadify('file_upload_imagem_boletim1','idArquivosImagemBoletim1','arquivosImagemBoletim1',extensoes,idUsuario);
	}
	else {
	}
}

function carregarUploadifyImagemBoletim2(multiplo,extensoes,idUsuario) {
	if (multiplo==0) {
		load_uploadify('file_upload_imagem_boletim2','idArquivosImagemBoletim2','arquivosImagemBoletim2',extensoes,idUsuario);
	}
	else {
	}
}

function carregarUploadify(multiplo,extensoes,idUsuario) {
	if (multiplo==0) {
		$('#file_upload').uploadify({			
			'uploader'  : appName+'/conteudo/svn/js/uploadify/uploadify.swf',
			'script'    : appName+'/app/upload1',
			'cancelImg' : appName+'/conteudo/svn/js/uploadify/cancel.png',
			'auto'      : true,
			'removeCompleted': false,
			'fileDataName' : 'Filedata',			
			'fileExt'     : extensoes,
			'fileDesc'    : extensoes,
			'wmode'       : 'transparent',
			'hideButton'  : true,
			'displayData' : 'percentage',
			'width'		  : 120,
			'height'	  : 30,
			'scriptData'  : {'idUsuario':idUsuario},
			'onComplete'  : function(event, ID, fileObj, response, data) {
				removerTodosArquivoUploadify();
				
				$('#idArquivos').val(ID+";");
				$('#arquivos').val(fileObj.name+";");
			},
			'onCancel'	  : function(event, ID, fileObj, data) {				
				removerArquivoUploadify1(ID);
			}			
		});
	}
	else {
	}
}

function load_uploadify(file_id,element_ID1,element_ID2,extensoes,idUsuario){
	$('#'+file_id).uploadify({			
		'uploader'  : appName+'/conteudo/svn/js/uploadify/uploadify.swf',
		'script'    : appName+'/app/upload1',
		'cancelImg' : appName+'/conteudo/svn/js/uploadify/cancel.png',
		'auto'      : true,
		'removeCompleted': false,
		'fileDataName' : 'Filedata',			
		'fileExt'     : extensoes,
		'fileDesc'    : extensoes,
		'wmode'       : 'transparent',
		'hideButton'  : true,
		'displayData' : 'percentage',
		'width'		  : 120,
		'height'	  : 30,
		'scriptData'  : {'idUsuario':idUsuario},
		'onComplete'  : function(event, ID, fileObj, response, data) {
			var aux1 = $('#'+element_ID1).val();	
			var array1 = aux1.split(';');
			for (var i=0; i<array1.length; i++) {
				$('#c_'+i).remove();
			}
			
			$('#'+element_ID1).val('');
			$('#'+element_ID2).val('');	
			
			$('#'+element_ID1).val(ID+";");
			$('#'+element_ID2).val(fileObj.name+";");
		},
		'onCancel'	  : function(event, ID, fileObj, data) {				
			removerArquivoUploadify1(ID);
		}			
	});
}

function removerArquivoUploadify1(ID) {
	var aux1 = $('#idArquivos').val();
	var aux2 = $('#arquivos').val();
	var array1 = aux1.split(';');
	var array2 = aux2.split(';');
	for (var i=0; i<array1.length; i++) {
		if (array1[i]==ID) {
			var aux3 = array2[i];
			aux2 = aux2.replace(aux3+";", "");
			
			aux1 = aux1.replace(ID+";", "");
		}
	}
	$('#idArquivos').val(aux1);
	$('#arquivos').val(aux2);
}

//request inserido pelo sistema
function removerArquivoUploadify2(id1, ID) {
	removerArquivoUploadify1(ID);
	$('#'+id1).remove();
}

function removerTodosArquivoUploadify() {
	var aux1 = $('#idArquivos').val();	
	var array1 = aux1.split(';');
	for (var i=0; i<array1.length; i++) {
		$('#a_'+i).remove();
	}
	
	$('#idArquivos').val('');
	$('#arquivos').val('');	
}

/**
 * @author Juliano Maciel Ferreira
 * @param tipo
 * @param idTabela
 */
function removerArquivoAjaxUploadify(tipo, idTabela) {
	if (confirm("Deseja remover o arquivo?")) {
		var param = '&tipo='+tipo+'&idTabela='+idTabela;
		$.ajax({
			type: 'get',
			url: appName+'/arquivo/removerArquivoAjax',
			data: param
		});
		
		//Apaga a div que contem o arquivo uploaded e mostra a div com o uploadify
		$("#inteiro").fadeOut("slow",function(){
			$(this).remove();			
		});
	}
}

/**
 * @author Juliano Maciel Ferreira
 * @param tipo
 * @param idTabela
 * @param containerID
 */
function removerArquivoAjaxUploadifyWithContainer(tipo, idTabela,containerID) {
	if (confirm("Deseja remover o arquivo?")) {
		var param = 'tipo='+tipo+'&idTabela='+idTabela;
		$.ajax({
			type: 'get',
			url: appName+'/arquivo/removerArquivoAjax',
			data: param
		});
		
		//Apaga a div que contem o arquivo uploaded e mostra a div com o uploadify
		$("#"+containerID).fadeOut("slow",function(){
			$(this).remove();			
		});
	}
}

/**
 * @author Juliano Maciel Ferreira
 * @param idCursoCD primary key
 * @param containerID
 */
function removerCursoCDImagemBoletimAjax(idCursoCD,containerID){
	if (confirm("Deseja remover o arquivo?")) {
		var param = 'idCursoCD='+idCursoCD;
		$.ajax({
			type: 'get',
			url: appName+'/privado/admin/cursoCD/removerImagemBoletimAjax',
			data: param
		});
		
		//Apaga a div que contem o arquivo uploaded e mostra a div com o uploadify
		$("#"+containerID).fadeOut("slow",function(){
			$(this).remove();			
		});
	}	
}

/**
 * @author Juliano Maciel Ferreira
 * @param idCursoCD primary key
 * @param containerID
 */
function removerCursoCDAssinaturaAjax(idCursoCD,containerID){
	if (confirm("Deseja remover o arquivo?")) {
		var param = 'idCursoCD='+idCursoCD;
		$.ajax({
			type: 'get',
			url: appName+'/privado/admin/cursoCD/removerAssinaturaAjax',
			data: param
		});
		
		//Apaga a div que contem o arquivo uploaded e mostra a div com o uploadify
		$("#"+containerID).fadeOut("slow",function(){
			$(this).remove();			
		});
	}	
}

/**
 * @author Juliano Maciel Ferreira
 * @param idCurso primary key
 * @param containerID
 */
function removerCursoAssinaturaAjax(idCurso,containerID){
	if (confirm("Deseja remover o arquivo?")) {
		var param = 'idCurso='+idCurso;
		$.ajax({
			type: 'get',
			url: appName+'/privado/admin/curso/removerAssinaturaAjax',
			data: param
		});
		
		//Apaga a div que contem o arquivo uploaded e mostra a div com o uploadify
		$("#"+containerID).fadeOut("slow",function(){
			$(this).remove();			
		});
	}	
}

/**
 * @author Juliano Maciel Ferreira
 * @param idCurso primary key
 * @param containerID
 */
function removerCursoImagemBoletimAjax1(idCurso,containerID){
	if (confirm("Deseja remover o arquivo?")) {
		var param = 'idCurso='+idCurso;
		$.ajax({
			type: 'get',
			url: appName+'/privado/admin/curso/removerCursoImagemBoletimAjax1',
			data: param
		});
		
		//Apaga a div que contem o arquivo uploaded e mostra a div com o uploadify
		$("#"+containerID).fadeOut("slow",function(){
			$(this).remove();			
		});
	}	
}

/**
 * @author Juliano Maciel Ferreira
 * @param idCurso primary key
 * @param containerID
 */
function removerCursoImagemBoletimAjax2(idCurso,containerID){
	if (confirm("Deseja remover o arquivo?")) {
		var param = 'idCurso='+idCurso;
		$.ajax({
			type: 'get',
			url: appName+'/privado/admin/curso/removerCursoImagemBoletimAjax2',
			data: param
		});
		
		//Apaga a div que contem o arquivo uploaded e mostra a div com o uploadify
		$("#"+containerID).fadeOut("slow",function(){
			$(this).remove();			
		});
	}	
}
//----------------------------------------------------------------

