/*
 * Show the popup with advanced options
 * */
function textShowAdvancedOptions(icon) {

	overlib($('advancedTextOptions').innerHTML,
		LEFT,
		STICKY,
		FIXX, $(icon).getLeft()-76,
		FIXY, $(icon).getTop()+8,
		WIDTH, 84
	);

	$('overDiv').setStyle({'zIndex':9000});
	$('overDiv').show();
}

/*
 * called when an 'advanced option' was clicked.
 * */
function textClickAdvancedOption(text) {
	if(Controls.getGlobal('focus') && Controls.getGlobal('focus').child.controls.text) {
		insertText(text,Controls.getGlobal('focus').child.controls.text);
		Controls.getGlobal('focus').onChange(null,'text','direct');

		nd();
		nd();
	}
}

/*
 * Hides the options popup
 * */
function textHideAdvancedOptions() {
	nd();
	nd();
}