tTheme("ace/theme/" + theme);
		var detectMode = getMode(filepath);
		//console.log("[NotepadA] Chaning mode to " + detectMode.toLowerCase());
		if ( detectMode != undefined){
			editor.session.setMode("ace/mode/" + detectMode.toLowerCase());
			
		}else{
			//Default mode: php
			editor.session.setMode("ace/mode/php");
		}
		editor.setOptions({
			//fontFamily: "tahoma",
			fontSize: fontsize + "pt"
		});

		lastSave = editor.getValue();
	}
	
	
	//Listener for Ctrl+S
	$(window).keypress(function(event) {
	