tinyMCEPopup.requireLangPack();

var DynastieColorDialog = {

    insert : function() {
	// Insert the contents from the input into the document
	val = document.forms[0].code.value;
	if (val != '')
	{
	    language = document.forms[0].language.value;
	    colouring = document.forms[0].colouring.value;
	    val = '<pre><dyn:code language="' + language + '" colouring="' + colouring + '" xmlns:dyn="http://indefero.soutade.fr/p/dynastie">' + val + '</dyn:code></pre>';
	    tinyMCEPopup.editor.execCommand('mceInsertContent', false, val);
	}
	tinyMCEPopup.close();
    }
};
