/*
 * ExtJS functions 
 *
 * NOTES:
 */

// Special function for Editor objects - find all child widgets and run func
function sf_run_func_on_editors(node, func) {
	
	// looking thru ext components for TinyMCE editors
	var components = Ext.ComponentMgr.all.items;
	for (i=0; i < components.length; ++i) {
   		if (typeof(components[i].ed) == "object" ) {
    		components[i].syncValue();
   		} 
	}
}


function sf_pre_submit(nodename) {
	sf_run_func_on_editors(null,null);
}


function sf_ajax_beforeload(nodename) {
	return;
}


function sf_ajax_update(nodename, tabname, resizeToViewport) {
	return;
}

var pictureResizer = function(name) {
		
 	new Ext.Resizable(name, {
		wrap:true,
		transparent: true,
		minWidth:50,
		minHeight: 50,
		maxWidth: 800,
		maxHeight: 800,
		preserveRatio: true
	});
}

