/*
// ----------------------------------------------------------------------
// Original Author of file: ADJ3 Sistemas
// Purpose of file: New editor for textarea forms
// ----------------------------------------------------------------------
*/

function TestTextArea(path)
{
  	// Lista de todas as textareas da página
	var allTextAreas = document.getElementsByTagName("textarea");
	for (var i = 0; i < allTextAreas.length; i++) 
	{
//		alert(allTextAreas[i].name);
		var ran_unrounded=Math.random()*1000000;
		var ran_number=Math.floor(ran_unrounded); 
		
		// Lista de nomes de textareas a converter no novo editor
		var array_lista = new Array()
		array_lista[0] = 'text';
		array_lista[1] = 'notes';
		array_lista[2] = 'hometext';
		array_lista[3] = 'bodytext';
		array_lista[4] = 'address';
		array_lista[5] = 'content';
		array_lista[6] = 'xfoot1';
		array_lista[7] = 'htmltemplate';
		array_lista[8] = 'htmlbody';
		
		for (var j = 0; j < array_lista.length; j++)
		{
			if (allTextAreas[i].name == array_lista[j])
			{
			  	// Novo editor
				var oFCKeditor = new FCKeditor(allTextAreas[i].name, '450', '200', 'ADJ3', allTextAreas[i].value, ran_number, path) ;
			  	oFCKeditor.ReplaceTextarea() ;
		   }
		}
	}		
}
