// Name: Config file
// Info: Contain constants and menu defenition.

// Buttons constants
EXCLUDE		= -2;
DISABLED	= -1;
CHOOSE		= 2;
ON 			= 1;
OFF			= 0;

// mag tag in the path
_de_max_tag = 15;

// history length
_de_max_history_item = 10;

// Main stylesheet file
var main_css_file = "styles.css";
var style_id = "de_b";
var _de_temp_element = "_de_temp_element";

// DOCTYPE
var _de_doctype = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
var combostyle_flag = false;

// reg expr
var HtmlContents	= /([\s\S]*\<html[^\>]*\>)([\s\S]*)(\<\/html\>[\s\S]*)/i ;
var HtmlContents1	= /([\s\S]*\<html[^\>]*\>)/i ;
var HtmlContents2	= /(\<\/html\>[\s\S]*)/i ;
var BodyContents	= /([\s\S]*\<body[^\>]*\>)([\s\S]*)(\<\/body\>[\s\S]*)/i ;
var HeadContents	= /([\s\S]*\<head[^\>]*\>)([\s\S]*)(\<\/head\>[\s\S]*)/i ;
var begin_edit_expr	= /(<!--[#\s\S]*?BeginEditable[\s\S"]*?-->)/gi;
var end_edit_expr	= /(<!--[#\s]*?EndEditable\s*?-->)/gi;
var edit_expr		= /(<!--[#\s\S]*?BeginEditable[\s\S"]*?-->[\s\S]*<!--[#\s]*?EndEditable\s*?-->)/gi;
var wrap_tag_expr	= /(<!--[#\s\S]*?BeginEditable[\s\S"]*?-->([\s\S]*?)<div ([\s\S]*?)de_wrap_div([\s\S]*?)>)/gi;
var wrap_end_tag_expr	= /(<\/div><!--[#\s]*?EndEditable\s*?-->)/gi;;

// ShortCut Keys: Ctrl + []
ShortCutKeys = [
		["B" , "Bold"],
		["U" , "Underline"],
		["I" , "Italic"],
		["Z" , "Undo"],
		["Y" , "Redo"],
		["D" , "Pastefrommsword"],
		["M" , "Image"],
		["K" , "CreateLink"],
		["SHIFT+V" , "Pastetext"]
];

specialKeyCode = [90,89,32,13,46,37,38,39,40];

// Toolbar Buttons Sets

DevEditToolbars  = ['Complete','Simple'];
DevEditToolbarSets = new Array();
DevEditToolbarSets["footer"] = [['GeckoXPConnect','EditorMode']];
DevEditToolbarSets["path"] = [['Path']];
DevEditToolbarSets["_source"] = [
	['Save','Fullscreen','Cut','Copy','Paste','Findreplace','-','UndoSource','RedoSource'],
	[]
];
DevEditToolbarSets["_preview"] = [['Previewlabel']];

DevEditToolbarSets["Complete"] = [
	['Save','Fullscreen','Cut','Copy','Paste','Findreplace','-','Undo','Redo','-','Spellcheck','-','RemoveFormat','-','Bold','Underline','Italic','Strikethrough','-','OrderedList','UnorderedList','Indent','Outdent','-','SubScript','SuperScript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','CreateLink','CreateEmailLink','Anchor','-','Help'],
	['Fontname','Fontsize','Formatblock','Styles','-','Fontcolor','Highlight','-','Table','-','Form','-','Flash','Image','Media','-','Inserttextbox','HR','Insertchars','Pageproperties','Clearcode','Custominsert','Toggleposition','Showborders']
];

DevEditToolbarSets["Simple"] = [
	['Save','Fullscreen','Cut','Copy','Paste','Findreplace','-','Undo','Redo','-','Bold','Underline','Italic','-','OrderedList','UnorderedList','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','CreateLink','-','Fontname','Fontsize','-','Fontcolor','Highlight','-','Image']
];

// Popups
Popups = new Array();
Popups["paste"] = [
	['Paste','Paste	Ctrl+V','paste.gif'],
	['Pastetext','Paste as Plain Text','pastetext.gif'],	
	['Pastefrommsword','Paste from MS Word	Ctrl+D','pasteword.gif']
]
Popups["form"] = [
	['Insertform','Insert Form ...','insertform.gif'],
	['Modifyform','Modify Form Properties ...','modifyform.gif'],
	['-','-'],
	['Inserttextfield',	['Insert Text Field ...','Modify Text Field ...'],'inserttextfield.gif'],
	['Inserttextarea',	['Insert Text Area ...','Modify Text Area ...'],'inserttextarea.gif'],
	['Inserthidden',	['Insert Hidden Field ...','Modify Hidden Field ...'],'inserthidden.gif'],
	['Insertbutton',	['Insert Button ...','Modify Button ...'],'insertbutton.gif'],
	['Insertcheckbox',	['Insert Checkbox ...','Modify Checkbox ...'],'insertcheckbox.gif'],
	['Insertradio',		['Insert Radio ...','Modify Radio ...'],'insertradio.gif'],
	['Insertselect',	['Insert Select Field ...','Modify Select Field ...'],'insertselect.gif']
];
Popups["table"] = [
	['Inserttable','Insert Table ...','inserttable.gif'],
	['Modifytable','Modify Table Properties ...','modifytable.gif'],
	['Modifycell','Modify Cell Properties ...','modifycell.gif'],
	['-','-'],
	['Insertcolumnright','Insert Column to the Right','insertcolumnright.gif'],
	['Insertcolumnleft','Insert Column to the Left','insertcolumnleft.gif'],
	['-','-'],
	['Insertrowabove','Insert Row Above','insertrowabove.gif'],
	['Insertrowbelow','Insert Row Below','insertrowbelow.gif'],
	['-','-'],
	['Deleterow','Delete Row','deleterow.gif'],
	['Deletecolumn','Delete Column','deletecolumn.gif'],
	['-','-'],
	['Increasecolumnspan','Increase Column Span','increasecolumnspan.gif'],
	['Decreasecolumnspan','Decrease Column Span','decreasecolumnspan.gif']
];

Popups["contextmenu"] = [
	['Cut','Cut','cut.gif'],
	['Copy','Copy','copy.gif'],
	['Paste','Paste','paste.gif'],
	['Pastetext','Paste as Plain Text','pastetext.gif'],	
	['Pastefrommsword','Paste from MS Word','pasteword.gif'],
	['-','-'],
	['Modifytable','Modify Table Properties ...','modifytable.gif','TABLE'],
	['Modifycell','Modify Cell Properties ...','modifycell.gif','TD'],
	['-','-',,'TABLE'],
	['Insertcolumnright','Insert Column to the Right','insertcolumnright.gif','TABLE'],
	['Insertcolumnleft','Insert Column to the Left','insertcolumnleft.gif','TABLE'],
	['-','-',,'TABLE'],
	['Insertrowabove','Insert Row Above','insertrowabove.gif','TABLE'],
	['Insertrowbelow','Insert Row Below','insertrowbelow.gif','TABLE'],
	['-','-',,'TABLE'],
	['Deleterow','Delete Row','deleterow.gif','TABLE'],
	['Deletecolumn','Delete Column','deletecolumn.gif','TABLE'],
	['-','-',,'TABLE'],
	['Increasecolumnspan','Increase Column Span','increasecolumnspan.gif','TABLE'],
	['Decreasecolumnspan','Decrease Column Span','decreasecolumnspan.gif','TABLE'],
	['-','-',,'TABLE'],
	['Image','Modify Image Properties...','insertimage.gif','IMG'],
	['CreateLink','Create or Modify Link...','createlink.gif','text|IMG|A'],
	['Flash','Modify Flash Properties...','flash.gif','flash'],
	['Media','Modify Media Properties...','media.gif','media'],
	['-','-',,'text|IMG|A|flash|media'],
	['Spellcheck','Check Spelling...','spellcheck.gif']	
];

Popups["spellmenu"] = [
	['AddToDictionary', "Add to Dictionary", 'addtodictionary.gif']
];
useXHTML	= true;

mFontname = [
			["Default",""],
			["Arial","Arial"],
			["Verdana","Verdana"],
			["Tahoma","Tahoma"],
			["Courier New","Courier New"],
			["Georgia","Georgia"],
			["-",""],			
			["Remove Font",""]];

mFontsize = [
			["Size 1","8pt","1"],
			["Size 2","10pt","2"],
			["Size 3","12pt","3"],
			["Size 4","14pt","4"],
			["Size 5","18pt","5"],
			["Size 6","24pt","6"],
			["Size 7","36pt","7"],
			["-",""],			
			["Remove Size","","3"]
			];

mFormatblock = [
			["Normal","<P>"],
			["Heading 1","<H1>"],
			["Heading 2","<H2>"],
			["Heading 3","<H3>"],
			["Heading 4","<H4>"],
			["Heading 5","<H5>"],
			["Heading 6","<H6>"],
			["-",""],
			["Remove Formatting","<P>"]
			];

CustomLink = [
	["DevEdit", "http://www.devedit.com"]
];


