function popup(page,largeur,hauteur) {
		window.open(page, 'diapo', 'resizable=yes, location=no, width='+largeur+', height='+hauteur+', status=no, scrollbars=yes, menubar=no') ;
		return false ;
		}
		
function popupaction(page,largeur,hauteur) {
		window.open(page, 'diapo', 'resizable=yes, location=no, width='+largeur+', height='+hauteur+', status=no, scrollbars=yes, menubar=no')
		}
		
function pluspop(page,nom,largeur,hauteur) {
		window.open(page, nom, 'resizable=yes, location=no, width='+largeur+', height='+hauteur+', status=no, scrollbars=yes, menubar=no, left=100, top=100');
		}
function plus(nom,page) {
		document.forms[nom].action = page;
		document.forms[nom].submit();
		}

function selectionne(valeur,vers) {
		vers.value = valeur;
		//opener.document.forms[copie].cible.value=valeur;
		window.close();
		}

function selectsystem(vers1,valeur1,vers2,valeur2) {
		vers1.value = valeur1;
		vers2.value = valeur2;
		window.close();
		}

function action(page) {
		if ( opener.document.location == page || page == '' ) {
			opener.document.location.reload();
			}
		else {
			opener.document.location=page;
			}
		window.close();

		return false ;
		}

function formaction(nom,page,charge) {
		document.forms[nom].action = page;
		document.forms[nom].submit();
		if ( opener.document.location == charge || charge == '' ) {
			opener.document.location.reload();
			}
		else {
			opener.document.location=charge;
			}
		window.close();
		}

function redim_img(img) {
	var oImg = new Image();
	oImg.src = img.src;
	if ( oImg.width > 400 ) {
		var rapport = oImg.width / 400;
		img.width = 400;
		img.height = oImg.height/rapport;
		}
	return true;
	}

function rollover(name,src) { document.images[name].src=src; }

function load() {
	if (document.images) {
		this.length=load.arguments.length;
		for (var i=0;i<this.length;i++) {
			this[i+1]=new Image();
			this[i+1].src=load.arguments[i];
		}
	}
}



function oninfos(info) {
	document.getelementbyid('infosbox').write(info);
	}
	
function offinfos() {
	document.getelementbyid('infosbox').write('');
	}

function gras(area) {
	TextToInsert=prompt("Tapez dans la fenêtre le texte à mettre en gras.","Tapez votre texte ici");
	if (TextToInsert != null) {
		area.value+="[b]"+TextToInsert+"[/b]";
		} else {
			area.focus();
		}
}
function italique(area) {
	TextToInsert=prompt("Tapez dans la fenêtre le texte à mettre en italique.","Tapez votre texte ici");
	if (TextToInsert != null) {
		area.value+="[i]"+TextToInsert+"[/i]";
		} else {
			area.focus();
		}
}
function souligne(area) {
	TextToInsert=prompt("Tapez dans la fenêtre le texte à souligner.","Tapez votre texte ici");
	if (TextToInsert != null) {
		area.value+="[u]"+TextToInsert+"[/u]";
		} else {
			area.focus();
		}
}
function centre(area) {
	TextToInsert=prompt("Tapez dans la fenêtre le texte à centrer.","Tapez votre texte ici");
	if (TextToInsert != null) {
		area.value+="[center]"+TextToInsert+"[/center]";
		} else {
			area.focus();
		}
}
function taille(area) {
	Taille=prompt("Indiquez la taille : 1 (grand), 2, 3 ou 4 (petit).","1");
	if (Taille != null) {
				TextToInsert=prompt("Tapez dans la fenêtre le texte.","Tapez votre texte ici");
				if (TextToInsert != null) {
			area.value+="["+Taille+"]"+TextToInsert+"[/"+Taille+"]";
		} else {
			area.focus() ;
		}
	} else {
		area.focus();
	}
}
function image(area) {
	LinkURL=prompt("Adresse pour une image.","http://");
	if (LinkURL != null) {
		area.value+="[img="+LinkURL+"]";
	} else {
		area.focus() ;
	}
}
function exturl(area) {
	LinkURL=prompt("Insérer un lien externe.","http://");
	if (LinkURL != null) {
		LinkDescription=prompt("Description du lien.",LinkURL);
		if (LinkDescription != null) {
			area.value+="[exturl="+LinkURL+"]"+LinkDescription+"[/url]";
		} else {
			area.focus();
		}
	} else {
		area.focus(area);
	}
}
function inturl() {
	LinkURL=prompt("Insérer un lien interne.","http://");
	if (LinkURL != null) {
		LinkDescription=prompt("Description du lien.",LinkURL);
		if (LinkDescription != null) {
			area.value+="[inturl="+LinkURL+"]"+LinkDescription+"[/url]";
		} else {
			area.focus(area);
		}
	} else {
		area.focus();
	}
}
function email(area) {
	EmailAddress=prompt("Insérer une adresse e-mail.","votrenom@domaine.com");
	if (EmailAddress != null) {
		area.value+="[mail="+EmailAddress+"]"+EmailAddress+"[/url]";
	} else {
		area.focus() ;
	}
}
function color(area,color) {
	if ( color != '' ) {
		ColorText=prompt("Texte coloré.","votre texte");
		if (ColorText != null) {
			area.value+="[color="+color+"]"+ColorText+"[/color]";
			} else {
			area.focus() ;
			}
	}
}

function onhelpmsg(area,msg) {
	area.help.value = msg;
	}

function offhelpmsg(area) {
	area.help.value = '';
	}

function smiley(area,smile) {
	area.value += ' '+smile+' ';
	area.focus();
	}

function confirmaction(msg) {
	var is_confirm = confirm(msg);
	return is_confirm;
	}
