
// Xinha configuration variables
var _editor_url = "/_admin/_js/xinha/";
// var _editor_lang = "en";

// Include the Xinha Core JS
 new Asset.javascript(_editor_url + "XinhaCore.js");

// Create the Xinha editor(s)
var xinha_editors = [];

// window.addEvent has been put into javascript.js

xinha_init    = null;
xinha_config  = null;
xinha_plugins = null;
xinha_init = function()
{
   // xinha_plugins = xinha_plugins ? xinha_plugins :["Articles"];
   // if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return;
    xinha_config = new Xinha.Config();
    xinha_config.stripBaseHref = true;
    xinha_config.height = "150px";
    xinha_config.width = "558px";
	xinha_config.pageStyleSheets = ["/_css/wysiwyg.css"];
	
	xinha_configmakeLinkShowsTarget=true; //Found 14/09/09 test enable.
	
	
//	alert('using modified');
//    xinha_config.formatblock =
//    {
//        "&mdash; format &mdash;": "",
//        "Heading 2": "h2",
//        "Heading 3": "h3",
//        "Heading 4": "h4,"
//        "Heading 5": "h5",
//        "Paragraph"   : "p"
//    };

//	xinha_config.registerButton("col-spellcheck", "Spell check the WYSIWYG", "/edit/_js/xinha/images/spellcheck.gif", false, function(editor) {
//			 			editor._popupDialog("../../ASPSpellCheck/ASPSpellCheck.asp?fields=iframe:" + editor._iframe.id,
//							null,
//							null);

//						editor.updateToolbar();
//			    }
//			);
    
    xinha_config.toolbar =
    [
        [
            "bold",
            "italic",
            "underline",
//            "separator",
            
//            "subscript", "superscript", 
//            "insertunorderedlist",
//            "insertorderedlist",
 //           "separator",
//            "inserthorizontalrule",
//            "outdent","indent","separator",
//            "createlink",
//            "undo",
//            "redo",
//            "htmlmode",
            "killword","clearfonts"
//            "formatblock"
        ]
    ];
    xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);
    Xinha.startEditors(xinha_editors);
}
