_editor_url  = "./script/Xinha/"  // (preferably absolute) URL (including trailing slash) where Xinha is installed
_editor_lang = "en";      // And the language we need to use in the editor.
        //_editor_skin = "silva";   // If you want use skin, add the name here

xinha_init = function(textareas) {
	
    var singleTextareaPassed = false;
    
    if (textareas.constructor.toString().indexOf("Array") == -1) {
        textareas = [textareas];
        singleTextareaPassed = true;
    }

	var xinha_plugins = ["GetHtml"];

	var xinha_config = new Xinha.Config();
	
	xinha_config.toolbar = [
	        ["bold","italic","strikethrough", "outdent","indent", "insertimage"]
	    ];
	
    // The paths given in xinha_config.pageStyleSheets should be relative to
    // the base path. 
	xinha_config.pageStyleSheets = [Vespucci._getScriptLocation() + "Vespucci/Theme/xinha-text.css"];
    
    // If IE6, load IE6 specific CSS to get rid of scroll bar problems.
    if (OpenLayers.Util.alphaHack()) {
        xinha_config.pageStyleSheets.push(Vespucci._getScriptLocation() + "Vespucci/Theme/xinha-text-ie6.css")
    }
 
	xinha_config.htmlareaPaste = true;
	xinha_config.statusBar = false;
	
	var xinha_editors = Xinha.makeEditors(textareas,xinha_config,xinha_plugins);		
    	
	Xinha.startEditors(xinha_editors);
    
    var returnVal = xinha_editors;
    if (singleTextareaPassed) {
        returnVal = xinha_editors[textareas[0]];
    }
    return returnVal;
};