Index: tmp/org.txm.backtomedia.rcp/src/vlcplayerrcp/messages.properties
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/vlcplayerrcp/messages.properties	(revision 2239)
+++ tmp/org.txm.backtomedia.rcp/src/vlcplayerrcp/messages.properties	(revision 2240)
@@ -16,9 +16,8 @@
 BackToMedia_17              = Error: this is not a transcription corpus: no ''{0}'' structure properties
 BackToMedia_19              = ENDTIME: 
 BackToMedia_25              = AUDIO/VIDEO FILE: 
-BackToMedia_26              = Error: no media file (mp3, wav, mp4 or avi) found for name: 
-BackToMedia_27              = All media files should be stored in the ''
-BackToMedia_28              = '' directory.
+BackToMedia_26              = Error: no media file (mp3, wav, mp4 or avi) found for name: {0}
+BackToMedia_27              = All media files should be stored in the ''{0}'' directory.
 BackToMedia_29              = Media file names should be ''<transcription ID>.<supported format>''
 BackToMedia_30              = Unexpected error: 
 BackToMedia_7               = TEXT ID: 
Index: tmp/org.txm.backtomedia.rcp/src/vlcplayerrcp/MessagesMP.java
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/vlcplayerrcp/MessagesMP.java	(revision 2239)
+++ tmp/org.txm.backtomedia.rcp/src/vlcplayerrcp/MessagesMP.java	(revision 2240)
@@ -18,7 +18,6 @@
 	public static String BackToMedia_25;
 	public static String BackToMedia_26;
 	public static String BackToMedia_27;
-	public static String BackToMedia_28;
 	public static String BackToMedia_29;
 	public static String BackToMedia_30;
 	public static String BackToMedia_7;
Index: tmp/org.txm.backtomedia.rcp/src/vlcplayerrcp/messages_fr.properties
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/vlcplayerrcp/messages_fr.properties	(revision 2239)
+++ tmp/org.txm.backtomedia.rcp/src/vlcplayerrcp/messages_fr.properties	(revision 2240)
@@ -16,9 +16,8 @@
 BackToMedia_17              = Erreur : pas de propriété de structure ''{0}'' trouvée
 BackToMedia_19              = TEMPS FIN : 
 BackToMedia_25              = Fichier AUDIO/VIDEO : 
-BackToMedia_26              = Error: no media file (mp3, wav, mp4 or avi) found for name: 
-BackToMedia_27              = All media files should be stored in the ''
-BackToMedia_28              = '' directory.
+BackToMedia_26              = Error: no media file (mp3, wav, mp4 or avi) found for name: {0}
+BackToMedia_27              = All media files should be stored in the ''{0}'' directory.
 BackToMedia_29              = Le nom du fichier média doit être ''<transcription ID>.<format supporté>''
 BackToMedia_30              = Erreur : 
 BackToMedia_7               = Identifiant de texte : 
Index: tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/vlcplayer/VLCPlayer.java
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/vlcplayer/VLCPlayer.java	(revision 2239)
+++ tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/vlcplayer/VLCPlayer.java	(revision 2240)
@@ -263,7 +263,7 @@
 		});
 
 		rateValueLabel = new Label(this, SWT.NONE);
-		rateValueLabel.setText("100%");
+		rateValueLabel.setText("100%");//$NON-NLS-1$
 		
 		l = new Label(this, SWT.NONE);
 		l.setText(MessagesMP.volume);
