var langname = Array()
langname[0] = ' Russian   ';
langname[1] = ' Ukrainian ';
langname[2] = ' English   ';
langname[3] = ' German    ';
langname[4] = ' French    ';
langname[5] = ' Italian   ';
langname[6] = ' Spanish   ';
langname[7] = ' Romana    ';
langname[8] = ' Portugal  ';

var langhref = Array()
langhref[0] = '../ru/index.htm';
langhref[1] = '../ua/index.htm';
langhref[2] = '../en/index.htm';
langhref[3] = '../de/index.htm';
langhref[4] = '../fr/index.htm';
langhref[5] = '../it/index.htm';
langhref[6] = '../es/index.htm';
langhref[7] = '../ro/index.htm';
langhref[8] = '../pt/index.htm';

function buildLang( langsele ) { 
 document.write( '<b><font color=black>Язык:</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>' );
 document.write( '<a href=../ru/index.htm><IMG src="../icons/flag/ru.gif" border=0></a>' );
 document.write( '<a href=../ua/index.htm><IMG src="../icons/flag/ua.gif" border=0></a>' );
 document.write( '<a href=../en/index.htm><IMG src="../icons/flag/en.gif" border=0></a>' );
 document.write( '<a href=../de/index.htm><IMG src="../icons/flag/de.gif" border=0></a>' );
 document.write( '<a href=../fr/index.htm><IMG src="../icons/flag/fr.gif" border=0></a><br>' );
 document.write( '<a href=../it/index.htm><IMG src="../icons/flag/it.gif" border=0></a>' );
 document.write( '<a href=../es/index.htm><IMG src="../icons/flag/es.gif" border=0></a>' );
 document.write( '<a href=../ro/index.htm><IMG src="../icons/flag/ro.gif" border=0></a>' );
 document.write( '<a href=../pt/index.htm><IMG src="../icons/flag/pt.gif" border=0></a>' );
} 

var menuname = Array()
menuname[0] = 'FamilyTree ';
menuname[1] = 'Скріншоти  ';
menuname[2] = 'Опис       ';
menuname[3] = 'Завантажити';
menuname[4] = 'Купити     ';

var menuhref = Array()
menuhref[0] = 'index.htm';
menuhref[1] = 'scrshot.htm';
menuhref[2] = 'guide.htm';
menuhref[3] = 'download.htm';
menuhref[4] = 'buy.htm';

function buildMenu( menusele ) { 
 document.write( '<b><font color=black>Мова:</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( "<SCRIPT>d3('Генеалогічне дерево родини', 250, 0,'green',25,900,'sans-serif')</SCRIPT>")
 document.write( "<SCRIPT>d3('- FamilyTree -', 350,30,'green',25,800,'times')</SCRIPT>")
 document.write( "<SCRIPT>d3('Версія 9.5 Build 010208', 320,60,'green',20,800,'arial')</SCRIPT>")
} 

function Copyright() { 
 document.write( "<cite><center><font color=black>")
 document.write( "Авторс<span lang=UK>ь</span>ке право © 2005-2011 Дмитр<span lang=UK>а</span> Конюхова. Вс<span lang=UK>і</span> права за<span lang=UK>хищені</span>.")
 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;
}

