function AllCheckBox() {
	var checkall=0;
	
    $(".cinput").each(function(){
    	
        if(checkall == 0) this.checked = true;
        else this.checked = false;
    });
    checkall = checkall ? 0 : 1;
}

function Dell(obj,url,m,n,o,p) {
	
	var confirma;
	
	switch(obj){
		case 'news':
			confirma = confirm('Deseja realmente excluir a Notícia \''+m+'?');
			if (confirma == true) {
				location.href = url;
			}
		break;
		case 'gallery':
			confirma = confirm('Deseja realmente excluir a Galeria \''+m+'?');
			if (confirma == true) {
				location.href = url;
			}
		break;
		case 'projetos':
			confirma = confirm('Deseja realmente excluir o Projeto \''+m+'?');
			if (confirma == true) {
				location.href = url;
			}
		break;
		case 'imgGallery':
			confirma = confirm('Deseja realmente excluir esta imagem?');
			if (confirma == true) {
				location.href = url;
			}
		break;
		case 'imgProjects':
			confirma = confirm('Deseja realmente excluir esta imagem?');
			if (confirma == true) {
				location.href = url;
			}
		break;
		case 'clientes':
			confirma = confirm('Deseja realmente excluir o cliente \''+m+'\'?');
			if (confirma == true) {
				location.href = url;
			}
		break;
		default:
			return false;
	}

}

function Ordena(obj,url,m,n,o,p){
	
	switch(obj) {
		case 'gallery':
			location.href = url;
			break;
	}
	
}

function Adicionar_conteudo(){
  

  	var fieldfile = document.createElement('input');
  	fieldfile.setAttribute('type','file');
  	fieldfile.setAttribute('name','imgup[]');
  	fieldfile.setAttribute('id','imgup[]');
  	fieldfile.setAttribute('size','63');
	fieldfile.Class='files';
	fieldfile.className='files';
  	
    //texto = '<input type=\"file\" name=\"imgup[]\" id=\"imgup\" size=\"63\" class=\"files\" /><br />';
    $(fieldfile).appendTo('#imagesup');
  }
