var	_edit = window.top._edit;

//var __path_prefix__ = "/servlet/CMServeRES";
var __is_internal__ = true;

function init(documentId) {
	if (_edit != null) {
		_edit.documentId = documentId;
		_edit.previewLoaded();
	}
	deactivateForms();
}

function initMozEdit(documentId) {
	_edit.documentId = documentId;
	_edit.documentLoaded();
	deactivateForms();
}

function displayFormHint() {
	alert("In der Vorschau ist das Abschicken von Formularen deaktiviert!");
	return false;
}

function deactivateForms() {
	var theForms = document.forms;
	for (var i = 0; i < theForms.length ; i++) {
//		if (theForms[i].name == "w2002form")
//			continue;
		theForms[i].onsubmit = displayFormHint;
	}
}

function changePage(documentId, mode) {
	if (_edit != null) {
		_edit.changePage(documentId, mode);
	} else {
		window.document.location.href = "/servlet/Show?show=Preview1&document=" + documentId;
	}
}

function moveToParent() {
	var siteDoc 	= window.top.getSiteDocument();
	var page 		= siteDoc.getElementById(window.top.currentPage);
	var parentPage 	= page.parentNode;

	if (parentPage != null) {
		var pId = parentPage.getAttribute("ID");
		if (pId)
			changePage(pId);
	}
}

function n() {}
