Location: PHPKode > projects > Content*Builder > contentbuilder/plugins/article2/editor_v2/editor.php
<?php
    @session_start();

	extract($HTTP_GET_VARS);
	extract($HTTP_POST_VARS);
	extract($HTTP_SESSION_VARS);
	extract($_GET);
	extract($_POST);
	extract($_SESSION);
	
	//$htmlMenu = $HTTP_SESSION_VARS[htmlMenu];
	//$plugins  = $HTTP_SESSION_VARS[plugins];
/* 	require("../../../root.inc");
	require("../../../system/inc/db.php");
	include("../../../system/inc/config.ini");
	include_once("../../../".$cbDirLib."CB_option.class.php" );
	include_once("../../../".$cbDirLib."CB_perm.class.php" );
 */	
 include("editor_prepend.php");
	# added meikelators config file ...
/* include("../../../editors.config.php"); */
	# added by meikelator because of publish-compatibility ...
// dirwalk.php introduces neccessary constant definitions and cust. functions
// for DHTML editor
/* include("../dirwalk.php"); */

// Sicherheitscheck only ...
	$query = mysql_query("SELECT * FROM ".TABLE."_user WHERE name = '$HTTP_SESSION_VARS[user]'");
	$userChk = mysql_fetch_array($query);
	if(empty($userChk)) {
		exit();
	}

// hier holen wir uns die Options-Tabelle von CB ... 	
	$cbOption = new CBOption();
	$cbOption->setModule("system");
	$cbOption->getOptionList();
	
	$cbUser   = new CBPerm($userChk[userid]);
	$cbUserID = $userChk[userid];
	$cbPerms  = $cbUser->getPattern("system");

	require("../plugin.config");

	$lang_pf = $cbOption->getSingleOption("lang");
	$lang_path = "../../../".$cbDirInclude."/language/";
	
	if(file_exists($lang_path.$lang_pf."/plugin/article2.lang.php")) {
		include($lang_path.$lang_pf."/plugin/article2.lang.php");
	} else {
		include($lang_path."en/plugin/article2.lang.php");
	}
// und noch ein Security-Check .. eigentlich unnoetig, aber man weiss ja nie ...	
	if(!(ADMIN & $cbPerms)) {
		if(!(ADD_ART & $cbPerms)) {
			  echo $error_msg["permission-denied"];
			  exit();
		}
	}

	// meikelator 2002-11-24: Dealing with mediaID for DHTML-Editor
	if (isset($BASEURL) && isset($mediaID)) {$BASEURL .= "/files/" . $mediaID;}else{$BASEURL = "/files/" . $mediaID;}
?>

<!-- HTML Editor -->
<!-- Author: Marco Zierl hide@address.com -->
<!-- Genaue Beschreibung siehe Internet Professionell Heft 11/2001 www.vnunet.de -->
<!-- Angepasst für Contentbuilder: hide@address.com -->
<!-- Weitere Anpassungen: hide@address.com -->


<html>
<head>

<title>HTML-Editor</title>
<link REL="stylesheet" TYPE="text/css" HREF="toolbars/toolbars.css">
<script LANGUAGE="JavaScript" SRC="dhtmled.js">
</script>

<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
//
// Constants
//
var MENU_SEPARATOR = ""; // Context menu separator

//
// Globals
//
var docComplete = false;
var initialDocComplete = false;
var displayMode = 'RICH';

var QueryStatusToolbarButtons = new Array();
var QueryStatusEditMenu = new Array();
var QueryStatusFormatMenu = new Array();
var QueryStatusHTMLMenu = new Array();
var QueryStatusTableMenu = new Array();
var QueryStatusZOrderMenu = new Array();
var ContextMenu = new Array();
var GeneralContextMenu = new Array();
var TableContextMenu = new Array();
var AbsPosContextMenu = new Array();

var CommonContextMenu = new Array();
var Table2ContextMenu = new Array();
var TextContextMenu = new Array();
var HtmlContextMenu = new Array();
var ImageContextMenu = new Array();

//
// Utility functions
//

// Constructor for custom object that represents an item on the context menu
function ContextMenuItem(string, cmdId) {
	this.string = string;
	this.cmdId = cmdId;
}

// Constructor for custom object that represents a QueryStatus command and 
// corresponding toolbar element.
function QueryStatusItem(command, element) {
	this.command = command;
	this.element = element;
}

