var langname = Array()
langname[0] = 'Russe'; 
langname[1] = 'English'; 
langname[2] = 'Allemand'; 
langname[3] = 'Français'; 
langname[4] = "Italien"; 
langname[5] = 'Espagnol'; 
langname[6] = "Roumain"; 
langname[7] = "Portugais";
langname[8] = 'Ukrainien'; 

var langhref = Array()
langhref[0] = '../../ru/dbf/';
langhref[1] = '../../en/dbf/';
langhref[2] = '../../de/dbf/';
langhref[3] = '../../fr/dbf/';
langhref[4] = '../../it/dbf/';
langhref[5] = '../../es/dbf/';
langhref[6] = '../../ro/dbf/';
langhref[7] = '../../pt/dbf/';
langhref[8] = '../../ua/dbf/';

function buildLang( langsele ) { 
 document.write( '<b><font color=black>Langue:</font><br></b>' );
 document.write( '<form name=lang>' );
 document.write( '<select name="fieldname" onChange="openDir( this.form )" style="background-color: rgb(255,238,255); font-weight: bold">' );
 document.write( '' );
 for (i=0; i< langname.length; i++) {
  if (i==langsele) {
   document.write( '<OPTION value='+langhref[i]+' SELECTED>'+langname[i]+'</OPTION>' );
  } else {
   document.write( '<OPTION value='+langhref[i]+'>'+langname[i]+'</OPTION>' );
  }
 }
 document.write( '</select>' );
 document.write( '</form>' );
} 

var menuname = Array()
menuname[0] = ' Accueil      '; 
menuname[1] = ' nom          '; 
menuname[2] = ' Nom          '; 
menuname[3] = ' Connexion    '; 
menuname[4] = ' Déconnexion ';
menuname[5] = ' Main         '; 

var menuhref = Array()
menuhref[0] = 'index.php';
menuhref[1] = 'dbname.php';
menuhref[2] = 'dbfamily.php';
menuhref[3] = 'user.php';
menuhref[4] = 'logout.php';
menuhref[5] = '../index.htm';

function buildMenu( menusele ) { 
 document.write( '<b><font color=black>Menu:</font><br></b>' );
 document.write( '<form name=menu>' );
 document.write( '<select name="fieldname" onChange="openDir( this.form )" style="background-color: rgb(255,238,255); font-weight: bold">' );
 document.write( '' );
 for (i=0; i< menuname.length; i++) {
  if (i==menusele) {
   document.write( '<OPTION value='+menuhref[i]+' SELECTED>'+menuname[i]+'</OPTION>' );
  } else {
   document.write( '<OPTION value='+menuhref[i]+'>'+menuname[i]+'</OPTION>' );
  }
 }
 document.write( '</select>' );
 document.write( '</form>' );
} 

function openDir( form ) { 
 var newIndex = form.fieldname.selectedIndex; 
 cururl = form.fieldname.options[ newIndex ].value; 
 window.location.assign( cururl ); 
} 

function ReadFile( filepath ) {
 var fso = new ActiveXObject("Scripting.FileSystemObject");
 var myfile = fso.OpenTextFile( filepath , 1 );
 var s = myfile.ReadAll();
 document.write( s );
 myfile.Close();
} 

/*<SCRIPT>d3("Hello!", 50,15,'red',40,800,'times')</SCRIPT>*/
function d3(text, x, y, tcolor, fsize, fweight, ffamily, zind) {
 if (!text) return null;
 if (!ffamily) ffamily='arial';
 if (!fweight) fweight=800;
 if (!fsize) fsize=36;
 if (!tcolor) tcolor='00aaff';
 if (!y) y=0;
 if (!x) x=0;
 var sd=4, hd=2;
 var xzind="";
 if (zind) xzind=";z-Index:"+zind;
 var xstyle='font-family:'+ffamily+';font-size:'+fsize+';font-weight:'+fweight+';'
 var xstr='<DIV STYLE="position:absolute; top:'+(y+sd)+'; left:'+(x+sd)+xzind+'">'
 xstr+='<P style="'+xstyle+'color:darkred">'+text+'</P></DIV>'
 xstr+='<DIV STYLE="position:absolute; top:'+y+'; left:'+x+xzind+'">'
 xstr+='<P style="'+xstyle+'color:silver">'+text+'</P></DIV>'
 xstr+='<DIV STYLE="position:absolute; top:'+(y+hd)+'; left:'+(x+hd)+xzind+'">'
 xstr+='<P style="'+xstyle+'color:'+tcolor+'">'+text+'</P></DIV>'
 document.write(xstr)
}
function buildLogo() { 
 document.write( "<a href='http://www.familytree.ru/fr/'>")
 document.write( "<SCRIPT>d3('Arbre généalogique de la famille', 250, 0,'green',25,900,'sans-serif')</SCRIPT>")
 document.write( "<SCRIPT>d3('- FamilyTree -', 350,30,'green',25,800,'times')</SCRIPT>")
 document.write( "</a>")
} 

function Copyright() { 
 document.write( "<cite><center><font color=black>")
 document.write( "Copyright © 2005-2009 Dmitriy Konyuhov. Tous droits réservés.")
 document.write( "E-Mail: <a href=mailto:dvpt@narod.ru>dvpt@narod.ru</a>")
 document.write( "</font></center></cite>")
 document.write( "<hr width=70%>")
}

function view(id){
 window.open(id, "goodsinfo", "width=620, height=480, scrollbars=yes, resizable=yes");
}

function colortxt(color){
 event.srcElement.style.color = color;
}

