function ch(opt){
  ecr(opt,'option');
}

function ecr(text,id){
var txt = '&nbsp;<b>OPTIONS<\/b> :<br> - <a href="#" onClick="va(&#39;' + text + '&#39;); return false">' + text + '<\/a> <br>Collatinus-Lexique Jeanneau<br>(cf. cr&eacute;dits en bas de page).<br> - Rechercher la <u>forme</u> <b>' + text + '</b> dans la <a href="#" onClick="vi(&#39;' + text + '&#39;); return false">litt&eacute;rature latine<\/a>, ou chez <a href="#" onClick="vib(&#39;' + text + '&#39;); return false">Tite-Live<\/a> seulement.<br> - Consulter la <a href="#" onClick="vob(&#39;occur.html&#39;); return false">table de fr&eacute;quence des <u>mots</u><\/a> (chap. 12 à 17).';
  if (document.getElementById){
    ot = document.getElementById(id);
    ot.innerHTML = txt;
  }
  else if (document.all){
    ot = document.all[id];
    ot.innerHTML = txt;
  }
  else if (document.layers){
    ot = document.layers[id];
    text2 = '<p class="optionclass" style="margin-left: 4em">' + txt + '<\/p>;';
    ot.document.open();
    ot.document.write(text2);
    ot.document.close();
  }
}

	var ana = '';

function va(entree2) {
 if (ana) ana.close();
    ana=window.open('http://collatinus.fltr.ucl.ac.be/jcoll.php?forme=m:' + entree2 + '','','height=300,width=650,screenX=0,left=0,screenY=0,top=0,directories=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0');
		if (window.focus) {ana.focus()} 
}

function vi(entree3) {
 if (ana) ana.close();
    ana = window.open('coll.html','','height=300,width=650,screenX=0,left=0,screenY=0,top=0,directories=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0');
		ana.document.open();
		ana.document.write('<html><head>');
		ana.document.write('<meta http-equiv="Content-Type" content="text\/html"><\/head>');
		ana.document.write('<body><h4>Patience, la page de r&eacute;sultat va appara&icirc;tre...<\/h4><br><img src="fichiers/sys.gif" alt="patienter" border="0"><br>');
		ana.document.write('<form method="POST" action="http://www.picosearch.com/cgi-bin/ts.pl" name="rech" style="display: none; visibility: hidden;"><select name="opt">');
		ana.document.write('<option selected value="ANY">Chercher au moins un mot</option>');
		ana.document.write('<\/select><input type="HIDDEN" name="index" value="123844"><a href="http://www.picosearch.com/" target="_top">');
		ana.document.write('<img border="0" src="http://www.picosearch.com/picosmall9.gif" alt="PicoSearch"><\/a><input type="TEXT" name="query" value="' + entree3 + '">');
		ana.document.write('<input type="submit" value="Rechercher" name="SEARCH"><\/form>');
		ana.document.write('<\/body><\/html>');
		ana.document.close();
		ana.document.rech.submit();
 if (window.focus) {ana.focus()}
}

function vib(entree31) {
 if (ana) ana.close();
    ana = window.open('coll.html','','height=300,width=650,screenX=0,left=0,screenY=0,top=0,directories=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0');
		ana.document.open();
		ana.document.write('<html><head>');
		ana.document.write('<meta http-equiv="Content-Type" content="text\/html"><\/head>');
		ana.document.write('<body><h4>Patience, la page de r&eacute;sultat va appara&icirc;tre...<\/h4><br><img src="fichiers/sys.gif" alt="patienter" border="0"><br>');
		ana.document.write('<form method="POST" action="http://www.picosearch.com/cgi-bin/ts.pl" name="rech" style="display: none; visibility: hidden;"><select name="opt">');
		ana.document.write('<option selected value="ALL">Chercher au moins un mot</option>');
		ana.document.write('<\/select><input type="HIDDEN" name="index" value="123844"><a href="http://www.picosearch.com/" target="_top">');
		ana.document.write('<img border="0" src="http://www.picosearch.com/picosmall9.gif" alt="PicoSearch"><\/a><input type="TEXT" name="query" value="titi livi ab urbe condita ' + entree31 + '">');
		ana.document.write('<input type="submit" value="Rechercher" name="SEARCH"><\/form>');
		ana.document.write('<\/body><\/html>');
		ana.document.close();
		ana.document.rech.submit();
	if (window.focus) {ana.focus()}
}

function vo(url) {
 if (ana) ana.close();
    ana = window.open(url,'','height=300,width=700,screenX=0,left=0,screenY=0,top=0,directories=1,location=1,menubar=1,resizable=1,scrollbars=1,status=1,toolbar=1');	
		if (window.focus) {ana.focus()}
}

function vob(url) {
var admis = (document.getElementById);
if (admis){
    var str = "screenX=0,left=0,screenY=0,top=0,directories=0,location=0,menubar=0,resizable=1,scrollbars=1,status=1,toolbar=0";
    if (window.screen) {
      var ah = screen.availHeight - 30;
      var aw = screen.availWidth - 10;
      str += ",height=" + ah;
      str += ",innerHeight=" + ah;
      str += ",width=" + aw;
      str += ",innerWidth=" + aw;
    }
    ana=window.open(url, "w", str);
		if (window.focus) {ana.focus()}
}
    else{
		alert('Votre navigateur est trop ancien pour ouvrir ce lien ; utilisez au moins IE5 ou NS6, par exemple.');
		return;
	}
}

function oc(formes) {
		doc = parent.result;
		doc.document.open();
		doc.document.write('<html><head>');
		doc.document.write('<meta http-equiv="Content-Type" content="text\/html"><base target="_self"><\/head><body>'); 
		doc.document.write('Patientez...<img src="fichiers/sys.gif" alt="patienter" border="0"><br>');
		doc.document.write('<form action="recherche.php" method="post" name="formes" style="visibility: hidden; display: none">');
		doc.document.write('<input type="text" name="mot" size="20" value="'+formes+'"><\/form>');
		doc.document.write('<\/body><\/html>');
		doc.document.formes.submit();
		doc.document.close();
}

function par(url) {
    parent.result.location='partic/'+url+'';
		}

function coll()
{
	if (document.getSelection) txt = document.getSelection();
	else if (document.selection) txt = document.selection.createRange().text;
	else return;
	document.forms[0].texte.value = txt.replace(new RegExp('([\\f\\n\\r\\t\\v ])+', 'g')," ");
	document.forms[0].submit();
}

function regleStyle(title) {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}
var bon = (document.getElementById || document.all);

if (bon)
{
	document.write("<STYLE TYPE='text/css'>");
	document.write(".note {display: none; color: #0033ff; font-size: 90%; text-align: justify;}");
	document.write("</STYLE>");

	var max = 7;
	var shown = new Array();
	for (var i=1;i<=max;i++)
	{
		shown[i+1] = false;
	}

}

function permut(i)
{
	if (!bon)
	{
		alert('Ce lien ne fonctionne pas avec votre navigateur.');
		return;
	}
	shown[i] = (shown[i]) ? false : true;
	current = (shown[i]) ? 'block' : 'none';
	if (document.getElementById)
	{
		document.getElementById('nmr'+i).style.display = current;
	}
	else if (document.all)
	{
		document.all['nmr'+i].style.display = current;
	}
}