//
// Event handlers
//
function window_onload() {
	// Initialze QueryStatus tables. These tables associate a command id with the
	// corresponding button object. Must be done on window load, 'cause the buttons must exist.
	QueryStatusToolbarButtons[0] = new QueryStatusItem(DECMD_BOLD, document.body.all["DECMD_BOLD"]);
	QueryStatusToolbarButtons[1] = new QueryStatusItem(DECMD_COPY, document.body.all["DECMD_COPY"]);
	QueryStatusToolbarButtons[2] = new QueryStatusItem(DECMD_CUT, document.body.all["DECMD_CUT"]);
	QueryStatusToolbarButtons[3] = new QueryStatusItem(DECMD_HYPERLINK, document.body.all["DECMD_HYPERLINK"]);
	QueryStatusToolbarButtons[4] = new QueryStatusItem(DECMD_INDENT, document.body.all["DECMD_INDENT"]);
	QueryStatusToolbarButtons[5] = new QueryStatusItem(DECMD_ITALIC, document.body.all["DECMD_ITALIC"]);
	QueryStatusToolbarButtons[6] = new QueryStatusItem(DECMD_JUSTIFYLEFT, document.body.all["DECMD_JUSTIFYLEFT"]);
	QueryStatusToolbarButtons[7] = new QueryStatusItem(DECMD_JUSTIFYCENTER, document.body.all["DECMD_JUSTIFYCENTER"]);
	QueryStatusToolbarButtons[8] = new QueryStatusItem(DECMD_JUSTIFYRIGHT, document.body.all["DECMD_JUSTIFYRIGHT"]);
	QueryStatusToolbarButtons[9] = new QueryStatusItem(DECMD_LOCK_ELEMENT, document.body.all["DECMD_LOCK_ELEMENT"]);
	QueryStatusToolbarButtons[10] = new QueryStatusItem(DECMD_MAKE_ABSOLUTE, document.body.all["DECMD_MAKE_ABSOLUTE"]);
	QueryStatusToolbarButtons[11] = new QueryStatusItem(DECMD_ORDERLIST, document.body.all["DECMD_ORDERLIST"]);
	QueryStatusToolbarButtons[12] = new QueryStatusItem(DECMD_OUTDENT, document.body.all["DECMD_OUTDENT"]);
	QueryStatusToolbarButtons[13] = new QueryStatusItem(DECMD_PASTE, document.body.all["DECMD_PASTE"]);
	QueryStatusToolbarButtons[14] = new QueryStatusItem(DECMD_REDO, document.body.all["DECMD_REDO"]);
	QueryStatusToolbarButtons[15] = new QueryStatusItem(DECMD_UNDERLINE, document.body.all["DECMD_UNDERLINE"]);
	QueryStatusToolbarButtons[16] = new QueryStatusItem(DECMD_UNDO, document.body.all["DECMD_UNDO"]);
	QueryStatusToolbarButtons[17] = new QueryStatusItem(DECMD_UNORDERLIST, document.body.all["DECMD_UNORDERLIST"]);
	QueryStatusToolbarButtons[18] = new QueryStatusItem(DECMD_INSERTTABLE, document.body.all["DECMD_INSERTTABLE"]);
	QueryStatusToolbarButtons[19] = new QueryStatusItem(DECMD_INSERTROW, document.body.all["DECMD_INSERTROW"]);
	QueryStatusToolbarButtons[20] = new QueryStatusItem(DECMD_DELETEROWS, document.body.all["DECMD_DELETEROWS"]);
	QueryStatusToolbarButtons[21] = new QueryStatusItem(DECMD_INSERTCOL, document.body.all["DECMD_INSERTCOL"]);
	QueryStatusToolbarButtons[22] = new QueryStatusItem(DECMD_DELETECOLS, document.body.all["DECMD_DELETECOLS"]);
	QueryStatusToolbarButtons[23] = new QueryStatusItem(DECMD_INSERTCELL, document.body.all["DECMD_INSERTCELL"]);
	QueryStatusToolbarButtons[24] = new QueryStatusItem(DECMD_DELETECELLS, document.body.all["DECMD_DELETECELLS"]);
	QueryStatusToolbarButtons[25] = new QueryStatusItem(DECMD_MERGECELLS, document.body.all["DECMD_MERGECELLS"]);
	QueryStatusToolbarButtons[26] = new QueryStatusItem(DECMD_SPLITCELL, document.body.all["DECMD_SPLITCELL"]);
	QueryStatusToolbarButtons[27] = new QueryStatusItem(DECMD_SETFORECOLOR, document.body.all["DECMD_SETFORECOLOR"]);
	QueryStatusToolbarButtons[28] = new QueryStatusItem(DECMD_SETBACKCOLOR, document.body.all["DECMD_SETBACKCOLOR"]);
	//QueryStatusToolbarButtons[29] = new QueryStatusItem(DECMD_TBL, document.body.all["DECMD_TBL"]);
	QueryStatusEditMenu[0] = new QueryStatusItem(DECMD_UNDO, document.body.all["EDIT_UNDO"]);
	QueryStatusEditMenu[1] = new QueryStatusItem(DECMD_REDO, document.body.all["EDIT_REDO"]);
	QueryStatusEditMenu[2] = new QueryStatusItem(DECMD_CUT, document.body.all["EDIT_CUT"]);
	QueryStatusEditMenu[3] = new QueryStatusItem(DECMD_COPY, document.body.all["EDIT_COPY"]);
	QueryStatusEditMenu[4] = new QueryStatusItem(DECMD_PASTE, document.body.all["EDIT_PASTE"]);
	QueryStatusEditMenu[5] = new QueryStatusItem(DECMD_DELETE, document.body.all["EDIT_DELETE"]);
	QueryStatusHTMLMenu[0] = new QueryStatusItem(DECMD_HYPERLINK, document.body.all["HTML_HYPERLINK"]);
	QueryStatusHTMLMenu[1] = new QueryStatusItem(DECMD_IMAGE, document.body.all["HTML_IMAGE"]);
	QueryStatusFormatMenu[0] = new QueryStatusItem(DECMD_FONT, document.body.all["FORMAT_FONT"]);
	QueryStatusFormatMenu[1] = new QueryStatusItem(DECMD_BOLD, document.body.all["FORMAT_BOLD"]);
	QueryStatusFormatMenu[2] = new QueryStatusItem(DECMD_ITALIC, document.body.all["FORMAT_ITALIC"]);
	QueryStatusFormatMenu[3] = new QueryStatusItem(DECMD_UNDERLINE, document.body.all["FORMAT_UNDERLINE"]);
	QueryStatusFormatMenu[4] = new QueryStatusItem(DECMD_JUSTIFYLEFT, document.body.all["FORMAT_JUSTIFYLEFT"]);
	QueryStatusFormatMenu[5] = new QueryStatusItem(DECMD_JUSTIFYCENTER, document.body.all["FORMAT_JUSTIFYCENTER"]);
	QueryStatusFormatMenu[6] = new QueryStatusItem(DECMD_JUSTIFYRIGHT, document.body.all["FORMAT_JUSTIFYRIGHT"]);
	QueryStatusFormatMenu[7] = new QueryStatusItem(DECMD_SETFORECOLOR, document.body.all["FORMAT_SETFORECOLOR"]);
	QueryStatusFormatMenu[8] = new QueryStatusItem(DECMD_SETBACKCOLOR, document.body.all["FORMAT_SETBACKCOLOR"]);
	QueryStatusTableMenu[0] = new QueryStatusItem(DECMD_INSERTTABLE, document.body.all["TABLE_INSERTTABLE"]);
	QueryStatusTableMenu[1] = new QueryStatusItem(DECMD_INSERTROW, document.body.all["TABLE_INSERTROW"]);
	QueryStatusTableMenu[2] = new QueryStatusItem(DECMD_DELETEROWS, document.body.all["TABLE_DELETEROW"]);
	QueryStatusTableMenu[3] = new QueryStatusItem(DECMD_INSERTCOL, document.body.all["TABLE_INSERTCOL"]);
	QueryStatusTableMenu[4] = new QueryStatusItem(DECMD_DELETECOLS, document.body.all["TABLE_DELETECOL"]);
	QueryStatusTableMenu[5] = new QueryStatusItem(DECMD_INSERTCELL, document.body.all["TABLE_INSERTCELL"]);
	QueryStatusTableMenu[6] = new QueryStatusItem(DECMD_DELETECELLS, document.body.all["TABLE_DELETECELL"]);
	QueryStatusTableMenu[7] = new QueryStatusItem(DECMD_MERGECELLS, document.body.all["TABLE_MERGECELL"]);
	QueryStatusTableMenu[8] = new QueryStatusItem(DECMD_SPLITCELL, document.body.all["TABLE_SPLITCELL"]);
	QueryStatusTableMenu[9] = new QueryStatusItem(DECMD_TBL, document.body.all["TABLE_UPDATETABLE"]);
	QueryStatusZOrderMenu[0] = new QueryStatusItem(DECMD_SEND_TO_BACK, document.body.all["ZORDER_SENDBACK"]);
	QueryStatusZOrderMenu[1] = new QueryStatusItem(DECMD_BRING_TO_FRONT, document.body.all["ZORDER_BRINGFRONT"]);
	QueryStatusZOrderMenu[2] = new QueryStatusItem(DECMD_SEND_BACKWARD, document.body.all["ZORDER_SENDBACKWARD"]);
	QueryStatusZOrderMenu[3] = new QueryStatusItem(DECMD_BRING_FORWARD, document.body.all["ZORDER_BRINGFORWARD"]);
	QueryStatusZOrderMenu[4] = new QueryStatusItem(DECMD_SEND_BELOW_TEXT, document.body.all["ZORDER_BELOWTEXT"]);
	QueryStatusZOrderMenu[5] = new QueryStatusItem(DECMD_BRING_ABOVE_TEXT, document.body.all["ZORDER_ABOVETEXT"]);
	
	// Initialize the context menu arrays.
	//main context menu
	GeneralContextMenu[0] = new ContextMenuItem("Cut", DECMD_CUT);
	GeneralContextMenu[1] = new ContextMenuItem("Copy", DECMD_COPY);
	GeneralContextMenu[2] = new ContextMenuItem("Paste", DECMD_PASTE);
	CommonContextMenu[0] = new ContextMenuItem(MENU_SEPARATOR, 0);
	CommonContextMenu[1] = new ContextMenuItem("Insert Image", DECMD_IMAGE);
	CommonContextMenu[2] = new ContextMenuItem("Insert Table", DECMD_INSERTTABLE);
	//browse mode menu
	HtmlContextMenu[0] = new ContextMenuItem(MENU_SEPARATOR, 0);
	HtmlContextMenu[1] = new ContextMenuItem(displayMode, DECMD_PROPERTIES);
	//hyperlink menu
	TextContextMenu[0] = new ContextMenuItem(MENU_SEPARATOR, 0);
	TextContextMenu[1] = new ContextMenuItem("Hyperlink", DECMD_HYPERLINK);
	TextContextMenu[2] = new ContextMenuItem("Remove Hyperlink", DECMD_UNLINK);
	//image properties menu
	ImageContextMenu[0] = new ContextMenuItem(MENU_SEPARATOR, 0);
	ImageContextMenu[1] = new ContextMenuItem("Image Properties", DECMD_IMAGE);
	ImageContextMenu[2] = new ContextMenuItem("Hyperlink", DECMD_HYPERLINK);
	ImageContextMenu[3] = new ContextMenuItem("Remove Hyperlink", DECMD_UNLINK);
 	//table properties menu
	Table2ContextMenu[0] = new ContextMenuItem(MENU_SEPARATOR, 0);
	Table2ContextMenu[1] = new ContextMenuItem("Table Properties", DECMD_INSERTTABLE); 
	TableContextMenu[0] = new ContextMenuItem(MENU_SEPARATOR, 0);
	TableContextMenu[1] = new ContextMenuItem("Insert Row", DECMD_INSERTROW);
	TableContextMenu[2] = new ContextMenuItem("Delete Rows", DECMD_DELETEROWS);
	TableContextMenu[3] = new ContextMenuItem(MENU_SEPARATOR, 0);
	TableContextMenu[4] = new ContextMenuItem("Insert Column", DECMD_INSERTCOL);
	TableContextMenu[5] = new ContextMenuItem("Delete Columns", DECMD_DELETECOLS);
	TableContextMenu[6] = new ContextMenuItem(MENU_SEPARATOR, 0);
	TableContextMenu[7] = new ContextMenuItem("Insert Cell", DECMD_INSERTCELL);
	TableContextMenu[8] = new ContextMenuItem("Delete Cells", DECMD_DELETECELLS);
	TableContextMenu[9] = new ContextMenuItem("Merge Cells", DECMD_MERGECELLS);
	TableContextMenu[10] = new ContextMenuItem("Split Cell", DECMD_SPLITCELL);
	//absolute position menu
	AbsPosContextMenu[0] = new ContextMenuItem(MENU_SEPARATOR, 0);
	AbsPosContextMenu[1] = new ContextMenuItem("Send To Back", DECMD_SEND_TO_BACK);
	AbsPosContextMenu[2] = new ContextMenuItem("Bring To Front", DECMD_BRING_TO_FRONT);
	AbsPosContextMenu[3] = new ContextMenuItem(MENU_SEPARATOR, 0);
	AbsPosContextMenu[4] = new ContextMenuItem("Send Backward", DECMD_SEND_BACKWARD);
	AbsPosContextMenu[5] = new ContextMenuItem("Bring Forward", DECMD_BRING_FORWARD);
	AbsPosContextMenu[6] = new ContextMenuItem(MENU_SEPARATOR, 0);
	AbsPosContextMenu[7] = new ContextMenuItem("Send Below Text", DECMD_SEND_BELOW_TEXT);
	AbsPosContextMenu[8] = new ContextMenuItem("Bring Above Text", DECMD_BRING_ABOVE_TEXT);

	//tbContentElement.documentHTML = document.all.artContent.innerHTML;
<?php
     if ($action=="intro"){
     	echo ' if (parent.document.all.artIntro.innerHTML) {
        	tbContentElement.documentHTML = parent.document.all.artIntro.innerHTML;
        }else{
        	tbContentElement.documentHTML = "";
        }';
     }else{
        echo ' if (parent.document.all.artContent.innerHTML) {
			tbContentElement.documentHTML = parent.document.all.artContent.innerHTML;
		}else{
			tbContentElement.documentHTML = "";
        }';
     }