Index: tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/MediaPreferences.java
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/MediaPreferences.java	(revision 2239)
+++ tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/MediaPreferences.java	(revision 2240)
@@ -39,7 +39,7 @@
 		Shell s = d.getActiveShell();
 		MediaPreferencesDialog dialog = new MediaPreferencesDialog(s, corpus);
 		if (dialog.open() == MediaPreferencesDialog.OK) {
-			CorpusCommandPreferences commandPreferences = corpus.getProject().getCommandPreferences("backtomedia");
+			CorpusCommandPreferences commandPreferences = corpus.getProject().getCommandPreferences("backtomedia");//$NON-NLS-1$
 			for (String p : MediaPreferencesDialog.properties) {
 				commandPreferences.set(p, dialog.getProperty(p));
 			}
Index: tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/MediaPreferencesDialog.java
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/MediaPreferencesDialog.java	(revision 2239)
+++ tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/MediaPreferencesDialog.java	(revision 2240)
@@ -55,7 +55,7 @@
         Composite c = new Composite(container, SWT.NONE);
         c.setLayout(new GridLayout(3, false));
         
-        CorpusCommandPreferences commandPreferences = corpus.getProject().getCommandPreferences("backtomedia");
+        CorpusCommandPreferences commandPreferences = corpus.getProject().getCommandPreferences("backtomedia");//$NON-NLS-1$
         TXMPreferences alternative = BackToMediaPreferences.getInstance();
         
         for (String p : properties) {
Index: tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/BackToMedia.java
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/BackToMedia.java	(revision 2239)
+++ tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/BackToMedia.java	(revision 2240)
@@ -28,6 +28,7 @@
 package org.txm.backtomedia.commands.function;
 
 import java.io.File;
+import java.io.InputStream;
 import java.util.HashMap;
 
 import org.eclipse.core.commands.AbstractHandler;
@@ -35,6 +36,7 @@
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
 import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.txm.backtomedia.editors.vlcplayer.VLCPlayer;
@@ -44,10 +46,10 @@
 import org.txm.concordance.rcp.editors.ConcordanceEditor;
 import org.txm.core.preferences.TXMPreferences;
 import org.txm.objects.CorpusCommandPreferences;
+import org.txm.rcp.utils.SWTEditorsUtils;
 import org.txm.searchengine.core.SearchEngine;
 import org.txm.searchengine.cqp.AbstractCqiClient;
 import org.txm.searchengine.cqp.CQPSearchEngine;
-import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.CQPCorpus;
 import org.txm.searchengine.cqp.corpus.CorpusManager;
 import org.txm.searchengine.cqp.corpus.Property;
@@ -58,7 +60,6 @@
 
 import vlcplayerrcp.MessagesMP;
 
-// TODO: Auto-generated Javadoc
 /**
  * open the VLCPlayer Editor and go back to time 
  * @author mdecorde.
@@ -88,7 +89,7 @@
 
 		if (!(page instanceof ConcordanceEditor)) {
 			Log.fine(MessagesMP.BackToMedia_1);
-			System.out.println("Active page is not a ConcordanceEditor");
+			System.out.println("Active page is not a ConcordanceEditor"); //$NON-NLS-1$
 			return null;
 		}
 		ConcordanceEditor ce = (ConcordanceEditor) page;
@@ -108,10 +109,10 @@
 
 		// try reading project specific preferences
 		//TODO see with SJ how to implement the "command > project > preferences > default preferences" preference order
-		CorpusCommandPreferences commandPreferences = corpus.getProject().getCommandPreferences("backtomedia");
-		String structurePropertyName = commandPreferences.get(BackToMediaPreferences.STRUCTURE, alternative); //$NON-NLS-1$
-		String startPropertyName = commandPreferences.get(BackToMediaPreferences.STRUCTURE_START_PROPERTY, alternative); //$NON-NLS-1$
-		String endPropertyName = commandPreferences.get(BackToMediaPreferences.STRUCTURE_END_PROPERTY, alternative); //$NON-NLS-1$
+		CorpusCommandPreferences commandPreferences = corpus.getProject().getCommandPreferences("backtomedia"); //$NON-NLS-1$
+		String structurePropertyName = commandPreferences.get(BackToMediaPreferences.STRUCTURE, alternative);
+		String startPropertyName = commandPreferences.get(BackToMediaPreferences.STRUCTURE_START_PROPERTY, alternative);
+		String endPropertyName = commandPreferences.get(BackToMediaPreferences.STRUCTURE_END_PROPERTY, alternative);
 		String sync_mode = commandPreferences.get(BackToMediaPreferences.SYNCMODE, alternative);
 		String media_directory = commandPreferences.get(BackToMediaPreferences.MEDIA_DIRECTORY, alternative);
 		String media_format = commandPreferences.get(BackToMediaPreferences.MEDIA_FORMAT, alternative);
@@ -199,13 +200,13 @@
 				}
 			}
 
-			//				try {
-			//					startTime = (int)Float.parseFloat(sStartTime);
-			//					endTime = (int)Float.parseFloat(sEndTime);
-			//				} catch(Exception e2) {
-			//					System.out.println("Error: time format must be an Integer, unit is second. Found "+sStartTime);
-			//					return null;
-			//				}
+			//try {
+			//	startTime = (int)Float.parseFloat(sStartTime);
+			//	endTime = (int)Float.parseFloat(sEndTime);
+			//} catch(Exception e2) {
+			//	System.out.println("Error: time format must be an Integer, unit is second. Found "+sStartTime);
+			//	return null;
+			//}
 
 			File binDir = corpus.getProject().getProjectDirectory();
 			File audioFile = null;
@@ -213,8 +214,35 @@
 				IEclipsePreferences node = corpus.getProject().getPreferencesScope().getNode(media_index);
 				String path = node.get(textid, null);
 				audioFile = new File(path);
+				if (path.startsWith("http:/")) {
+					try {
+						InputStream conn = audioFile.toURI().toURL().openStream();
+						conn.close();
+					} catch(Exception e) {
+						Log.info("Could not open media file: "+path);
+					}
+				} else if (!audioFile.exists()) {
+					Log.info("Media file register in the index not found: "+audioFile);
+					return null;
+				}
 			} else if (media_directory != null && media_directory.length() > 0 && media_format != null && media_format.length() > 0) {
 				audioFile = new File(media_directory, textid+"."+media_format); //$NON-NLS-1$
+				if (media_directory.startsWith("http:/")) {
+					try {
+						InputStream conn = audioFile.toURI().toURL().openStream();
+						conn.close();
+					} catch(Exception e) {
+						Log.info("Could not open media file: "+audioFile);
+					}
+				} else { // local
+					if (!new File(media_directory).exists()) {
+						Log.info("Media directory not found: "+media_directory);
+						return null;
+					} else if (!audioFile.exists()) {
+						Log.info("Media file not found: "+audioFile);
+						return null;
+					}
+				}
 			} else {
 				File mediaDir = new File(binDir, "media"); //$NON-NLS-1$
 				audioFile = new File(mediaDir, textid+".mp3"); //$NON-NLS-1$
@@ -224,14 +252,15 @@
 				if (!audioFile.exists()) audioFile = new File(mediaDir, textid+".avi"); //$NON-NLS-1$
 				if (!audioFile.exists()) audioFile = new File(mediaDir, textid+".mov"); //$NON-NLS-1$
 				if (!audioFile.exists()) {
-					System.out.println(MessagesMP.BackToMedia_26+textid);
-					System.out.println(MessagesMP.BackToMedia_27+mediaDir+MessagesMP.BackToMedia_28);
+					System.out.println(NLS.bind(MessagesMP.BackToMedia_26, textid));
+					System.out.println(NLS.bind(MessagesMP.BackToMedia_27, mediaDir));
 					System.out.println(MessagesMP.BackToMedia_29);
+					return null;
 				}
 			}
 
 			Log.fine(MessagesMP.BackToMedia_25+audioFile);
-
+			
 			//System.out.println("Linked editors: "+associatedEditors);
 			VLCPlayerEditor editor = associatedEditors.get(ce); 
 			String path = audioFile.getPath();
@@ -241,18 +270,26 @@
 			} else {
 				//System.out.println("new editor linked to "+ce);
 				editor = OpenVLCPlayer.openEditor(path, sStartTime, sEndTime);
+				
 				//editor.getPlayer().setRepeat(true);
 				if (editor == null) {
 					return null;
 				}
+				
+				// move the editor in the window
+				int position = BackToMediaPreferences.getInstance().getInt(BackToMediaPreferences.BACKTOMEDIA_POSITION);
+				SWTEditorsUtils.addEditor(editor, ce, position);
+				
 				VLCPlayer player = editor.getPlayer();
 				if (player != null) {
 					player.hideStopButton();
 					associatedEditors.put(ce, editor);
 				}
 			}
-			if (audioFile != null)
+			
+			if (audioFile != null) {
 				editor.setPartName(audioFile.getName());
+			}
 			return null;
 
 		} catch (Exception e2) {
Index: tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/OpenVLCPlayer.java
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/OpenVLCPlayer.java	(revision 2239)
+++ tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/OpenVLCPlayer.java	(revision 2240)
@@ -32,6 +32,7 @@
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.dialogs.InputDialog;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.FileDialog;
@@ -73,14 +74,19 @@
 			System.out.println(MessagesMP.select_object+s);
 		}
 
-		FileDialog fd = new FileDialog(new Shell(), SWT.SAVE);
-		fd.setText(MessagesMP.select_file);
+		Shell sh = HandlerUtil.getActiveShell(event);
+		InputDialog fd = new InputDialog(sh, "Opening media file...", "Enter file path or URL", "", null);
+		//FileDialog fd = new FileDialog(new Shell(), SWT.SAVE);
+		//fd.setText(MessagesMP.select_file);
 
-		String[] filterExt = { "*.*", "*.mp3", "*.ogg", "*.avi", "*.mp4", "*.mov"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		fd.setFilterExtensions(filterExt);
-		String mrl = fd.open();
-		if (mrl != null)
-			openEditor(mrl, 0);
+		//String[] filterExt = { "*.*", "*.mp3", "*.ogg", "*.avi", "*.mp4", "*.mov"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		//fd.setFilterExtensions(filterExt);
+		if (fd.open() == fd.OK) {
+			 String mrl = fd.getValue();
+						if (mrl != null)
+							openEditor(mrl, 0);
+		}
+		
 		return null;
 	}
 
@@ -149,5 +155,4 @@
 		
 		return null;
 	}
-
 }
\ No newline at end of file
Index: tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/preferences/BackToMediaPreferencePage.java
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/preferences/BackToMediaPreferencePage.java	(revision 2239)
+++ tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/preferences/BackToMediaPreferencePage.java	(revision 2240)
@@ -27,6 +27,7 @@
 //
 package org.txm.backtomedia.preferences;
 
+import org.eclipse.e4.ui.workbench.modeling.EModelService;
 import org.eclipse.jface.preference.BooleanFieldEditor;
 import org.eclipse.jface.preference.FieldEditor;
 import org.eclipse.jface.preference.StringFieldEditor;
@@ -62,6 +63,7 @@
 	 * The display parts count in chart title state.
 	 */
 	private BooleanFieldEditor loopProperty;
+	private ComboFieldEditor backtotext_position;
 	private ComboFieldEditor useWordProperty;
 	private StringFieldEditor defaultStructure;
 	private StringFieldEditor defaultStructureStartProperty;
@@ -107,6 +109,10 @@
 		
 		addField(useWordProperty);
 		
+		String[][] values = {{"ABOVE", ""+EModelService.ABOVE}, {"BELOW", ""+EModelService.BELOW}, {"LEFT_OF", ""+EModelService.LEFT_OF}, {"RIGHT_OF", ""+EModelService.RIGHT_OF}};
+		backtotext_position = new ComboFieldEditor(BackToMediaPreferences.BACKTOMEDIA_POSITION, "new editor position", values, getFieldEditorParent());
+		addField(backtotext_position);
+		
 		spanGroup = new Group(getFieldEditorParent(), SWT.NONE);
 		spanGroup.setText(MessagesMP.BackToMediaPreferencePage_3);
 		GridData gridData2 = new GridData(SWT.FILL, SWT.FILL, true, false);
Index: tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/preferences/BackToMediaPreferences.java
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/preferences/BackToMediaPreferences.java	(revision 2239)
+++ tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/preferences/BackToMediaPreferences.java	(revision 2240)
@@ -1,6 +1,7 @@
 package org.txm.backtomedia.preferences;
 
 import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.e4.ui.workbench.modeling.EModelService;
 import org.osgi.framework.FrameworkUtil;
 import org.osgi.service.prefs.Preferences;
 import org.txm.core.preferences.TXMPreferences;
@@ -30,6 +31,10 @@
 
 	public static final String MEDIA_INDEX_NODE = "media_index_node";
 	
+	/**
+	 * one of the EModelService position constant to use when opening editor: 	ABOVE = 0 BELOW = 1 LEFT_OF = 2 RIGHT_OF = 3
+	 */
+	public static final String BACKTOMEDIA_POSITION = "backtomedia_position"; //$NON-NLS-1$
 	
 	public BackToMediaPreferences() {
 		// TODO Auto-generated constructor stub
@@ -46,6 +51,7 @@
 		preferences.put(STRUCTURE_START_PROPERTY, "start");
 		preferences.put(STRUCTURE_END_PROPERTY, "end");
 		preferences.put(WORD_PROPERTY, "time");
+		preferences.putInt(BACKTOMEDIA_POSITION, EModelService.ABOVE);
 	}
 	
 	/**
