var isIE = (navigator.appName == "Microsoft Internet Explorer");
var language;

var sel_list1,sel_list2,sel_list3,sel_list4,sel_list5,sel_list6,sel_list7;
var InfoWindow=null;

function listentry(ent0, ent1, ent2, ent3, ent4, ent5, ent6, download)
{
  this.ent0=ent0;
  this.ent1=ent1;
  this.ent2=ent2;
  this.ent3=ent3;
  this.ent4=ent4;
  this.ent5=ent5;
  this.ent6=ent6;
	this.download=download;
}

var helpboxes=new Array(
													new listentry(""         ,""       ,""    ,"","","","","downloadhelp/product"),

													new listentry("X-3D"     ,""       ,""    ,"","","","","downloadhelp/x3d_beta_series"),
													new listentry("X-3D"     ,"*"      ,""    ,"","","","","downloadhelp/x3d_firmwaretype"),

													new listentry("X-Base"   ,""       ,""    ,"" ,"","","","downloadhelp/xbase_beta_series"),
													new listentry("X-Base"   ,"*"      ,""    ,"" ,"","","","downloadhelp/xbase_act_ppm"),
													new listentry("X-Base"   ,"*"      ,"*"   ,"" ,"","","","downloadhelp/xbase_acc"),
													new listentry("X-Base"   ,"*"      ,"*"   ,"*","","","","downloadhelp/xbase_brushed_brushless"),

													new listentry("X-BL"     ,""       ,""    ,"" ,"","","","downloadhelp/xbl_beta_series")
//													new listentry("X-BL"     ,"*"      ,""    ,"" ,"","","","downloadhelp/xbl_motortype")
											 );


