function activa(){
	tinyMCE.init({
		mode : "textareas",
		theme : "advanced",
		save_callback: "guardarficha",
		plugins : "save,table,preview,print,advhr,media,template",

		// Theme options
		theme_advanced_buttons1 : "newdocument, separator, bold, italic, underline, separator, justifyleft, justifycenter, justifyright, justifyfull, separator, forecolor, separator, undo, redo",
		theme_advanced_buttons2 : "fontsizeselect, separator, bullist, numlist, outdent, indent, sub, sup, separator, link, unlink, separator, table, charmap",
		theme_advanced_buttons3 : "",
		theme_advanced_buttons4 : "",

		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		//theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : true,
		

		// Example content CSS (should be your site CSS)
		content_css : "css/content.css",

		// Drop lists for link/image/media/template dialogs
		template_external_list_url : "lists/template_list.js",
		external_link_list_url : "lists/link_list.js",
		external_image_list_url : "lists/image_list.js",
		media_external_list_url : "lists/media_list.js",

		// Replace values for the template plugin
		template_replace_values : {
			username : "Some User",
			staffid : "991234"
		}
	});
	
}

function cambia(){
    	document.form1.action='clases/procesos/gestionadjunto.php';	  
        document.form1.submit()
}

function validar(){
    	document.form1.action='clases/procesos/validar.php';	  
        document.form1.submit()
}

function cambianot(){
    	document.form1.action='clases/procesos/gestionadjuntonot.php';	  
        document.form1.submit()
}

function cambiaeve(){
    	document.form1.action='clases/procesos/gestionadjuntoeve.php';	  
        document.form1.submit()
}

function seguimiento(){
    	document.form1.action='html/documentos/seguimiento.php';
        document.form1.submit();
}

var winName="titulo"
function Abrir_Ventana(theURL,ventana2) {
var windowprops ="top=52,left=10,toolbar=no,location=no,status=no, menubar=no,scrollbars=yes, resizable=no,width=815,height=500";
window.open(theURL,'Ventana1',windowprops);
if (ventana2!=undefined || ventana2!=null) {
var windowprops ="top=120,left=220,toolbar=no,location=no,status=no, menubar=no,scrollbars=yes, resizable=no,width=815,height=500";
window.open(ventana2,'Ventana2',windowprops);
}
} 
/*
	
var numero = 0;

// Funciones comunes
c= function (tag) { // Crea un elemento
   return document.createElement(tag);
}
d = function (id) { // Retorna un elemento en base al id
   return document.getElementById(id);
}
e = function (evt) { // Retorna el evento
   return (!evt) ? event : evt;
}
f = function (evt) { // Retorna el objeto que genera el evento
   return evt.srcElement ?  evt.srcElement : evt.target;
}

addField = function () {
   container = d('files');
   
   span = c('SPAN');
   span.className = 'file';
   span.id = 'file' + (++numero);

   field = c('INPUT');   
   field.name = 'archivos[]';
   field.type = 'file';
   
   a = c('A');
   a.name = span.id;
   a.href = '#';
   a.onclick = removeField;
   a.innerHTML = 'Quitar';

   span.appendChild(field);
   span.appendChild(a);
   container.appendChild(span);
}
removeField = function (evt) {
   lnk = f(e(evt));
   span = d(lnk.name);
   span.parentNode.removeChild(span);
}

addField2 = function () {
   container = d('files2');
   
   span2 = c('SPAN');
   span2.className = 'text';
   span2.id = 'text' + (++numero2);

   field2 = c('INPUT');   
   field2.name = 'enlaces[]';
   field2.type = 'text';
   field2.size = '40';
   
   a2 = c('A');
   a2.name = span2.id;
   a2.href = '#';
   a2.onclick = removeField;
   a2.innerHTML = 'Quitar';

   span2.appendChild(field2);
   span2.appendChild(a2);
   container.appendChild(span2);
}

removeField2 = function (evt) {
   lnk2 = f(e(evt));
   span2 = d(lnk2.name);
   span2.parentNode.removeChild(span2);
}



**************************
"guardarficha('../../clases/procesos/gestionadjunto.php',
	  'adjunto1='+document.getElementById('adjunto1').value+
	  '&adjunto2='+document.getElementById('adjunto2').value+
	  '&adjunto3='+document.getElementById('adjunto3').value+
	  '&adjunto4='+document.getElementById('adjunto4').value+
	  '&link1='+document.getElementById('link1').value+
	  '&link2='+document.getElementById('link2').value+
	  '&link3='+document.getElementById('link3').value+
	  '&link4='+document.getElementById('link4').value+
	  '&activo=<?php echo $_SESSION[iddoc]?>&guardar='+document.getElementById('guardar').value+'&origen=<?php echo $_REQUEST["origen"]?>')"
*/
