<!--


var timeoutIdEdit = 0;
var whichOn = new Object();

function signoutEditor(dirty) {
	if(dirty) {
		if(confirm('If you sign out now, your changes will be lost. Are you sure you want to sign out without saving your changes?')) {
			document.location.replace('edit/Signin.jsp?signOut=true');
		}
	} else {
		document.location.replace('edit/Signin.jsp?signOut=true');
	}
}

function editEditor(idE, xmlName) {
	popEdit('edit/Edit.jsp?idE=' + idE + '&xmlName=' + xmlName + '&action=edit&url=' + window.location);
}

function deleteEditor(idE, xmlName) {
	if(confirm("Are you sure you want to delete this item?")) {
	popEdit('edit/Submit.jsp?idE=' + idE + '&xmlName=' + xmlName + '&action=delete&url=' + window.location);
	}
}

function moveUpEditor(idE, xmlName) {
	popEdit('edit/Submit.jsp?idE=' + idE + '&xmlName=' + xmlName + '&action=moveUp&url=' + window.location);
}

function moveDownEditor(idE, xmlName) {
	popEdit('edit/Submit.jsp?idE=' + idE + '&xmlName=' + xmlName + '&action=moveDown&url=' + window.location);
}

function showEditor(idE, xmlName) {
	popEdit('edit/Submit.jsp?idE=' + idE + '&xmlName=' + xmlName + '&action=show&url=' + window.location);
}

function hideEditor(idE, xmlName) {
	popEdit('edit/Submit.jsp?idE=' + idE + '&xmlName=' + xmlName + '&action=hide&url=' + window.location);
}

function insertSiblingEditor(idE, xmlName, type) {
	popEdit('edit/Edit.jsp?idE=' + idE + '&xmlName=' + xmlName + '&type='+ type + '&action=addSibling&url=' + window.location);
}

function insertChildEditor(idE, xmlName, type) {
	popEdit('edit/Edit.jsp?idE=' + idE + '&xmlName=' + xmlName + '&type='+ type + '&action=addChild&url=' + window.location);
}


function previewEditor() {
	popEdit('edit/Submit.jsp?action=preview&url=' + window.location);
}
function editviewEditor() {
	popEdit('edit/Submit.jsp?action=editview&url=' + window.location);
}
function saveEditor() {
	if(confirm('Are you sure you want to post all changes? This cannot be undone.')) {
		popEdit('edit/Submit.jsp?action=save&url=' + window.location);
	}
}
function discardEditor() {
	if(confirm('WARNING: This will delete all changes. This cannot be undone.')) {
		popEdit('edit/Submit.jsp?action=discard&url=' + window.location);
	}
}


function popEdit(url) {
	var dx=700;
	var dy=400;
	var w = window.open(url, 'editor', 'width=' + dx + ',height=' + dy + ',status=no,resizable=yes,menubar=yes,location=no,scrollbars=yes,toolbar=no');
	w.focus();
}

function editMenuOn(which) {
	
	theVis = 'visible';
	if (isIE4==true){
		obj = eval('document.all.'+which);
		obj.visibility = theVis;
	} else if(isIE5==true){
		obj = eval('document.all.'+which);
		obj.style.visibility = theVis;
   	} else {
        	obj = document.getElementById(which);
        	obj.style.visibility = theVis;
   	}
	whichOn = obj;
}

function editMenuOff() {
	if(whichOn.style) {
		whichOn.style.visibility = 'hidden';
	}
}

function editMenuOver(which) {
	editMenuOff();
	editMenuOn(which);
	clearTimeout(timeoutIdEdit);
}

function editMenuOut(which) {
	timeoutIdEdit = setTimeout('editMenuOff()',1300);
}

function getContent2(element) {
	//getContent(element);
	//alert(element.value);
	return getContent(element);
}

//-->