?>
}

// popup dialog to insert a table
function InsertTable() {
  var pVar = ObjTableInfo;
  var args = new Array();
  var arr = null;
  // Display table information dialog
 args["NumRows"] = 3;
 args["NumCols"] = 3;
 args["CellPadding"] = 0;
 args["CellSpacing"] = 0;
 args["Width"] = 100;
 args["Border"] = 1;
 args["WAttr"] = '%';
 args["Align"] = 'left';
  arr = null;
  arr = showModalDialog( "instable.htm", args, "font-family:Verdana; font-size:12; dialogWidth:350px; dialogHeight:280px");
  if (arr != null) {
    // Initialize table object
    for ( elem in arr ) {
      if ("NumRows" == elem && arr["NumRows"] != null) {
        ObjTableInfo.NumRows = arr["NumRows"];
      } else if ("NumCols" == elem && arr["NumCols"] != null) {
        ObjTableInfo.NumCols = arr["NumCols"];
      } else if ("TableAttrs" == elem) {
        ObjTableInfo.TableAttrs = arr["TableAttrs"];
      }
    }
    tbContentElement.ExecCommand(DECMD_INSERTTABLE,OLECMDEXECOPT_DODEFAULT, pVar);  
  }
}

//Update Table
function Update_Table(){
  var pVar = ObjTableInfo;
  var args = new Array();
  var ovElement;
  var arr = null;
  //if selection is a control object and not text
  if(tbContentElement.DOM.selection.type == "Control"){
     var oTable = tbContentElement.DOM.selection.createRange().item(0);
     var tag = oTable.outerHTML;
	//if tagname is TABLE
    if (oTable.tagName == 'TABLE'){
	//substring to remove % in the width
	var inThere = oTable.width.match(/%/g);
	if (inThere) {
		var newWidth = oTable.width.substr(0,3); 
		args["Width"] = newWidth.replace(/%/ig,"");
		args["WAttr"] ='%';
	} else {
		args["Width"] = oTable.width.substr(0,3);
		args["WAttr"] ='';
	}
	 args["CellSpacing"] = oTable.cellSpacing;
	 args["CellPadding"] = oTable.cellPadding;
	 args["Border"] = oTable.border;
	 args["Align"] = oTable.align;
	 //if width has a % width attributes is percentage else is pixels
	 //if (oTable.width.substr(4) == '%'){args["WAttr"] ='%'}else{args["WAttr"] =''};
	 arr = null;
  arr = showModalDialog( "updtable.htm", args, "font-family:Verdana; font-size:12; dialogWidth:350px; dialogHeight:250px");
   }
    if (arr != null){
	//if tagmame is TABLE
     if (oTable.tagName == 'TABLE'){
	  oTable.cellSpacing=''+ arr["CellSpacing"] +'';
	  oTable.cellPadding=''+ arr["CellPadding"] +'';
	  oTable.width=''+ arr["Width"] +''+ arr["WAttr"] +'';
	  oTable.border=''+ arr["Border"] +'';
	  oTable.align=''+ arr["Align"] +'';
	 }
	}
  } 
}

// switch between WYSIWYG and HTML edit mode
function setDisplayMode(mode){
var oSel = tbContentElement.DOM.selection;
var	sType=oSel.type;
 if (sType!=="Control"){
	if(mode=='CODE'){
		top.savebutton_hidden()
		tbContentElement.DOM.body.clearAttributes;
		tbContentElement.DOM.body.style.fontFamily='Courier New';
		tbContentElement.DOM.body.style.fontSize='10pt';
		// lock all buttons fow code view		
		for (i=0; i<QueryStatusToolbarButtons.length; i++) {
  		s = tbContentElement.QueryStatus(QueryStatusToolbarButtons[i].command);
  		TBSetState(QueryStatusToolbarButtons[i].element, "gray"); 
  		}
		if(tbContentElement.DOM.body.innerHTML != "")
			//tbContentElement.DOM.body.innerText=tbContentElement.FilterSourceCode(tbContentElement.DOM.body.innerHTML);
			tbContentElement.DOM.body.innerText=tbContentElement.DOM.body.innerHTML;
		else
			tbContentElement.DOM.body.innerText="";
		displayMode='CODE';
	} else{
	        top.savebutton_visible()
		tbContentElement.DOM.body.clearAttributes;
		tbContentElement.DOM.body.style.fontFamily = "Verdana";
	    tbContentElement.DOM.body.style.fontSize = "12px";
	        
		if(tbContentElement.DOM.body.innerText != "")
			//tbContentElement.DOM.body.innerHTML=tbContentElement.FilterSourceCode(tbContentElement.DOM.body.innerText);
			tbContentElement.DOM.body.innerHTML=tbContentElement.DOM.body.innerText;
		else
			tbContentElement.DOM.body.innerHTML="";
		displayMode='RICH';
	}
  }
}

