<!--
var timeoutIdEdit = 0;
var whichOn = new Object();

function editEditor(id, type) {
	popEdit('editor_edit.jsp?id=' + id + '&type=' + type + '&action=edit&url=' + window.location);
}

function deleteEditor(id) {
	popEdit('editor_submit.jsp?id=' + id + '&action=delete&url=' + window.location);
}

function insertSiblingEditor(familyId, familyType) {
	popEdit('editor_edit.jsp?familyId=' + familyId + '&type=' + familyType + '&familyType=' + familyType + '&action=addSibling&url=' + window.location);
}

function insertChildEditor(familyId, type, familyType) {
	popEdit('editor_edit.jsp?familyId=' + familyId + '&type=' + type + '&familyType=' + familyType + '&action=addChild&url=' + window.location);
}

function moveUpEditor(id) {
	popEdit('editor_submit.jsp?id=' + id + '&action=moveUp&url=' + window.location);
}

function moveDownEditor(id) {
	popEdit('editor_submit.jsp?id=' + id + '&action=moveDown&url=' + window.location);
}

function saveEditor() {
	if(confirm('Are you sure you want to post all changes? This cannot be undone.')) {
		document.location = 'editor.jsp?save=true';
	}
}
function discardEditor() {
	if(confirm('WARNING: This will delete all changes. This cannot be undone.')) {
		document.location = 'editor.jsp?discard=true';
	}
}

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);
		//alert(obj);
		obj.style.visibility = theVis;
   	} else if (isNS6==true && false){
        	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);
}

//-->