var entries=new Array(
                        //////////// X-3D-BL Komplettkit
													new listentry("X-3D-BL Kit" ,"*"   ,"Funpilot Firmware V1.21"         ,"","","","","updates/funpilot/fp_v121.hex"),
													new listentry("X-3D-BL Kit" ,"*"   ,"Funpilot Spektrum Firmware V1.21","","","","","updates/funpilot/fp_v121_spektrum.hex"),
													new listentry("X-3D-BL Kit" ,"*"   ,"Funpilot Settings V1.20"         ,"","","","","updates/funpilot/fp_settings_v120.zip"),
													new listentry("X-3D-BL Kit" ,"ACT" ,"X-Base Firmware V3.3"            ,"","","","","updates/xbase/xbase_serie_v33_brushless_act_acc.xbs"),
													new listentry("X-3D-BL Kit" ,"PPM" ,"X-Base Firmware V3.3"            ,"","","","","updates/xbase/xbase_serie_v33_brushless_ppm_acc.xbs"),
													new listentry("X-3D-BL Kit" ,"*"   ,"X-BLDC Firmware V3.0"            ,"","","","","updates/xbldc/xbl_v30_serie.blc"),
													new listentry("X-3D-BL Kit" ,"*"   ,"X-Control PC-Software V2.14"     ,"","","","","updates/xcontrol/xcontrol_v214.exe"),
													new listentry("X-3D-BL Kit" ,"*"   ,"Anleitung V2.1"                  ,"","","","","updates/manuals/x_3d_bl_manual_german_v21.pdf"),
													new listentry("X-3D-BL Kit" ,"*"   ,"Manual V2.1"                     ,"","","","","updates/manuals/x_3d_bl_manual_english_v21.pdf"),
                        
												//////////// X-3D Firmwares
													new listentry("X-3D"     ,"Series" ,"Chinaboard"    ,"Firmware V1.0",""                        ,"","","updates/x3d/x3d_series_v10_for_chinaboard.ufc"),
													new listentry("X-3D"     ,"Beta"   ,"Chinaboard"    ,"Firmware V1.0",""                        ,"","","updates/x3d/x3d_beta_v10_for_chinaboard.ufc"),
													new listentry("X-3D"     ,"Series" ,"X-Base"        ,"Firmware V3.0",""                        ,"","","updates/x3d/x3d_series_v30_for_xbase.ufc"),
													new listentry("X-3D"     ,"Beta"   ,"X-Base"        ,"Firmware V3.0",""                        ,"","","updates/x3d/x3d_beta_v30_for_xbase.ufc"),
													new listentry("X-3D"     ,"Series" ,"X-Base"        ,"Firmware V2.3",""                        ,"","","updates/x3d/x3d_series_v23_for_xbase.ufc"),
													new listentry("X-3D"     ,"Beta"   ,"X-Base"        ,"Firmware V2.3",""                        ,"","","updates/x3d/x3d_beta_v23_for_xbase.ufc"),
													new listentry("X-3D"     ,"Series" ,"X-Base & X-ACC","Firmware V3.0",""                        ,"","","updates/x3d/x3d_series_v30_for_xbase_acc.ufc"),
													new listentry("X-3D"     ,"Beta"   ,"X-Base & X-ACC","Firmware V3.0","Please write us an email","","","#"),

												//////////// X-3D Settings
													new listentry("X-3D",    "*"       ,"Chinaboard"    ,"Settings V1.0",""                        ,"","","updates/x3d/x3d_settings_chinaboard.zip"),
													new listentry("X-3D",    "*"       ,"X-Base"        ,"Settings V1.0",""                        ,"","","updates/x3d/x3d_settings_xbase.zip"),
													new listentry("X-3D",    "*"       ,"X-Base & X-ACC","Settings"     ,"HH V1.0"                 ,"","","updates/x3d/x3d_settings_xacc_hh.zip"),
													new listentry("X-3D",    "*"       ,"X-Base & X-ACC","Settings"     ,"ACC V1.0"                ,"","","updates/x3d/x3d_settings_xacc_acc.zip"),

												//////////// X-3D PC-Software
													new listentry("X-3D",    "*"       ,"*"             ,"PC Software"  ,"Windows V2.14"           ,"","","updates/xcontrol/xcontrol_v214.exe"),
													new listentry("X-3D",    "*"       ,"*"             ,"PC Software"  ,"Windows V2.13"           ,"","","updates/xcontrol/xcontrol_v213.exe"),
													new listentry("X-3D",    "*"       ,"*"             ,"PC Software"  ,"Windows V2.10"           ,"","","updates/xcontrol/xcontrol_v210.exe"),
													new listentry("X-3D",    "*"       ,"*"             ,"PC Software"  ,"Windows V2.02"           ,"","","updates/xcontrol/xcontrol_v202.exe"),
													new listentry("X-3D",    "*"       ,"*"             ,"PC Software"  ,"Linux V2.03"             ,"","","updates/xcontrol/xcontrol_v203.tar.bz2"),
// 												new listentry("X-3D",    "*"       ,"*"             ,"PC Software"  ,"Mac OSX PPC V2.03"       ,"","","updates/xcontrol/xcontrol_ppc_v203.dmg"),
													new listentry("X-3D",    "*"       ,"*"             ,"PC Software"  ,"Mac OSX Intel V2.03"     ,"","","updates/xcontrol/xcontrol_intel_v203.dmg"),

												//////////// X-3D Anleitungen
													new listentry("X-3D",    "*"       ,"Chinaboard"    ,"Manual (English)"   ,""      ,"","","updates/manuals/x3d_standardufo_manual_en.pdf"),
													new listentry("X-3D",    "*"       ,"Chinaboard"    ,"Anleitung (Deutsch)",""      ,"","","updates/manuals/x3d_standardufo_manual_de.pdf"),
													new listentry("X-3D",    "*"       ,"X-Base"        ,"Manual (English)"   ,""      ,"","","updates/manuals/x_3d_bl_manual_english_v21.pdf"),
													new listentry("X-3D",    "*"       ,"X-Base"        ,"Anleitung (Deutsch)",""      ,"","","updates/manuals/x_3d_bl_manual_german_v21.pdf"),
													new listentry("X-3D",    "*"       ,"X-Base & X-ACC","Manual (English)"   ,""      ,"","","updates/manuals/x_3d_bl_manual_english_v21.pdf"),
													new listentry("X-3D",    "*"       ,"X-Base & X-ACC","Anleitung (Deutsch)",""      ,"","","updates/manuals/x_3d_bl_manual_german_v21.pdf"),


												//////////// X-Base Firmwares
													new listentry("X-Base"   ,"Series" ,"ACT","No ACC"  ,"Brushless","Firmware V3.3","","updates/xbase/xbase_serie_v33_brushless_act_acc.xbs"),
													new listentry("X-Base"   ,"Series" ,"ACT","With ACC","Brushless","Firmware V3.3","","updates/xbase/xbase_serie_v33_brushless_act_acc.xbs"),
													new listentry("X-Base"   ,"Series" ,"PPM","No ACC"  ,"Brushless","Firmware V3.3","","updates/xbase/xbase_serie_v33_brushless_ppm_acc.xbs"),
													new listentry("X-Base"   ,"Series" ,"PPM","With ACC","Brushless","Firmware V3.3","","updates/xbase/xbase_serie_v33_brushless_ppm_acc.xbs"),

													new listentry("X-Base"   ,"Series" ,"ACT","No ACC"  ,"Brushed"  ,"Firmware V3.2","","updates/xbase/xbase_serie_v32_brushed_act_acc.xbs"),
													new listentry("X-Base"   ,"Series" ,"ACT","No ACC"  ,"Brushless","Firmware V3.2","","updates/xbase/xbase_serie_v32_brushless_act_acc.xbs"),
													new listentry("X-Base"   ,"Series" ,"ACT","With ACC","Brushed"  ,"Firmware V3.2","","updates/xbase/xbase_serie_v32_brushed_act_acc.xbs"),
													new listentry("X-Base"   ,"Series" ,"ACT","With ACC","Brushless","Firmware V3.2","","updates/xbase/xbase_serie_v32_brushless_act_acc.xbs"),
													new listentry("X-Base"   ,"Series" ,"PPM","No ACC"  ,"Brushed"  ,"Firmware V3.2","","updates/xbase/xbase_serie_v32_brushed_ppm_acc.xbs"),
													new listentry("X-Base"   ,"Series" ,"PPM","No ACC"  ,"Brushless","Firmware V3.2","","updates/xbase/xbase_serie_v32_brushless_ppm_acc.xbs"),
													new listentry("X-Base"   ,"Series" ,"PPM","With ACC","Brushed"  ,"Firmware V3.2","","updates/xbase/xbase_serie_v32_brushed_ppm_acc.xbs"),
													new listentry("X-Base"   ,"Series" ,"PPM","With ACC","Brushless","Firmware V3.2","","updates/xbase/xbase_serie_v32_brushless_ppm_acc.xbs"),

													new listentry("X-Base"   ,"Series" ,"ACT","No ACC"  ,"Brushed"  ,"Firmware V3.0","","updates/xbase/xbase_serie_v30_brushed_act.xbs"),
													new listentry("X-Base"   ,"Series" ,"ACT","No ACC"  ,"Brushless","Firmware V3.0","","updates/xbase/xbase_serie_v30_brushless_act.xbs"),
													new listentry("X-Base"   ,"Series" ,"ACT","With ACC","Brushed"  ,"Firmware V3.0","","updates/xbase/xbase_serie_v30_brushed_act_acc.xbs"),
													new listentry("X-Base"   ,"Series" ,"ACT","With ACC","Brushless","Firmware V3.0","","updates/xbase/xbase_serie_v30_brushless_act_acc.xbs"),
													new listentry("X-Base"   ,"Series" ,"PPM","No ACC"  ,"Brushed"  ,"Firmware V3.0","","updates/xbase/xbase_serie_v30_brushed_ppm.xbs"),
													new listentry("X-Base"   ,"Series" ,"PPM","No ACC"  ,"Brushless","Firmware V3.0","","updates/xbase/xbase_serie_v30_brushless_ppm.xbs"),
													new listentry("X-Base"   ,"Series" ,"PPM","With ACC","Brushed"  ,"Firmware V3.0","","updates/xbase/xbase_serie_v30_brushed_ppm_acc.xbs"),
													new listentry("X-Base"   ,"Series" ,"PPM","With ACC","Brushless","Firmware V3.0","","updates/xbase/xbase_serie_v30_brushless_ppm_acc.xbs"),
													new listentry("X-Base"   ,"Beta"   ,"ACT","No ACC"  ,"Brushed"  ,"Firmware V3.0","","updates/xbase/xbase_beta_v30_brushed_act.xbs"),
													new listentry("X-Base"   ,"Beta"   ,"ACT","No ACC"  ,"Brushless","Firmware V3.0","","updates/xbase/xbase_beta_v30_brushless_act.xbs"),
													new listentry("X-Base"   ,"Beta"   ,"ACT","With ACC","Brushed"  ,"Firmware V3.0","","updates/xbase/xbase_beta_v30_brushed_act_acc.xbs"),
													new listentry("X-Base"   ,"Beta"   ,"ACT","With ACC","Brushless","Firmware V3.0","","updates/xbase/xbase_beta_v30_brushless_act_acc.xbs"),
													
													new listentry("X-Base"   ,"Series" ,"ACT","No ACC"  ,"Brushed"  ,"Firmware V2.7","","updates/xbase/xbase_serie_v27_brushed_act.xbs"),
													new listentry("X-Base"   ,"Series" ,"ACT","No ACC"  ,"Brushless","Firmware V2.7","","updates/xbase/xbase_serie_v27_brushless_act.xbs"),
													new listentry("X-Base"   ,"Series" ,"ACT","With ACC","Brushed"  ,"Firmware V2.7","","updates/xbase/xbase_serie_v27_brushed_act_acc.xbs"),
													new listentry("X-Base"   ,"Series" ,"ACT","With ACC","Brushless","Firmware V2.7","","updates/xbase/xbase_serie_v27_brushless_act_acc.xbs"),
													new listentry("X-Base"   ,"Series" ,"PPM","No ACC"  ,"Brushed"  ,"Firmware V2.7","","updates/xbase/xbase_serie_v27_brushed_ppm.xbs"),
													new listentry("X-Base"   ,"Series" ,"PPM","No ACC"  ,"Brushless","Firmware V2.7","","updates/xbase/xbase_serie_v27_brushless_ppm.xbs"),
													new listentry("X-Base"   ,"Series" ,"PPM","With ACC","Brushed"  ,"Firmware V2.7","","updates/xbase/xbase_serie_v27_brushed_ppm_acc.xbs"),
													new listentry("X-Base"   ,"Series" ,"PPM","With ACC","Brushless","Firmware V2.7","","updates/xbase/xbase_serie_v27_brushless_ppm_acc.xbs"),

													new listentry("X-Base"   ,"Beta"   ,"ACT","No ACC"  ,"Brushed"  ,"Firmware V2.5","","updates/xbase/xbase_beta_v25_brushed_act.xbs"),
													new listentry("X-Base"   ,"Beta"   ,"ACT","No ACC"  ,"Brushless","Firmware V2.5","","updates/xbase/xbase_beta_v25_brushless_act.xbs"),

												//////////// X-Base PC-Software
													new listentry("X-Base"   ,"*"      ,"*"  ,"*"       ,"*"        ,"PC Software" ,"Windows V2.14"      ,"updates/xcontrol/xcontrol_v214.exe"),
													new listentry("X-Base"   ,"*"      ,"*"  ,"*"       ,"*"        ,"PC Software" ,"Windows V2.13"      ,"updates/xcontrol/xcontrol_v213.exe"),
													new listentry("X-Base"   ,"*"      ,"*"  ,"*"       ,"*"        ,"PC Software" ,"Windows V2.10"      ,"updates/xcontrol/xcontrol_v210.exe"),
													new listentry("X-Base"   ,"*"      ,"*"  ,"*"       ,"*"        ,"PC Software" ,"Windows V2.02"      ,"updates/xcontrol/xcontrol_v202.exe"),
													new listentry("X-Base"   ,"*"      ,"*"  ,"*"       ,"*"        ,"PC Software" ,"Linux V2.03"        ,"updates/xcontrol/xcontrol_v203.tar.bz2"),
// 												new listentry("X-Base"   ,"*"      ,"*"  ,"*"       ,"*"        ,"PC Software" ,"Mac OSX PPC V2.03"  ,"updates/xcontrol/xcontrol_ppc_v203.dmg"),
													new listentry("X-Base"   ,"*"      ,"*"  ,"*"       ,"*"        ,"PC Software" ,"Mac OSX Intel V2.03","updates/xcontrol/xcontrol_intel_v203.dmg"),

												//////////// X-Base Anleitungen
													new listentry("X-Base"   ,"*"      ,"*"  ,"*"       ,"Brushed"  ,"Manual (English)"      ,"","updates/manuals/xbase_brushed_manual_en.pdf"),
													new listentry("X-Base"   ,"*"      ,"*"  ,"*"       ,"Brushed"  ,"Anleitung (Deutsch)"   ,"","updates/manuals/xbase_brushed_manual_de.pdf"),
													new listentry("X-Base"   ,"*"      ,"*"  ,"*"       ,"Brushless","Manual V2.1 (English)"      ,"","updates/manuals/x_3d_bl_manual_english_v21.pdf"),
													new listentry("X-Base"   ,"*"      ,"*"  ,"*"       ,"Brushless","Anleitung V2.1 (Deutsch)"   ,"","updates/manuals/x_3d_bl_manual_german_v21.pdf"),

												//////////// X-BL Firmware
													new listentry("X-BL"     ,"Series" ,"Firmware V3.0"     ,"Firmware","","","","updates/xbldc/xbl_v30_serie.blc"),
													new listentry("X-BL"     ,"Series" ,"Firmware V2.3"     ,"Firmware","","","","updates/xbldc/xbl_v23_serie.blc"),
													new listentry("X-BL"     ,"Series" ,"Firmware V2.0"     ,"Firmware","","","","updates/xbldc/xbl_v20_serie.blc"),
													new listentry("X-BL"     ,"Beta"   ,"Firmware V2.0"     ,"Firmware","","","","updates/xbldc/xbl_v20_beta.blc"),
													new listentry("X-BL"     ,"Series" ,"Firmware V1.1"     ,"Firmware","","","","updates/xbldc/xbl_v11_serie.blc"),
													new listentry("X-BL"     ,"Beta"   ,"Firmware V1.1"     ,"Firmware","","","","updates/xbldc/xbl_v11_beta.blc"),
													new listentry("X-BL"     ,"*"      ,"*"                 ,"Sounds","","","","updates/xbldc/xbl_sounds.zip"),
													new listentry("X-BL"     ,"*"      ,"*"                 ,"Sound editor","","","","updates/xbldc/xbl_tone_editor_alpha.exe"),

												//////////// X-BL Anleitung
													new listentry("X-BL"     ,"*"      ,"*"                 ,"Manual V2.1(English)","","","","updates/manuals/x_3d_bl_manual_english_v21.pdf"),
													new listentry("X-BL"     ,"*"      ,"*"                 ,"Anleitung V2.1(Deutsch)","","","","updates/manuals/x_3d_bl_manual_german_v21.pdf"),

												//////////// X-CSM Anleitung
													new listentry("X-CSM"     ,"Anleitung (Deutsch)" ,"","","","","","updates/manuals/xcsm_chinaboard_manual_de.pdf"),
													new listentry("X-CSM"     ,"Manual (English)" ,"","","","","","updates/manuals/xcsm_chinaboard_manual_de.pdf"),

												//////////// Fun Pilot
													new listentry("FunPilot"     ,"Firmware V1.21"    ,"Firmware"          ,""   ,"","","","updates/funpilot/fp_v121.hex"),
													new listentry("FunPilot"     ,"Firmware V1.21"    ,"Spektrum Firmware" ,""   ,"","","","updates/funpilot/fp_v121.hex"),
													new listentry("FunPilot"     ,"Firmware V1.21"    ,"Settings"          ,"","","","","updates/funpilot/fp_settings_v120.zip"),
													new listentry("FunPilot"     ,"Firmware V1.10"    ,"Firmware"          ,""   ,"","","","updates/funpilot/fp_v110.hex"),
													new listentry("FunPilot"     ,"Firmware V1.10"    ,"Settings"          ,"","","","","updates/funpilot/fp_setting_fast_v110.osp"),
													new listentry("FunPilot"     ,"Firmware V1.0"     ,"Firmware"          ,"incl. settings","","","","updates/funpilot/fp_settings_v10.hex"),
													new listentry("FunPilot"     ,"Firmware V1.0"     ,"Firmware"          ,"no settings"   ,"","","","updates/funpilot/fp_v10.hex"),
													new listentry("FunPilot"     ,"Firmware V1.0"     ,"Settings"          ,"","","","","updates/funpilot/fp_settings_v10.zip"),

													new listentry("FunPilot"     ,"*"                 ,"PC Software" ,"Windows V2.14"      ,"","","","updates/xcontrol/xcontrol_v214.exe"),
													new listentry("FunPilot"     ,"*"                 ,"PC Software" ,"Windows V2.13"      ,"","","","updates/xcontrol/xcontrol_v213.exe"),
													new listentry("FunPilot"     ,"*"                 ,"PC Software" ,"Windows V2.10"      ,"","","","updates/xcontrol/xcontrol_v210.exe"),
													new listentry("FunPilot"     ,"*"                 ,"PC Software" ,"Windows V2.02"      ,"","","","updates/xcontrol/xcontrol_v202.exe"),
													new listentry("FunPilot"     ,"*"                 ,"PC Software" ,"Linux V2.03"        ,"","","","updates/xcontrol/xcontrol_v203.tar.bz2"),
// 												new listentry("FunPilot"     ,"*"                 ,"PC Software" ,"Mac OSX PPC V2.03"  ,"","","","updates/xcontrol/xcontrol_ppc_v203.dmg"),
													new listentry("FunPilot"     ,"*"                 ,"PC Software" ,"Mac OSX Intel V2.03","","","","updates/xcontrol/xcontrol_intel_v203.dmg"),

													new listentry("FunPilot"     ,"*"                 ,"Manual V2.1(English)","","","","","updates/manuals/x_3d_bl_manual_english_v21.pdf"),
													new listentry("FunPilot"     ,"*"                 ,"Anleitung V2.1(Deutsch)","","","","","updates/manuals/x_3d_bl_manual_german_v21.pdf"),


												//////////// X-Control Software
													new listentry("X-Control","Windows"      ,"V2.14","","","","","updates/xcontrol/xcontrol_v214.exe"),
													new listentry("X-Control","Windows"      ,"V2.13","","","","","updates/xcontrol/xcontrol_v213.exe"),
													new listentry("X-Control","Windows"      ,"V2.10","","","","","updates/xcontrol/xcontrol_v210.exe"),
													new listentry("X-Control","Windows"      ,"V2.02","","","","","updates/xcontrol/xcontrol_v202.exe"),
													new listentry("X-Control","Linux"        ,"V2.03","","","","","updates/xcontrol/xcontrol_v203.tar.bz2"),
//													new listentry("X-Control","Mac OSX PPC"  ,"V2.03","","","","","updates/xcontrol/xcontrol_ppc_v203.dmg"),
													new listentry("X-Control","Mac OSX Intel","V2.03","","","","","updates/xcontrol/xcontrol_intel_v203.dmg")
												 );