//DHTML pasteHTML function
function richEditorInsertHTML(sHTML)
{ /* Utility function to paste a given html string sHTML
  at the current selection */
 // Clear the selection if it's an image (would cause an error otherwise)
  if(tbContentElement.DOM.selection.type == "Control")
    tbContentElement.DOM.selection.clear();
  tbContentElement.DOM.selection.createRange().pasteHTML(sHTML);
}

function tbContentElement_ShowContextMenu() {
  var menuStrings = new Array();
  var menuStates = new Array();
  var state;
  var i
  var idx = 0;
  // Rebuild the context menu. 
  ContextMenu.length = 0;
  // Always show general menu
  //if (oTable.tagName !== 'TABLE'){
  for (i=0; i<GeneralContextMenu.length; i++) {
    ContextMenu[idx++] = GeneralContextMenu[i];
  }
 // }
  // Is the selection inside a table? Add table menu if so
  if (tbContentElement.QueryStatus(DECMD_INSERTROW) != DECMDF_DISABLED) {
    for (i=0; i<TableContextMenu.length; i++) {
      ContextMenu[idx++] = TableContextMenu[i];
    }
  }
  
 
  //Is selection not text or an object show common context menu
  if(tbContentElement.DOM.selection.type !== "Text" && tbContentElement.DOM.selection.type !=="Control"){
    for (i=0; i<CommonContextMenu.length; i++) {
      ContextMenu[idx++] = CommonContextMenu[i];
    }
  }
  
  //Is selection text show text menu
  if(tbContentElement.DOM.selection.type == "Text"){

  for (i=0; i<TextContextMenu.length; i++) {
      ContextMenu[idx++] = TextContextMenu[i];
    }
  }
   
   
   //Is selection an image show image menu
   if(tbContentElement.DOM.selection.type == "Control"){
     var oImage = tbContentElement.DOM.selection.createRange().item(0);
    if (oImage.tagName == 'IMG'){
    for (i=0; i<ImageContextMenu.length; i++) {
      ContextMenu[idx++] = ImageContextMenu[i];
    }
    }
	
	//Is selection a table show table menu
	if (oImage.tagName == 'TABLE'){
    for (i=0; i<Table2ContextMenu.length; i++) {
      ContextMenu[idx++] = Table2ContextMenu[i];
    }
    }
  }
  
  // Is the selection on an absolutely positioned element? Add z-index commands if so
  if (tbContentElement.QueryStatus(DECMD_LOCK_ELEMENT) != DECMDF_DISABLED) {
    for (i=0; i<AbsPosContextMenu.length; i++) {
      ContextMenu[idx++] = AbsPosContextMenu[i];
    }
  }
  // Set up the actual arrays that get passed to SetContextMenu
  for (i=0; i<ContextMenu.length; i++) {
    menuStrings[i] = ContextMenu[i].string;
    if (menuStrings[i] != MENU_SEPARATOR) {
      state = tbContentElement.QueryStatus(ContextMenu[i].cmdId);
    } else {
      state = DECMDF_ENABLED;
    }
    //if (state == DECMDF_DISABLED || state == DECMDF_NOTSUPPORTED) {
     // menuStates[i] = OLE_TRISTATE_GRAY;
    //} else if (state == DECMDF_ENABLED || state == DECMDF_NINCHED) {
	//if (state == DECMDF_ENABLED || state == DECMDF_NINCHED) {
      menuStates[i] = OLE_TRISTATE_UNCHECKED;
   // } else { // DECMDF_LATCHED
    //  menuStates[i] = OLE_TRISTATE_CHECKED;
    //}
  }
  // Set the context menu
  tbContentElement.SetContextMenu(menuStrings, menuStates);
  // tbContentElement.SetContextMenu(menuStrings);
}

//Swap DHTML commands with custom ones
function tbContentElement_ContextMenuAction(itemIndex) {
var oSel = tbContentElement.DOM.selection;
var	sType=oSel.type;
//IF command is INSERTTABLE 
  if (ContextMenu[itemIndex].cmdId == DECMD_INSERTTABLE) {
 if (sType=="Control"){
 Update_Table();
 }else{
 InsertTable();
 }   
  }else if (ContextMenu[itemIndex].cmdId == DECMD_IMAGE) {
    DECMD_IMAGE_onclick();
  }else if (ContextMenu[itemIndex].cmdId == DECMD_HYPERLINK) {
	DECMD_HYPERLINK_onclick();
  }else if (ContextMenu[itemIndex].cmdId == DECMD_PROPERTIES) {
	 if(displayMode=='CODE'){swapToMode='RICH'}else{swapToMode='CODE'}
	 setDisplayMode(swapToMode);
  } else {
    tbContentElement.ExecCommand(ContextMenu[itemIndex].cmdId, OLECMDEXECOPT_DODEFAULT);
  }
}

// DisplayChanged handler. Very time-critical routine; this is called
// every time a character is typed. QueryStatus those toolbar buttons that need
// to be in synch with the current state of the document and update. 
function tbContentElement_DisplayChanged() {
  var i, s;
  var filteredHTML;
	if (displayMode == 'RICH'){
	  for (i=0; i<QueryStatusToolbarButtons.length; i++) {
  		s = tbContentElement.QueryStatus(QueryStatusToolbarButtons[i].command);
  		if (s == DECMDF_DISABLED || s == DECMDF_NOTSUPPORTED) {
  		  TBSetState(QueryStatusToolbarButtons[i].element, "gray"); 
  		} else if (s == DECMDF_ENABLED  || s == DECMDF_NINCHED) {
  		   TBSetState(QueryStatusToolbarButtons[i].element, "unchecked"); 
  		} else { // DECMDF_LATCHED
  		   TBSetState(QueryStatusToolbarButtons[i].element, "checked");
  		}
	  }
  	s = tbContentElement.QueryStatus(DECMD_GETBLOCKFMT);
	  if (s == DECMDF_DISABLED || s == DECMDF_NOTSUPPORTED) {
  		//ParagraphStyle.disabled = true;
	  } else {
  		//ParagraphStyle.disabled = false;
  		//ParagraphStyle.value = tbContentElement.ExecCommand(DECMD_GETBLOCKFMT, OLECMDEXECOPT_DODEFAULT);
	  }
	  s = tbContentElement.QueryStatus(DECMD_GETFONTNAME);
	  if (s == DECMDF_DISABLED || s == DECMDF_NOTSUPPORTED) {
  		FontName.disabled = true;
	  } else {
  		FontName.disabled = false;
  		FontName.value = tbContentElement.ExecCommand(DECMD_GETFONTNAME, OLECMDEXECOPT_DODEFAULT);
	  }
	  if (s == DECMDF_DISABLED || s == DECMDF_NOTSUPPORTED) {
  		FontSize.disabled = true;
	  } else {
  		FontSize.disabled = false;
  		FontSize.value = tbContentElement.ExecCommand(DECMD_GETFONTSIZE, OLECMDEXECOPT_DODEFAULT);
	  }
  }
}

function DECMD_VISIBLEBORDERS_onclick() {
	tbContentElement.ShowBorders = !tbContentElement.ShowBorders;
	tbContentElement.focus();
}

