
function emoticon(text) {
	var txtarea = document.messliv.messageliv;
	text = ' ' + text + ' ';
	if (txtarea.createTextRange && txtarea.caretPos) {
		var caretPos = txtarea.caretPos;
		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text;
		txtarea.focus();
	} else {
		txtarea.value  += text;
		txtarea.focus();
	}
}
function emoticon2(text) {
	var txtarea = document.ecrireunereview.redaction;
	text = ' ' + text + ' ';
	if (txtarea.createTextRange && txtarea.caretPos) {
		var caretPos = txtarea.caretPos;
		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text;
		txtarea.focus();
	} else {
		txtarea.value  += text;
		txtarea.focus();
	}
}
function emoticon3(text) {
	var txtarea = document.ecrireunereview.description;
	text = ' ' + text + ' ';
	if (txtarea.createTextRange && txtarea.caretPos) {
		var caretPos = txtarea.caretPos;
		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text;
		txtarea.focus();
	} else {
		txtarea.value  += text;
		txtarea.focus();
	}
}
function emoticon4(text) {
	var txtarea = parent.document.etape3.redaction;
	text = ' ' + text + ' ';
	if (txtarea.createTextRange && txtarea.caretPos) {
		var caretPos = txtarea.caretPos;
		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text;
		txtarea.focus();
	} else {
		txtarea.value  += text;
		txtarea.focus();
	}
}

function cpt_char(val)
 {
	var max = 599;
	if(val.value.length > max)
	{
		val.value = val.value.substring(0,max);
		alert('Vous avez atteint le nombre maximal de caractères');
		return false;
	}
 }

function cpt_ils(val)
 {
	var max = 20;
	if(val.value.length > max)
	{
		val.value = val.value.substring(0,max);
		alert('Vous avez atteint le nombre maximal de caractères');
		return false;
	}
 }

function cpt_submit(val)
 {
       var min = 5;
	if(val.value.length < min)
	{
		alert('Vous devez inscrire plus de 5 caracteres');
		val.value = " ";
		return false;
	}
 }

function Avatars(page) {
var win;
win=window.open(page, "Avatars", "toolbar=no, status=yes, scrollbars=yes, resizable=no, width=690, height=450, top=200, left=200");
win.setTimeout("window.close()",1000000);
}

var urlAddress = "http://www.abandonware-paradise.fr/";
var pageName = "Abandonware-Paradise, les meilleurs jeux des années 1980 à 1995.";
 function addToFavorites(anchor)
 {
 if (window.external)
 {
 window.external.AddFavorite(anchor.getAttribute('href'), anchor.getAttribute('title'));
 }
 } 

function goTo() {
var sE = null, url;
if(document.getElementById) {
sE = document.getElementById('urlList');
} else if(document.all) {
sE = document.all['urlList'];
}
if(sE && (url = sE.options[sE.selectedIndex].value)) {
location.href = url;
}
}

function goOn() {
var sE = null, url;
if(document.getElementById) {
sE = document.getElementById('urlList2');
} else if(document.all) {
sE = document.all['urlList2'];
}
if(sE && (url = sE.options[sE.selectedIndex].value)) {
location.href = url;
}
}