﻿function insertValue(chaineAj) {
var myForm = document.Pseudo.text;
if (document.Pseudo.text.selectionStart || document.Pseudo.text.selectionStart == "0") {
var startPos = document.Pseudo.text.selectionStart;
var endPos = document.Pseudo.text.selectionEnd;
var chaine = document.Pseudo.text.value;

myForm.value = chaine.substring(0, startPos) + chaineAj + chaine.substring(endPos, chaine.length);
} else {
myForm.value += chaineAj;
}
}	
	
	
	
/*Fonction selectionner et copier sous IE, et selectionner seul pour firefox */

var copytoclip=1

function HighlightAll(theField) {
var tempval=eval("document."+theField)
tempval.focus()
tempval.select()

if (document.all&&copytoclip==1){

therange=tempval.createTextRange()

therange.execCommand("Copy")

window.status="Contenu copié si tu es sous IE (sous firefox copier manuellement avec CTRL + C)"

setTimeout("window.status=''",1800)

}

}