function DECMD_UNORDERLIST_onclick() {
	tbContentElement.ExecCommand(DECMD_UNORDERLIST,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function DECMD_UNDO_onclick() {
	tbContentElement.ExecCommand(DECMD_UNDO,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function DECMD_UNDERLINE_onclick() {
	tbContentElement.ExecCommand(DECMD_UNDERLINE,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function DECMD_SNAPTOGRID_onclick() {
	tbContentElement.SnapToGrid = !tbContentElement.SnapToGrid;
	tbContentElement.focus();
}

function DECMD_SHOWDETAILS_onclick() {
	tbContentElement.ShowDetails = !tbContentElement.ShowDetails;
	tbContentElement.focus();
}

function DECMD_SETFORECOLOR_onclick() {
	var arr,args,oSel,sType;
	oSel = tbContentElement.DOM.selection;
	sType=oSel.type;
	var oRange = oSel.createRange();
	arr=null;
	args=new Array();
	//if selection is text
	if(sType=="Text"){
		var oTag=oRange.parentElement();
		//if selection is a control object
	} else if (sType=="Control"){
		var oTag=oRange.commonParentElement();
	}
	if (oRange){
		var pe=oTag.parentElement; 
		//if element TAG outside a selection is FONT 
		if(pe.tagName=="FONT"){
			args["Color"] = pe.color;
		} else if(oTag.tagName=="FONT"){
			args["Color"] = oTag.color;
		}
	}
	arr = showModalDialog( "selcolor.htm",
	args,
	"dialogWidth:380px; dialogHeight:235px; scroll:no; status:no; help:no" );
	if (arr != null) {
		tbContentElement.ExecCommand(DECMD_SETFORECOLOR,OLECMDEXECOPT_DODEFAULT, arr);
	}
}

function DECMD_SETBACKCOLOR_onclick() {
	var arr = showModalDialog( "selcolor.htm",
	"",
	"dialogWidth:380px; dialogHeight:235px; scroll:no; status:no; help:no" );

	if (arr != null) {
	 tbContentElement.ExecCommand(DECMD_SETBACKCOLOR,OLECMDEXECOPT_DODEFAULT, arr);
	}
	tbContentElement.focus();
}

function DECMD_SELECTALL_onclick() {
	tbContentElement.ExecCommand(DECMD_SELECTALL,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function DECMD_REDO_onclick() {
	tbContentElement.ExecCommand(DECMD_REDO,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function DECMD_PASTE_onclick() {
	tbContentElement.ExecCommand(DECMD_PASTE,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function DECMD_OUTDENT_onclick() {
	tbContentElement.ExecCommand(DECMD_OUTDENT,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function DECMD_ORDERLIST_onclick() {
	tbContentElement.ExecCommand(DECMD_ORDERLIST,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function DECMD_MAKE_ABSOLUTE_onclick() {
	tbContentElement.ExecCommand(DECMD_MAKE_ABSOLUTE,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function DECMD_LOCK_ELEMENT_onclick() {
	tbContentElement.ExecCommand(DECMD_LOCK_ELEMENT,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function DECMD_JUSTIFYRIGHT_onclick() {
	tbContentElement.ExecCommand(DECMD_JUSTIFYRIGHT,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function DECMD_JUSTIFYLEFT_onclick() {
	tbContentElement.ExecCommand(DECMD_JUSTIFYLEFT,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function DECMD_JUSTIFYCENTER_onclick() {
	tbContentElement.ExecCommand(DECMD_JUSTIFYCENTER,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function DECMD_ITALIC_onclick() {
	tbContentElement.ExecCommand(DECMD_ITALIC,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function DECMD_INDENT_onclick() {
	tbContentElement.ExecCommand(DECMD_INDENT,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

//modified to use the custom control to browse server side images
//orginal: hide@address.com, modified for CB: hide@address.com
function DECMD_IMAGE_onclick() {
  arr=null;
  var args=new Array();
  if(tbContentElement.DOM.selection.type == "Control"){
     var oImg = tbContentElement.DOM.selection.createRange().item(0);
     args["ImgUrl"] = oImg.src;
     args["AltText"] = oImg.alt;
     args["ImgBorder"] = oImg.border;
     args["HorSpace"] = oImg.hspace;
     args["VerSpace"] = oImg.vspace;
     args["ImgAlign"] = oImg.align;
     args["ImgHeight"] = oImg.height;
     args["ImgWidth"] = oImg.width;
     args["UploadDirRoot"] = "<?php $erg="http://". $_SERVER["HTTP_HOST"].getUploadDir(); echo $erg; ?>";
  } 
  var arr = showModalDialog( "insimage.php?BASEURL=<?php echo urlencode($BASEURL); ?>",
                             args,
                             "font-family:Verdana; font-size:12; dialogWidth:600px; dialogHeight:500px");
  if (arr != null){
     sHTML='<img src="' + arr["ImgUrl"] + '" height="' + arr["ImgHeight"] + '" width="' + arr["ImgWidth"] + '" alt="' + arr["AltText"] + '" vspace="' + arr["VerSpace"] + '" hspace="' + arr["HorSpace"] +  '"align="' + arr["ImgAlign"] +'"border="' + arr["ImgBorder"]+ '">';     
  	//if(tbContentElement.DOM.selection.type == "Control"){
    	//	tbContentElement.DOM.selection.clear();}
	//tbContentElement.DOM.selection.createRange().pasteHTML(sHTML);	
	//check_local_images();
	if (displayMode == 'RICH'){
		richEditorInsertHTML(sHTML);
	}
  }
  tbContentElement.focus();
}

//modified to browse server side files for making the link
//orginal: hide@address.com, modified for CB: hide@address.com
function DECMD_HYPERLINK_onclick() {
	var arr,args,oSel, oParent, sType;
	oSel = tbContentElement.DOM.selection;
	sType=oSel.type;
	var oRange = oSel.createRange();
	arr=null;
	args=new Array();
	
    //if selection is text
    if(sType=="Text"){
        var oTag=oRange.parentElement();
        //if selection is a control object
    }else if (sType=="Control"){
        var oTag=oRange.commonParentElement();
    }

    if (oRange){
	   var pe=oTag.parentElement;
	   //if element TAG outside a selection is A
        if(pe.tagName=="A"){
	       args["LinkUrl"] = pe.href;
	       args["LinkTarget"] = pe.target;
        }else if(oTag.tagName=="A"){
	       args["LinkUrl"] = oTag.href;
	       args["LinkTarget"] = oTag.target;
        }
        args["UploadDirRoot"] = "<?php $erg="http://". $_SERVER["HTTP_HOST"].getUploadDir(); echo $erg; ?>";
    }


         var arr = showModalDialog( "inslink.php?BASEURL=<?php echo urlencode($BASEURL); ?>", 
                                args,
                                "font-family:Verdana; font-size:12; dialogWidth:400px; dialogHeight:500px");
		if (arr != null){
			if(arr["LinkUrl"] != "" | arr["LinkArticle"] != ""){
			 if (sType == "Text"){
			 //create the link
			if (arr["LinkUrl"].length == 0){
			oRange.execCommand("CreateLink",false, arr["LinkArticle"]);
			}else{
			oRange.execCommand("CreateLink",false, arr["LinkUrl"]);
			}
			el = oRange.parentElement();
			// add target attributes
			if (el.tagName == "A"){
			   //if already has target attribute or is null remove before adding
    			if(arr["LinkTarget"].length == 0) {
        		el.removeAttribute("target", 1);
    		} else el.target = arr["LinkTarget"];
			}
			}
			
			//if selection is a control object
			if(tbContentElement.DOM.selection.type == "Control"){
              if (arr["LinkUrl"].length == 0){
			     oRange.execCommand("CreateLink",false, arr["LinkArticle"]);
			   }else{
			     oRange.execCommand("CreateLink",false, arr["LinkUrl"]);
			   }
			//oRange.execCommand("CreateLink",false, arr["LinkUrl"]);
			var pe=oTag.parentElement;
			// handle the target
			if (pe.tagName == "A"){
    			if(arr["LinkTarget"].length == 0) {
        		pe.removeAttribute("target", 1);
    		   } else {
			   pe.target = arr["LinkTarget"];
			   }
		    }
			}
			} else {
			   // clear the selection of A tags.
			   //oRange.pasteHTML( oRange.text );
			}
		}
	tbContentElement.focus();
}

function DECMD_FINDTEXT_onclick() {
	tbContentElement.ExecCommand(DECMD_FINDTEXT,OLECMDEXECOPT_PROMPTUSER);
	tbContentElement.focus();
}

function DECMD_DELETE_onclick() {
	tbContentElement.ExecCommand(DECMD_DELETE,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function DECMD_CUT_onclick() {
	tbContentElement.ExecCommand(DECMD_CUT,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function DECMD_COPY_onclick() {
	tbContentElement.ExecCommand(DECMD_COPY,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function DECMD_BOLD_onclick() {
	tbContentElement.ExecCommand(DECMD_BOLD,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function OnMenuShow(QueryStatusArray) {
	var i, s;
 
	for (i=0; i<QueryStatusArray.length; i++) {
	s = tbContentElement.QueryStatus(QueryStatusArray[i].command);
	if (s == DECMDF_DISABLED || s == DECMDF_NOTSUPPORTED) {
		TBSetState(QueryStatusArray[i].element, "gray"); 
	 } else if (s == DECMDF_ENABLED  || s == DECMDF_NINCHED) {
		 TBSetState(QueryStatusArray[i].element, "unchecked"); 
	 } else { // DECMDF_LATCHED
		 TBSetState(QueryStatusArray[i].element, "checked");
	 }
	}
	tbContentElement.focus();
}

function INTRINSICS_onclick(html) {
	var selection;
	
	selection = tbContentElement.DOM.selection.createRange();
	selection.pasteHTML(html);
	tbContentElement.focus();
}

function TABLE_DELETECELL_onclick() {
	tbContentElement.ExecCommand(DECMD_DELETECELLS,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function TABLE_DELETECOL_onclick() {
	tbContentElement.ExecCommand(DECMD_DELETECOLS,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function TABLE_DELETEROW_onclick() {
	tbContentElement.ExecCommand(DECMD_DELETEROWS,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function TABLE_INSERTCELL_onclick() {
	tbContentElement.ExecCommand(DECMD_INSERTCELL,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function TABLE_INSERTCOL_onclick() {
	tbContentElement.ExecCommand(DECMD_INSERTCOL,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function TABLE_INSERTROW_onclick() {
	tbContentElement.ExecCommand(DECMD_INSERTROW,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function TABLE_INSERTTABLE_onclick() {
	InsertTable();
	tbContentElement.focus();
}

//update table
function TABLE_UPDATETABLE_onclick() {
  Update_Table();
  tbContentElement.focus();
}

function TABLE_MERGECELL_onclick() {
	tbContentElement.ExecCommand(DECMD_MERGECELLS,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function TABLE_SPLITCELL_onclick() {
	tbContentElement.ExecCommand(DECMD_SPLITCELL,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function FORMAT_FONT_onclick() {
	tbContentElement.ExecCommand(DECMD_FONT,OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function URL_VALUE_onkeypress() {
	if (event.keyCode == 13) {

	/**
	 NOTE: The user is not prompted to save the the current 
	 document before the call to LoadURL. Therefore the
	 user will lose any edits he has made to the current document
	 after the call to LoadURL. The purpose of the sample is
	 to provide a basic demonstration of how to use the DHTMLEdit 
	 control. A complete implementation would check if there were
	 unsaved edits to the current document by testing the IsDirty
	 property on the control. If the IsDirty property is true, the
	 user should be given an opporunity to save his edits first.

	 See the implementation of MENU_FILE_NEW_onclick() in this sample
	 for a demonstration how to do this.
	**/

	 docComplete = false;
	 tbContentElement.LoadURL(URL_VALUE.value);
	 tbContentElement.focus();
	}
}

function ZORDER_ABOVETEXT_onclick() {
	tbContentElement.ExecCommand(DECMD_BRING_ABOVE_TEXT, OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function ZORDER_BELOWTEXT_onclick() {
	tbContentElement.ExecCommand(DECMD_SEND_BELOW_TEXT, OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function ZORDER_BRINGFORWARD_onclick() {
	tbContentElement.ExecCommand(DECMD_BRING_FORWARD, OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function ZORDER_BRINGFRONT_onclick() {
	tbContentElement.ExecCommand(DECMD_BRING_TO_FRONT, OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function ZORDER_SENDBACK_onclick() {
	tbContentElement.ExecCommand(DECMD_SEND_TO_BACK, OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function ZORDER_SENDBACKWARD_onclick() {
	tbContentElement.ExecCommand(DECMD_SEND_BACKWARD, OLECMDEXECOPT_DODEFAULT);
	tbContentElement.focus();
}

function TOOLBARS_onclick(toolbar) {
	if (toolbar.TBSTATE == "hidden") {
	 TBSetState(toolbar, "dockedTop");
	} else {
	 TBSetState(toolbar, "hidden");
	}
	tbContentElement.focus();
}

function ParagraphStyle_onchange() {	 
	tbContentElement.ExecCommand(DECMD_SETBLOCKFMT, OLECMDEXECOPT_DODEFAULT, ParagraphStyle.value);
	tbContentElement.focus();
}

function FontName_onchange() {
	tbContentElement.ExecCommand(DECMD_SETFONTNAME, OLECMDEXECOPT_DODEFAULT, FontName.value);
	tbContentElement.focus();
}

function FontSize_onchange() {
	tbContentElement.ExecCommand(DECMD_SETFONTSIZE, OLECMDEXECOPT_DODEFAULT, parseInt(FontSize.value));
	tbContentElement.focus();
}

function tbContentElement_DocumentComplete() {
	tbContentElement.DOM.body.style.fontFamily = "Verdana";
	tbContentElement.DOM.body.style.fontSize = "10pt";
	return;
    if (initialDocComplete) {
	    if (tbContentElement.CurrentDocumentPath == "") {
        	URL_VALUE.value = 'http://';
        } else {
      URL_VALUE.value = tbContentElement.CurrentDocumentPath;
    }
  }
  initialDocComplete = true;
  docComplete = true;
}

function DECMD_CBLINK_onclick() {
	args=new Array();
	var arr = showModalDialog( "../cblink_dhtml.php?",
                                args,
                                "font-family:Verdana; font-size:12; dialogWidth:500px; dialogHeight:500px; resizable:yes");
	if ((arr) && (arr["TargetUrl"])){
		sHTML = arr["TargetUrl"];
   		if (displayMode == 'RICH'){
			richEditorInsertHTML(sHTML);
		}
	}
	tbContentElement.focus();
}


//-->
</script>

<script LANGUAGE="javascript" FOR="tbContentElement" EVENT="DisplayChanged">
<!--
return tbContentElement_DisplayChanged()
//-->
</script>

<script LANGUAGE="javascript" FOR="tbContentElement" EVENT="DocumentComplete">
<!--
return tbContentElement_DocumentComplete()
//-->
</script>

<script LANGUAGE="javascript" FOR="tbContentElement" EVENT="ShowContextMenu">
<!--
return tbContentElement_ShowContextMenu()
//-->
</script>

<script LANGUAGE="javascript" FOR="tbContentElement" EVENT="ContextMenuAction(itemIndex)">
<!--
return tbContentElement_ContextMenuAction(itemIndex)
//-->
</script>

</head>
<div style="visibility: hidden;" id="artContent">
<?
	if($action=="intro") {
		echo $intro;	
	} else {
		echo $content;
	}
	
?>
</div>
<body LANGUAGE="javascript" onload="return window_onload()">

<!-- Toolbars -->
<div class="tbToolbar" ID="StandardToolbar">
<div id=swapButton class="tbButton" TITLE="Switch between Visual Mode and HTML Mode" LANGUAGE="javascript" onClick="if(displayMode=='CODE'){swapToMode='RICH'}else{swapToMode='CODE'};setDisplayMode(swapToMode);window.event.cancelBubble=true;" accesskey=w  style="visibility: visible"><IMG class="tbIcon" src="images/html.gif" " WIDTH="23" HEIGHT="22"></div>
	<div class="tbButton" ID="DECMD_CUT" TITLE="Cut" LANGUAGE="javascript" onclick="return DECMD_CUT_onclick()">
	 <img class="tbIcon" src="images/cut.gif" WIDTH="23" HEIGHT="22">
	</div>
	<div class="tbButton" ID="DECMD_COPY" TITLE="Copy" LANGUAGE="javascript" onclick="return DECMD_COPY_onclick()">
	 <img class="tbIcon" src="images/copy.gif" WIDTH="23" HEIGHT="22">
	</div>
	<div class="tbButton" ID="DECMD_PASTE" TITLE="Paste" LANGUAGE="javascript" onclick="return DECMD_PASTE_onclick()">
	 <img class="tbIcon" src="images/paste.gif" WIDTH="23" HEIGHT="22">
	</div>

	<div class="tbSeparator"></div>

	<div class="tbButton" ID="DECMD_UNDO" TITLE="Undo" LANGUAGE="javascript" onclick="return DECMD_UNDO_onclick()">
	 <img class="tbIcon" src="images/undo.gif" WIDTH="23" HEIGHT="22">
	</div>
	<div class="tbButton" ID="DECMD_REDO" TITLE="Redo" LANGUAGE="javascript" onclick="return DECMD_REDO_onclick()">
	 <img class="tbIcon" src="images/redo.gif" WIDTH="23" HEIGHT="22">
	</div>

	<div class="tbSeparator"></div>

	<div class="tbButton" ID="DECMD_FINDTEXT" TITLE="Find" LANGUAGE="javascript" onclick="return DECMD_FINDTEXT_onclick()">
	 <img class="tbIcon" src="images/find.gif" WIDTH="23" HEIGHT="22">
	</div>
	<div class="tbSeparator"></div>

	<div class="tbButton" ID="DECMD_BOLD" TITLE="Bold" TBTYPE="toggle" LANGUAGE="javascript" onclick="return DECMD_BOLD_onclick()">
	 <img class="tbIcon" src="images/bold.gif" WIDTH="23" HEIGHT="22">
	</div>
	<div class="tbButton" ID="DECMD_ITALIC" TITLE="Italic" TBTYPE="toggle" LANGUAGE="javascript" onclick="return DECMD_ITALIC_onclick()">
	 <img class="tbIcon" src="images/italic.gif" WIDTH="23" HEIGHT="22">
	</div>
	<div class="tbButton" ID="DECMD_UNDERLINE" TITLE="Underline" TBTYPE="toggle" LANGUAGE="javascript" onclick="return DECMD_UNDERLINE_onclick()">
	 <img class="tbIcon" src="images/under.gif" WIDTH="23" HEIGHT="22">
	</div>
	
	<div class="tbSeparator"></div>

	<div class="tbButton" ID="DECMD_JUSTIFYLEFT" TITLE="Align Left" TBTYPE="toggle" NAME="Justify" LANGUAGE="javascript" onclick="return DECMD_JUSTIFYLEFT_onclick()">
	 <img class="tbIcon" src="images/left.gif" WIDTH="23" HEIGHT="22">
	</div>
	<div class="tbButton" ID="DECMD_JUSTIFYCENTER" TITLE="Center" TBTYPE="toggle" NAME="Justify" LANGUAGE="javascript" onclick="return DECMD_JUSTIFYCENTER_onclick()">
	 <img class="tbIcon" src="images/center.gif" WIDTH="23" HEIGHT="22">
	</div>
	<div class="tbButton" ID="DECMD_JUSTIFYRIGHT" TITLE="Align Right" TBTYPE="toggle" NAME="Justify" LANGUAGE="javascript" onclick="return DECMD_JUSTIFYRIGHT_onclick()">
	 <img class="tbIcon" src="images/right.gif" WIDTH="23" HEIGHT="22">
	</div>

	<div class="tbSeparator"></div>

	<div class="tbButton" ID="DECMD_ORDERLIST" TITLE="Numbered List" TBTYPE="toggle" LANGUAGE="javascript" onclick="return DECMD_ORDERLIST_onclick()">
	 <img class="tbIcon" src="images/numlist.gif" WIDTH="23" HEIGHT="22">
	</div>
	<div class="tbButton" ID="DECMD_UNORDERLIST" TITLE="Bulletted List" TBTYPE="toggle" LANGUAGE="javascript" onclick="return DECMD_UNORDERLIST_onclick()">
	 <img class="tbIcon" src="images/bullist.gif" WIDTH="23" HEIGHT="22">
	</div>
	
	<div class="tbSeparator"></div>

	<div class="tbButton" ID="DECMD_OUTDENT" TITLE="Decrease Indent" LANGUAGE="javascript" onclick="return DECMD_OUTDENT_onclick()">
	 <img class="tbIcon" src="images/deindent.gif" WIDTH="23" HEIGHT="22">
	</div>
	<div class="tbButton" ID="DECMD_INDENT" TITLE="Increase Indent" LANGUAGE="javascript" onclick="return DECMD_INDENT_onclick()">
	 <img class="tbIcon" src="images/inindent.gif" WIDTH="23" HEIGHT="22">
	</div>

	<div class="tbSeparator"></div>

	<div class="tbButton" ID="DECMD_HYPERLINK" TITLE="Link" LANGUAGE="javascript" onclick="return DECMD_HYPERLINK_onclick()">
	 <img class="tbIcon" src="images/link.gif" WIDTH="23" HEIGHT="22">
	</div>
	<div class="tbButton" ID="DECMD_IMAGE" TITLE="Insert Image" LANGUAGE="javascript" onclick="return DECMD_IMAGE_onclick()">
	 <img class="tbIcon" src="images/image.gif" WIDTH="23" HEIGHT="22">
	</div>
</div>

<div class="tbToolbar" ID="FormatToolbar">

	<select ID="ParagraphStyle" class="tbGeneral" style="width:90" TITLE="Paragraph Format" LANGUAGE="javascript" onchange="return ParagraphStyle_onchange()">
	 <option id=op1 value="Überschrift 1">Überschrift 1
	 <option id=op2 value="Überschrift 2">Überschrift 2
	 <option id=op3 value="Überschrift 3">Überschrift 3
	 <option id=op4 value="Überschrift 4">Überschrift 4
	 <option id=op5 value="Überschrift 5">Überschrift 5
	 <option id=op6 value="Überschrift 6">Überschrift 6
	 <option id=op7 value="Addresse">Addresse
	 <option id=op8 value="Formatiert">Formatiert
	 <option id=op9 value="Normal">Normal
	</select>
	<select ID="FontName" class="tbGeneral" style="width:140" TITLE="Font Name" LANGUAGE="javascript" onchange="return FontName_onchange()">
    <option value="Arial">Arial</option>
    <option value="Verdana" selected>Verdana</option>
    <option value="Courier New">Courier New</option>
    <option value="Times New Roman">Times New Roman</option>
	</select>
	<select ID="FontSize" class="tbGeneral" style="width:40" TITLE="Font Size" LANGUAGE="javascript" onchange="return FontSize_onchange()">
	 <option value="1">1
	 <option value="2">2
	 <option value="3">3
	 <option value="4">4
	 <option value="5">5
	 <option value="6">6
	 <option value="7">7
	</select>

	<div class="tbSeparator"></div>

	<div class="tbButton" ID="DECMD_SETFORECOLOR" TITLE="Foreground Color" LANGUAGE="javascript" onclick="return DECMD_SETFORECOLOR_onclick()">
	 <img class="tbIcon" src="images/fgcolor.gif" WIDTH="23" HEIGHT="22">
	</div>
	<div class="tbButton" ID="DECMD_SETBACKCOLOR" TITLE="Background Color" LANGUAGE="javascript" onclick="return DECMD_SETBACKCOLOR_onclick()">
	 <img class="tbIcon" src="images/bgcolor.gif" WIDTH="23" HEIGHT="22">
	</div>
</div>

<div class="tbToolbar" ID="AbsolutePositioningToolbar">
	<div class="tbButton" ID="DECMD_VISIBLEBORDERS" TITLE="Visible Borders" TBTYPE="toggle" LANGUAGE="javascript" onclick="return DECMD_VISIBLEBORDERS_onclick()">
	 <img class="tbIcon" src="images/borders.gif" WIDTH="23" HEIGHT="22">
	</div>
	<div class="tbButton" ID="DECMD_SHOWDETAILS" TITLE="Show Details" TBTYPE="toggle" LANGUAGE="javascript" onclick="return DECMD_SHOWDETAILS_onclick()">
	 <img class="tbIcon" src="images/details.gif" WIDTH="23" HEIGHT="22">
	</div>
	
	<div class="tbSeparator"></div>

	<div class="tbButton" ID="DECMD_MAKE_ABSOLUTE" TBTYPE="toggle" LANGUAGE="javascript" TITLE="Make Absolute" onclick="return DECMD_MAKE_ABSOLUTE_onclick()">
	 <img class="tbIcon" src="images/abspos.gif" WIDTH="23" HEIGHT="22">
	</div>
	<div class="tbButton" ID="DECMD_LOCK_ELEMENT" TBTYPE="toggle" LANGUAGE="javascript" TITLE="Lock" onclick="return DECMD_LOCK_ELEMENT_onclick()">
	 <img class="tbIcon" src="images/lock.gif" WIDTH="23" HEIGHT="22">
	</div>
	
	<div class="tbSeparator"></div>
	
	<div class="tbButton" ID="DECMD_SNAPTOGRID" TITLE="Snap to Grid" TBTYPE="toggle" LANGUAGE="javascript" onclick="return DECMD_SNAPTOGRID_onclick()">
	 <img class="tbIcon" src="images/snapgrid.gif" WIDTH="23" HEIGHT="22">
	</div>
	</div>

	<div class="tbToolbar" ID="TableToolbar">
	<div class="tbButton" ID="DECMD_INSERTTABLE" TITLE="Insert Table" LANGUAGE="javascript" onclick="return TABLE_INSERTTABLE_onclick()">
	 <img class="tbIcon" src="images/instable.gif" WIDTH="23" HEIGHT="22">
	</div>
	<div class="tbButton" ID="DECMD_TBL" TITLE="Table Properties" LANGUAGE="javascript" onclick="return TABLE_UPDATETABLE_onclick()">
	 <img class="tbIcon" src="images/uptable.gif" WIDTH="23" HEIGHT="22" border="0">
 	</div>

	<div class="tbSeparator"></div>

	<div class="tbButton" ID="DECMD_INSERTROW" TITLE="Insert Row" LANGUAGE="javascript" onclick="return TABLE_INSERTROW_onclick()">
	 <img class="tbIcon" src="images/insrow.gif" WIDTH="23" HEIGHT="22">
	</div>
	<div class="tbButton" ID="DECMD_DELETEROWS" TITLE="Delete Rows" LANGUAGE="javascript" onclick="return TABLE_DELETEROW_onclick()">
	 <img class="tbIcon" src="images/delrow.gif" WIDTH="23" HEIGHT="22">
	</div>
 
	<div class="tbSeparator"></div>

	<div class="tbButton" ID="DECMD_INSERTCOL" TITLE="Insert Column" LANGUAGE="javascript" onclick="return TABLE_INSERTCOL_onclick()">
	 <img class="tbIcon" src="images/inscol.gif" WIDTH="23" HEIGHT="22">
	</div>
	<div class="tbButton" ID="DECMD_DELETECOLS" TITLE="Delete Columns" LANGUAGE="javascript" onclick="return TABLE_DELETECOL_onclick()">
	 <img class="tbIcon" src="images/delcol.gif" WIDTH="23" HEIGHT="22">
	</div>
	
	<div class="tbSeparator"></div>

	<div class="tbButton" ID="DECMD_INSERTCELL" TITLE="Insert Cell" LANGUAGE="javascript" onclick="return TABLE_INSERTCELL_onclick()">
	 <img class="tbIcon" src="images/inscell.gif" WIDTH="23" HEIGHT="22">
	</div>
	<div class="tbButton" ID="DECMD_DELETECELLS" TITLE="Delete Cells" LANGUAGE="javascript" onclick="return TABLE_DELETECELL_onclick()">
	 <img class="tbIcon" src="images/delcell.gif" WIDTH="23" HEIGHT="22">
	</div>
	<div class="tbButton" ID="DECMD_MERGECELLS" TITLE="Merge Cells" LANGUAGE="javascript" onclick="return TABLE_MERGECELL_onclick()">
	 <img class="tbIcon" src="images/mrgcell.gif" WIDTH="23" HEIGHT="22">
	</div>
	<div class="tbButton" ID="DECMD_SPLITCELL" TITLE="Split Cells" LANGUAGE="javascript" onclick="return TABLE_SPLITCELL_onclick()">
	 <img class="tbIcon" src="images/spltcell.gif" WIDTH="23" HEIGHT="22">
	</div>
	
<!-- Contentbuilder-Special features starting here ... -->
	<div class="tbSeparator"></div>

	<div class="tbButton" ID="DECMD_CBLINK" TITLE="Link to other C*B articles" LANGUAGE="javascript" onclick="return DECMD_CBLINK_onclick()">
	 <img class="tbIcon" src="images/cblink.gif" WIDTH="23" HEIGHT="22">
	</div>
<!-- end CB-Features -->
</div>

<!-- DHTML Editing control Object. This will be the body object for the toolbars. -->
<OBJECT classid="clsid:2D360201-FFF5-11d1-8D03-00A0C959BC0A" id="tbContentElement" class="tbContentElement" height=400 width=500>
</OBJECT>


<!-- DEInsertTableParam Object -->
<object ID="ObjTableInfo" CLASSID="clsid:47B0DFC7-B7A3-11D1-ADC5-006008A5848C" VIEWASTEXT>
</object>

<!-- DEGetBlockFmtNamesParam Object -->
<object ID="ObjBlockFormatInfo" CLASSID="clsid:8D91090E-B955-11D1-ADC5-006008A5848C" VIEWASTEXT>
</object>

<!-- Formular mit den hidden form fields zum Speichern und senden an den Server.  -->
<form name=upload method=post action=''>
<input type="hidden" name="itext" value="1">
</form>
<script LANGUAGE="Javascript" SRC="toolbars/toolbars.js">
</script>

</body>
</html>
Return current item: Content*Builder