function getHelpLink(pos)
{
	var i;
  if (helpboxes.length==0) return "";
  for (i=0; i<helpboxes.length; i++)
	{
    if ((pos==1)&&(helpboxes[i].ent0=="")) 
    	return helpboxes[i].download;
    
    if (  (((helpboxes[i].ent0==sel_list1)||(helpboxes[i].ent0=="*")))
    		&&(((helpboxes[i].ent1==sel_list2)||(helpboxes[i].ent1=="*")||(pos<3)))
    		&&(((helpboxes[i].ent2==sel_list3)||(helpboxes[i].ent2=="*")||(pos<4)))
    		&&(((helpboxes[i].ent3==sel_list4)||(helpboxes[i].ent3=="*")||(pos<5)))
    		&&(((helpboxes[i].ent4==sel_list5)||(helpboxes[i].ent4=="*")||(pos<6)))
    		&&(((helpboxes[i].ent5==sel_list6)||(helpboxes[i].ent5=="*")||(pos<7)))
    		&&(((helpboxes[i].ent6==sel_list7)||(helpboxes[i].ent6=="*")||(pos<8))))
    	return helpboxes[i].download;
	}
	return "";
}

function isInList(listname, entry)
{
  var i;
  if (entry=="*") return 1;
  if (listname.length==0) return 0;
  for (i=0; i<listname.length; i++)
  {
  	if (listname.options[i].text==entry) return 1;
  }
  return 0;
}


