if ($page_state == "start")
			syncronizeLanguage ($oid);

		for ($i = 0; $i < count($items); $i++) {
			$specialID = $items[$i];

			$editPanel->add(new Label("lbl", "<b>Translate: </b>" . getDBCell("internal_resources", "VALUE", "RESID='" . $items[$i] . "' AND LANGID='EN'"), "standardlight", 2));
			$editPanel->add(new TextInput($items[$i], "internal_resources", "VALUE", "RESID='" . $items[$i] . "' AND LANGID='$oid'", "type:textarea,size:2,width:400"));
			$editPanel->add(new TextInput("Tooltip", "internal_resources", "TOOLTIP", "RESID='" . $items[$i] . "' AND LANGID='$oid'", "type:textarea,size:2,width:400"));
			$editPanel->add(new Separator());
		}

		$editPanel->add(new FormButtons(true));
		$editPanel->add(new Hidden("oid", $oid));
		// add the panel to the form and the form to the page.
		$form->addPanel($editPanel);
		$page->add($form);
	} else {
		$form = new Form($lang->get("stats", "Statistics"));

		$page_action = "UPDATE";
		$langs = createDBCArray("internal_resources_languages", "LANGID", "1");

		for ($i = 0; $i < count($langs); $i++) {
			if ($vs != "0")
				syncronizeLanguage ($langs[$i]);

			$langname = getDBCell("internal_resources_languages", "NAME", "LANGID = '" . $langs[$i] . "'");
			$form->add(new Label("lbl", "Statistics for " . $langname, "standard", 2));
			$translated = countRows("internal_resources", "RESID", "LANGID='" . $langs[$i] . "' AND VALUE IS NOT NULL AND VALUE <>''");
			$nottranslated1 = countRows("internal_resources", "RESID", "LANGID='" . $langs[$i] . "' AND VALUE IS NULL");
				$propPanel->add(new Hidden("processing", "yes"));

				$propPanel->add($oname);
				$propPanel->add(new SelectMultiple2Input($lang->get("variations"), "cluster_variations", "VARIATION_ID", $cond . " AND DELETED=0", "variations", "NAME", "VARIATION_ID", "DELETED=0"));
				$propPanel->add(new Hidden("action", "objectprop"));
				$propPanel->add(new FormButtons(true, true));
				$handler = new ActionHandler("UPDATE");
				$handler->addFncAction("syncClusterVariations");
				$propPanel->registerActionHandler($handler);
			} else if ($view == $pos_metaPanel && ($aclf->checkAccessToFunction("ED_CL_META_DATA"))) {
				require_once $c["path"] . "modules/common/panel_meta.inc.php";
			}

			// Build form
			if ($aclf->checkAccessToFunction("EDIT_CL_CONTENT"))
				$form->addPanel($clusterPanel);

			if ($aclf->checkAccessToFunction("ED_CL_META_DATA"))
				$form->addPanel($metaPanel);

			if ($aclf->checkAccessToFunction("CL_PROPS"))
				$form->addPanel($propPanel);

			$page->add($form);
		}
	}

	if (!$handled) {				
			$variation = variation();
			$go = "view";
			
 		if ($ref != "") {
 			$ref->edit($editpanel);
 		} else {
 			$editpanel->add(new Label("std", $lang->get("error_init", "Could not initialize the content"), "standardlight"));
 		}
 
 		// Description
 		$editpanel->add(new Subtitle("st", $lang->get("content_desc", "Description of Content")));
 		//$editpanel->add(new TextInput($lang->get("description"), "content", "DESCRIPTION", $cond, "type:textarea,width:300,size:3", ""));
 		$editpanel->add(new TextInput($lang->get("keywords"), "content", "KEYWORDS", $cond, "type:textarea,width:300,size:3", ""));
 		// MetaData 
 		$editpanel->add(new Hidden("resetfilter", '1'));        		
 		$editpanel->add(new MetaDataEditor($oid, $template, 2));
 		$editpanel->add(new FormButtons());
 
 		$form->addPanel($editpanel);
 	}
 
 	if ($aclf->checkAccessToFunction("OBJECT_PROPS")) {
 		// Properties
 		$proppanel = new Panel($lang->get("properties", "Properties"));
 
 		$proppanel->add(new Subtitle("st", $lang->get("properties", "Properties")));
 		$proppanel->add(new FolderDropdown($lang->get("r_parent"), "content", "CATEGORY_ID", $cond));
 		$proppanel->add(new SelectMultiple2Input($lang->get("variations"), "content_variations", "VARIATION_ID", $cond . " AND DELETED=0", "variations", "NAME", "VARIATION_ID", "DELETED=0"));
 		$proppanel->add(new SelectOneInput($lang->get("metatemplate"), "content", "MT_ID", "meta_templates", "NAME", "MT_ID", "INTERNAL=0 AND VERSION=0", $cond, "type:dropdown", "MANDATORY"));
 		$proppanel->add(new NonDisplayedValue("content", "LAST_MODIFIER", $cond, $auth->user, "TEXT"));
 		$proppanel->add(new NonDisplayedValue("content", "LAST_MOD_DATE", $cond, "", "TIMESTAMP"));		
 		$handler = new ActionHandler("UPDATE");
 		$handler->addFncAction("syncVariations");
 		$proppanel->registerActionHandler($handler);