function setLink(dest)
{
	if (isIE) document.all.download.href=dest;
	else document.links.download.href=dest;
}

function showHelp(listid)
{
  var listnr;
  switch(listid)
  {
  	case "list1": listnr=1; break;
  	case "list2": listnr=2; break;
  	case "list3": listnr=3; break;
  	case "list4": listnr=4; break;
  	case "list5": listnr=5; break;
  	case "list6": listnr=6; break;
  	case "list7": listnr=7; break;
  }
	language=document.form1.language.value;
	if (InfoWindow!=null) InfoWindow.close();
	InfoWindow=window.open(getHelpLink(listnr)+"_"+language+".html","info","width=400, height=600, location=no, resizable=yes, left=1, top=1, scrollbars=yes");
}

function compare(cmp1, cmp2)
{
	if (cmp1=="*") return true;
	if (cmp1==cmp2) return true;
	return false;
}

function populateList(listname)
{
	var j;
	language=document.form1.language.value;

	if (document.form1.list1.selectedIndex>-1) 
	  sel_list1 = document.form1.list1.options[document.form1.list1.selectedIndex].text;
	else 
		sel_list1 = "";

	if (document.form1.list2.selectedIndex>-1) 
	  sel_list2 = document.form1.list2.options[document.form1.list2.selectedIndex].text;
	else 
		sel_list2 = "";

	if (document.form1.list3.selectedIndex>-1) 
	  sel_list3 = document.form1.list3.options[document.form1.list3.selectedIndex].text;
	else 
		sel_list3 = "";

	if (document.form1.list4.selectedIndex>-1) 
	  sel_list4 = document.form1.list4.options[document.form1.list4.selectedIndex].text;
	else 
		sel_list4 = "";

	if (document.form1.list5.selectedIndex>-1) 
	  sel_list5 = document.form1.list5.options[document.form1.list5.selectedIndex].text;
	else 
		sel_list5 = "";

	if (document.form1.list6.selectedIndex>-1) 
	  sel_list6 = document.form1.list6.options[document.form1.list6.selectedIndex].text;
	else 
		sel_list6 = "";

	if (document.form1.list7.selectedIndex>-1) 
	  sel_list7 = document.form1.list7.options[document.form1.list7.selectedIndex].text;
	else 
		sel_list7 = "";

  switch(listname)
  {
    case "list0":
      document.form1.list1.style.visibility="visible";
      document.form1.list2.style.visibility="hidden";
      document.form1.list3.style.visibility="hidden";
      document.form1.list4.style.visibility="hidden";
      document.form1.list5.style.visibility="hidden";
      document.form1.list6.style.visibility="hidden";
      document.form1.list7.style.visibility="hidden";
      
      document.form1.helplist1.style.visibility="visible";
      document.form1.helplist2.style.visibility="hidden";
      document.form1.helplist3.style.visibility="hidden";
      document.form1.helplist4.style.visibility="hidden";
      document.form1.helplist5.style.visibility="hidden";
      document.form1.helplist6.style.visibility="hidden";
      document.form1.helplist7.style.visibility="hidden";

      document.form1.list2.options[0]=null;
      document.form1.list3.options[0]=null;
      document.form1.list4.options[0]=null;
      document.form1.list5.options[0]=null;
      document.form1.list6.options[0]=null;
      document.form1.list7.options[0]=null;
      
    	document.form1.dwnimg.style.visibility="hidden";
      entry=0;
      document.form1.list1.options[entry]=null;
			setLink("#");
      for (j=0; j<entries.length; j++)
      {
        if (!isInList(document.form1.list1, entries[j].ent0))
        {
        	document.form1.list1.options[entry]=new Option(entries[j].ent0, entries[j].ent0, false, false);
        	entry++;
          document.form1.list1.options[entry]=null;
        }
      }
    break;
    
    case "list1":
      document.form1.list2.style.visibility="visible";
      document.form1.list3.style.visibility="hidden";
      document.form1.list4.style.visibility="hidden";
      document.form1.list5.style.visibility="hidden";
      document.form1.list6.style.visibility="hidden";
      document.form1.list7.style.visibility="hidden";
    	document.form1.dwnimg.style.visibility="hidden";

      if (getHelpLink(2)=="")
        document.form1.helplist2.style.visibility="hidden";
      else
        document.form1.helplist2.style.visibility="visible";
      
      document.form1.helplist3.style.visibility="hidden";
      document.form1.helplist4.style.visibility="hidden";
      document.form1.helplist5.style.visibility="hidden";
      document.form1.helplist6.style.visibility="hidden";
      document.form1.helplist7.style.visibility="hidden";


      document.form1.list3.options[0]=null;
      document.form1.list4.options[0]=null;
      document.form1.list5.options[0]=null;
      document.form1.list6.options[0]=null;
      document.form1.list7.options[0]=null;

      entry=0;
      document.form1.list2.options[entry]=null;
			setLink("#");
      for (j=0; j<entries.length; j++)
      {
      	if (  compare(entries[j].ent0,sel_list1)
      	   )
      	{
          if (!isInList(document.form1.list2, entries[j].ent1))
          {
          	if (entries[j].ent1=="") 
          	{
          		document.form1.list2.style.visibility="hidden";
            	document.form1.dwnimg.style.visibility="visible";
   						setLink(entries[j].download);
          	}
          	document.form1.list2.options[entry]=new Option(entries[j].ent1, entries[j].ent1, false, false);
          	entry++;
            document.form1.list2.options[entry]=null;
          }
        }
      }
    break;

    case "list2":
      document.form1.list3.style.visibility="visible";
      document.form1.list4.style.visibility="hidden";
      document.form1.list5.style.visibility="hidden";
      document.form1.list6.style.visibility="hidden";
      document.form1.list7.style.visibility="hidden";
    	document.form1.dwnimg.style.visibility="hidden";
 
      if (getHelpLink(3)=="")
        document.form1.helplist3.style.visibility="hidden";
      else
        document.form1.helplist3.style.visibility="visible";
      
      document.form1.helplist4.style.visibility="hidden";
      document.form1.helplist5.style.visibility="hidden";
      document.form1.helplist6.style.visibility="hidden";
      document.form1.helplist7.style.visibility="hidden";

      document.form1.list4.options[0]=null;
      document.form1.list5.options[0]=null;
      document.form1.list6.options[0]=null;
      document.form1.list7.options[0]=null;

      entry=0;
      document.form1.list3.options[entry]=null;
			setLink("#");
      for (j=0; j<entries.length; j++)
      {
      	if (  compare(entries[j].ent0,sel_list1)
      	    &&compare(entries[j].ent1,sel_list2)
      	   )
      	{
          if (!isInList(document.form1.list3, entries[j].ent2))
          {
          	if (entries[j].ent2=="") 
          	{
          		document.form1.list3.style.visibility="hidden";
            	document.form1.dwnimg.style.visibility="visible";
   						setLink(entries[j].download);
          	}
          	document.form1.list3.options[entry]=new Option(entries[j].ent2, entries[j].ent2, false, false);
          	entry++;
            document.form1.list3.options[entry]=null;
          }
        }
      }
    break;

    case "list3":
      document.form1.list4.style.visibility="visible";
      document.form1.list5.style.visibility="hidden";
      document.form1.list6.style.visibility="hidden";
      document.form1.list7.style.visibility="hidden";
    	document.form1.dwnimg.style.visibility="hidden";

      if (getHelpLink(4)=="")
        document.form1.helplist4.style.visibility="hidden";
      else
        document.form1.helplist4.style.visibility="visible";
      
      document.form1.helplist5.style.visibility="hidden";
      document.form1.helplist6.style.visibility="hidden";
      document.form1.helplist7.style.visibility="hidden";

      document.form1.list5.options[0]=null;
      document.form1.list6.options[0]=null;
      document.form1.list7.options[0]=null;


      entry=0;
      document.form1.list4.options[entry]=null;
			setLink("#");
      for (j=0; j<entries.length; j++)
      {
      	if (  compare(entries[j].ent0,sel_list1)
      	    &&compare(entries[j].ent1,sel_list2)
      	    &&compare(entries[j].ent2,sel_list3)
      	   )
      	{
          if (!isInList(document.form1.list4, entries[j].ent3))
          {
          	if (entries[j].ent3=="") 
          	{
          		document.form1.list4.style.visibility="hidden";
            	document.form1.dwnimg.style.visibility="visible";
   						setLink(entries[j].download);
          	}
          	document.form1.list4.options[entry]=new Option(entries[j].ent3, entries[j].ent3, false, false);
          	entry++;
            document.form1.list4.options[entry]=null;
          }
        }
      }
    break;

    case "list4":
      document.form1.list5.style.visibility="visible";
      document.form1.list6.style.visibility="hidden";
      document.form1.list7.style.visibility="hidden";
    	document.form1.dwnimg.style.visibility="hidden";

      if (getHelpLink(5)=="")
        document.form1.helplist5.style.visibility="hidden";
      else
        document.form1.helplist5.style.visibility="visible";
      
      document.form1.helplist6.style.visibility="hidden";
      document.form1.helplist7.style.visibility="hidden";

      document.form1.list6.options[0]=null;
      document.form1.list7.options[0]=null;

      entry=0;
      document.form1.list5.options[entry]=null;
			setLink("#");
      for (j=0; j<entries.length; j++)
      {
      	if (  compare(entries[j].ent0,sel_list1)
      	    &&compare(entries[j].ent1,sel_list2)
      	    &&compare(entries[j].ent2,sel_list3)
      	    &&compare(entries[j].ent3,sel_list4)
      	   )
      	{
          if (!isInList(document.form1.list5, entries[j].ent4))
          {
          	if (entries[j].ent4=="") 
          	{
          		document.form1.list5.style.visibility="hidden";
            	document.form1.dwnimg.style.visibility="visible";
   						setLink(entries[j].download);
          	}
          	document.form1.list5.options[entry]=new Option(entries[j].ent4, entries[j].ent4, false, false);
          	entry++;
            document.form1.list5.options[entry]=null;
          }
        }
      }
    break;

    case "list5":
      document.form1.list6.style.visibility="visible";
      document.form1.list7.style.visibility="hidden";
    	document.form1.dwnimg.style.visibility="hidden";

      if (getHelpLink(6)=="")
        document.form1.helplist6.style.visibility="hidden";
      else
        document.form1.helplist6.style.visibility="visible";
      
      document.form1.helplist7.style.visibility="hidden";

      document.form1.list7.options[0]=null;

      entry=0;
      document.form1.list6.options[entry]=null;
			setLink("#");
      for (j=0; j<entries.length; j++)
      {
      	if (  compare(entries[j].ent0,sel_list1)
      	    &&compare(entries[j].ent1,sel_list2)
      	    &&compare(entries[j].ent2,sel_list3)
      	    &&compare(entries[j].ent3,sel_list4)
      	    &&compare(entries[j].ent4,sel_list5)
      	   )
      	{
          if (!isInList(document.form1.list6, entries[j].ent5))
          {
          	if (entries[j].ent5=="") 
          	{
          		document.form1.list6.style.visibility="hidden";
            	document.form1.dwnimg.style.visibility="visible";
   						setLink(entries[j].download);
          	}
          	document.form1.list6.options[entry]=new Option(entries[j].ent5, entries[j].ent5, false, false);
          	entry++;
            document.form1.list6.options[entry]=null;
          }
        }
      }
    break;

    case "list6":
      document.form1.list7.style.visibility="visible";
    	document.form1.dwnimg.style.visibility="hidden";

      if (getHelpLink(7)=="")
        document.form1.helplist7.style.visibility="hidden";
      else
        document.form1.helplist7.style.visibility="visible";
      
      entry=0;
      document.form1.list7.options[entry]=null;
			setLink("#");
      for (j=0; j<entries.length; j++)
      {
       	if (  compare(entries[j].ent0,sel_list1)
      	    &&compare(entries[j].ent1,sel_list2)
      	    &&compare(entries[j].ent2,sel_list3)
      	    &&compare(entries[j].ent3,sel_list4)
      	    &&compare(entries[j].ent4,sel_list5)
      	    &&compare(entries[j].ent5,sel_list6)
      	   )
     	{
          if (!isInList(document.form1.list7, entries[j].ent6))
          {
          	if (entries[j].ent6=="") 
          	{
          		document.form1.list7.style.visibility="hidden";
            	document.form1.dwnimg.style.visibility="visible";
   						setLink(entries[j].download);
          	}
          	document.form1.list7.options[entry]=new Option(entries[j].ent6, entries[j].ent6, false, false);
          	entry++;
            document.form1.list7.options[entry]=null;
          }
        }
      }
    break;

    case "list7":
    	document.form1.dwnimg.style.visibility="hidden";
      
      entry=0;
			setLink("#");
      for (j=0; j<entries.length; j++)
      {
       	if (  compare(entries[j].ent0,sel_list1)
      	    &&compare(entries[j].ent1,sel_list2)
      	    &&compare(entries[j].ent2,sel_list3)
      	    &&compare(entries[j].ent3,sel_list4)
      	    &&compare(entries[j].ent4,sel_list5)
      	    &&compare(entries[j].ent5,sel_list6)
      	    &&compare(entries[j].ent6,sel_list7)
      	   )
     	  {
         	document.form1.dwnimg.style.visibility="visible";
 			  	setLink(entries[j].download);
        }
      }
    break;
  	
  }
}


function pushbutton(btn)
{
	switch(btn)
	{
		case 1: document.form1.helplist1.src="button_info_pressed.gif"; break;
		case 2: document.form1.helplist2.src="button_info_pressed.gif"; break;
		case 3: document.form1.helplist3.src="button_info_pressed.gif"; break;
		case 4: document.form1.helplist4.src="button_info_pressed.gif"; break;
		case 5: document.form1.helplist5.src="button_info_pressed.gif"; break;
		case 6: document.form1.helplist6.src="button_info_pressed.gif"; break;
		case 7: document.form1.helplist7.src="button_info_pressed.gif"; break;
		case 7: document.form1.helplist7.src="button_info_pressed.gif"; break;
    case 99: document.form1.dwnimg.src="button_download_pressed.gif"; break;
  }
}	

function releasebutton(btn)
{
  switch(btn)
  {
	  case 1: document.form1.helplist1.src="button_info.gif"; break;
	  case 2: document.form1.helplist2.src="button_info.gif"; break;
	  case 3: document.form1.helplist3.src="button_info.gif"; break;
	  case 4: document.form1.helplist4.src="button_info.gif"; break;
	  case 5: document.form1.helplist5.src="button_info.gif"; break;
	  case 6: document.form1.helplist6.src="button_info.gif"; break;
	  case 7: document.form1.helplist7.src="button_info.gif"; break;
    case 99: document.form1.dwnimg.src="button_download.gif"; break;
  }
}
