/* author: Golant */
/* Creation date: 11.10.2004 */
/* Update date: 27.03.07 */

function filterausw()
{
    i = document.forms.Form0.Fiar.options.selectedIndex;
    if (i == "0")
    {
		document.getElementById('I3').src = "0.html";
    };
	if (i == "1")
	{
		document.getElementById('I3').src = "Start/start_filter_air.html";
	};
	if (i == "2")
	{
		document.getElementById('I3').src = "Start/start_filter_oil.html";
	};
	if (i == "3")
	{
		document.getElementById('I3').src = "Start/start_filter_kraft.html";
	};
	if (i == "4")
	{
		document.getElementById('I3').src = "Start/start_filter_hydr.html";
	};
	if (i == "5")
	{
		document.getElementById('I3').src = "Start/start_filter_hg.html";
	};
	if (i == "6")
	{
		document.getElementById('I3').src = "Start/start_filter_kabin.html";
	};
	if (i == "7")
	{
		document.getElementById('I3').src = "Start/start_filter_kf.html";
	};
	if (i == "8")
	{
		document.getElementById('I3').src = "Start/start_filter_le.html";
	};
	if (i == "9")
	{
		document.getElementById('I3').src = "Start/start_filter_lt.html";
	};
	if (i == "10")
	{
		document.getElementById('I3').src = "Start/start_filter_sport.html";
	};
	if (i == "11"){
		if (document.lang == "rus")
		{
			document.getElementById('I3').src = "Start/start_filter_ers_rus.html";
		};
		if (document.lang == "deu")
		{
			document.getElementById('I3').src = "Start/start_filter_ers_deu.html";
		};
		if (document.lang == "eng")
		{
			document.getElementById('I3').src = "Start/start_filter_ers_eng.html";
		};
	};
}

function productstatus(){
	i = document.forms.myform.product.options.selectedIndex;
	y = document.forms.myform.product.options[i].value;
	i_WIN = window.showModalDialog(y,"i_WINNAME","dialogWidth:46; dialogHeight:43; center:yes; location:1; directories:0; status:0; menubar:0; copyhistory:0; resizable:1");
}

function filtrstatus(){
	i = document.forms.myform.product.options.selectedIndex;
	y = "../Filter_SCT/1" + document.forms.myform.product.options[i].value;
	i_WIN = window.showModalDialog(y,"i_WINNAME","dialogWidth:45.5; dialogHeight:41.1; center:yes; location:1; directories:0; status:0; menubar:0; copyhistory:0; resizable:1");
}

function filtrstatus_sport(){
	i = document.forms.myform.product.options.selectedIndex;
	if (document.lang == "rus")	{
		y = "../Filter_SCT/1" + document.forms.myform.product.options[i].value +"_rus.html";
		i_WIN = window.showModalDialog(y,"i_WINNAME","dialogWidth:45.5; dialogHeight:41.1; center:yes; location:1; directories:0; status:0; menubar:0; copyhistory:0; resizable:1");
	};
	if (document.lang == "deu")	{
		y = "../Filter_SCT/1" + document.forms.myform.product.options[i].value + "_deu.html";
		i_WIN = window.showModalDialog(y,"i_WINNAME","dialogWidth:45.5; dialogHeight:41.1; center:yes; location:1; directories:0; status:0; menubar:0; copyhistory:0; resizable:1");
	};	
	if (document.lang == "eng")	{
		y = "../Filter_SCT/1" + document.forms.myform.product.options[i].value + "_eng.html";
		i_WIN = window.showModalDialog(y,"i_WINNAME","dialogWidth:45.5; dialogHeight:41.1; center:yes; location:1; directories:0; status:0; menubar:0; copyhistory:0; resizable:1");
	};
}

function filtrersatz(){
	i = document.forms.myform.product.options.selectedIndex;
	y = "../Filter_SCT/1" + document.forms.myform.product.options[i].value;
	i_WIN = window.showModalDialog(y,"i_WINNAME","dialogWidth:45.5; dialogHeight:41.1; center:yes; location:1; directories:0; status:0; menubar:0; copyhistory:0; resizable:1");
}

function bremstatus(){
	i = document.forms.myform.product.options.selectedIndex;
	y = "../Bremse/1" + document.forms.myform.product.options[i].value;
	i_WIN = window.showModalDialog(y,"i_WINNAME","dialogWidth:46; dialogHeight:43; center:yes; location:1; directories:0; status:0; menubar:0; copyhistory:0; resizable:1");
}

function beltstatus(){
	i = document.forms.myform.product.options.selectedIndex;
	y = "../Belts_SCT/" + document.forms.myform.product.options[i].value;
	i_WIN = window.showModalDialog(y, "i_WINNAME", "dialogWidth:46; dialogHeight:42; center:yes; location:1; directories:0; status:0; menubar:0; copyhistory:0; resizable:1");
}

function kerzstatuscl(){
	i = document.forms.myform.product.options.selectedIndex;
	y = "../Kerzen_SCT/" + document.forms.myform.product.options[i].value;
	i_WIN = window.showModalDialog(y, "i_WINNAME", "dialogWidth:46; dialogHeight:42; center:yes; location:1; directories:0; status:0; menubar:0; copyhistory:0; resizable:1");
}

function kerzstatusperf(){
	i = document.forms.myform.product.options.selectedIndex;
	y = "../Kerzen_SCT/" + document.forms.myform.product.options[i].value;
	i_WIN = window.showModalDialog(y, "i_WINNAME", "dialogWidth:46; dialogHeight:42; center:yes; location:1; directories:0; status:0; menubar:0; copyhistory:0; resizable:1");
}

function kerzstatuspl(){
	i = document.forms.myform.product.options.selectedIndex;
	y = "../Kerzen_SCT/" + document.forms.myform.product.options[i].value;
	i_WIN = window.showModalDialog(y, "i_WINNAME", "dialogWidth:46; dialogHeight:42; center:yes; location:1; directories:0; status:0; menubar:0; copyhistory:0; resizable:1");
}

function kerzstatustun(){
	i = document.forms.myform.product.options.selectedIndex;
	y = "../Kerzen_SCT/" + document.forms.myform.product.options[i].value;
	i_WIN = window.showModalDialog(y, "i_WINNAME", "dialogWidth:46; dialogHeight:42; center:yes; location:1; directories:0; status:0; menubar:0; copyhistory:0; resizable:1");
}

function kerzstatusgl(){
	i = document.forms.myform.product.options.selectedIndex;
	y = "../Kerzen_SCT/" + document.forms.myform.product.options[i].value;
	i_WIN = window.showModalDialog(y, "i_WINNAME", "dialogWidth:46; dialogHeight:42; center:yes; location:1; directories:0; status:0; menubar:0; copyhistory:0; resizable:1");
}

function lampstatus(){
	i = document.forms.myform.product.options.selectedIndex;
	y = "../Lamps/" + document.forms.myform.product.options[i].value;
	i_WIN = window.showModalDialog(y, "i_WINNAME", "dialogWidth:46; dialogHeight:42; center:yes; location:1; directories:0; status:0; menubar:0; copyhistory:0; resizable:1");
}

function bladestatus(){
	i = document.forms.myform.product.options.selectedIndex;
	y = "../Blades/" + document.forms.myform.product.options[i].value;
	i_WIN = window.showModalDialog(y, "i_WINNAME", "dialogWidth:28; dialogHeight:28; center:yes; location:1; directories:0; status:0; menubar:0; copyhistory:0; resizable:1");
}

function amortstatus(){
	i = document.forms.myform.product.options.selectedIndex;
	y = "../Amort/" + document.forms.myform.product.options[i].value;
	i_WIN = window.showModalDialog(y, "i_WINNAME", "dialogWidth:46; dialogHeight:43; center:yes; location:1; directories:0; status:0; menubar:0; copyhistory:0; resizable:1");
}

function andstatus(){
	i = document.forms.myform.product.options.selectedIndex;
	y = "../Andere/" + document.forms.myform.product.options[i].value;
	i_WIN = window.showModalDialog(y, "i_WINNAME", "dialogWidth:46; dialogHeight:43; center:yes; location:1; directories:0; status:0; menubar:0; copyhistory:0; resizable:1");
}

function podstatus(){
	i = document.forms.myform.product.options.selectedIndex;
	y = "../Podsh/" + document.forms.myform.product.options[i].value;
	i_WIN = window.showModalDialog(y, "i_WINNAME", "dialogWidth:46; dialogHeight:43; center:yes; location:1; directories:0; status:0; menubar:0; copyhistory:0; resizable:1");
}

function FilOpen_onclick(){
	document.getElementById('divfil').style.visibility = "visible";
	document.getElementById('I1').src = "Start/start_filter.html";
	document.getElementById('I2').src = "0.html";
	document.getElementById('I3').src = "0.html";
	//alert(document.forms.ButForm.B1_i);
	document.forms.ButForm.B1_i.src = "images/Bilder_anw/filtr1.gif";
	//alert('qqq1')
	document.forms.ButForm.B2_i.src = "images/Bilder_anw/brake2.gif";
	//alert('qqq2');
	document.forms.ButForm.B3_i.src = "images/Bilder_anw/belt2.gif";
	document.forms.ButForm.B4_i.src = "images/Bilder_anw/kerze2.gif";
	document.forms.ButForm.B5_i.src = "images/Bilder_anw/lampe2.gif";
	document.forms.ButForm.B6_i.src = "images/Bilder_anw/blade2.gif";
	document.forms.ButForm.B7_i.src = "images/Bilder_anw/amort2.gif";
	document.forms.ButForm.B8_i.src = "images/Bilder_anw/pod2.gif";
	document.forms.ButForm.B9_i.src = "images/Bilder_anw/and2.gif";
	//alert('qqq3')
}

function Br_Open_onclick(){
	document.getElementById('divfil').style.visibility = "hidden";
	document.getElementById('I1').src = "Start/start_br.html";
	document.getElementById('I2').src = "0.html";
	document.getElementById('I3').src = "0.html";
	document.forms.ButForm.B1_i.src = "images/Bilder_anw/filtr2.gif";
	document.forms.ButForm.B2_i.src = "images/Bilder_anw/brake1.gif";
	document.forms.ButForm.B3_i.src = "images/Bilder_anw/belt2.gif";
	document.forms.ButForm.B4_i.src = "images/Bilder_anw/kerze2.gif";
	document.forms.ButForm.B5_i.src = "images/Bilder_anw/lampe2.gif";
	document.forms.ButForm.B6_i.src = "images/Bilder_anw/blade2.gif";
	document.forms.ButForm.B7_i.src = "images/Bilder_anw/amort2.gif";
	document.forms.ButForm.B8_i.src = "images/Bilder_anw/pod2.gif";
	document.forms.ButForm.B9_i.src = "images/Bilder_anw/and2.gif";
}

function Ker_Open_onclick(){
	document.getElementById('divfil').style.visibility = "hidden";
	document.getElementById('I2').src = "0.html";
	document.getElementById('I3').src = "0.html";
	document.forms.ButForm.B1_i.src = "images/Bilder_anw/filtr2.gif";
	document.forms.ButForm.B2_i.src = "images/Bilder_anw/brake2.gif";
	document.forms.ButForm.B3_i.src = "images/Bilder_anw/belt2.gif";
	document.forms.ButForm.B4_i.src = "images/Bilder_anw/kerze1.gif";
	document.forms.ButForm.B5_i.src = "images/Bilder_anw/lampe2.gif";
	document.forms.ButForm.B6_i.src = "images/Bilder_anw/blade2.gif";
	document.forms.ButForm.B7_i.src = "images/Bilder_anw/amort2.gif";
	document.forms.ButForm.B8_i.src = "images/Bilder_anw/pod2.gif";
	document.forms.ButForm.B9_i.src = "images/Bilder_anw/and2.gif";
	{
		if (document.lang == "rus")
			document.getElementById('I1').src = "Start/start_kerz_rus.html";
		if (document.lang == "eng")
			document.getElementById('I1').src = "Start/start_kerz_eng.html";
		if (document.lang == "deu")
			document.getElementById('I1').src = "Start/start_kerz_deu.html";
	}
}

function Bel_Open_onclick(){
	document.getElementById('divfil').style.visibility = "hidden";
	document.getElementById('I1').src = "Start/start_belts.html";
	document.getElementById('I2').src = "0.html";
	document.getElementById('I3').src = "0.html";
	document.forms.ButForm.B1_i.src = "images/Bilder_anw/filtr2.gif";
	document.forms.ButForm.B2_i.src = "images/Bilder_anw/brake2.gif";
	document.forms.ButForm.B3_i.src = "images/Bilder_anw/belt1.gif";
	document.forms.ButForm.B4_i.src = "images/Bilder_anw/kerze2.gif";
	document.forms.ButForm.B5_i.src = "images/Bilder_anw/lampe2.gif";
	document.forms.ButForm.B6_i.src = "images/Bilder_anw/blade2.gif";
	document.forms.ButForm.B7_i.src = "images/Bilder_anw/amort2.gif";
	document.forms.ButForm.B8_i.src = "images/Bilder_anw/pod2.gif";
	document.forms.ButForm.B9_i.src = "images/Bilder_anw/and2.gif";
}

function Lampe_Open_onclick(){
	document.getElementById('divfil').style.visibility = "hidden";
	document.getElementById('I1').src = "Start/start_lamps.html";
	document.getElementById('I2').src = "0.html";
	document.getElementById('I3').src = "0.html";
	document.forms.ButForm.B1_i.src = "images/Bilder_anw/filtr2.gif";
	document.forms.ButForm.B2_i.src = "images/Bilder_anw/brake2.gif";
	document.forms.ButForm.B3_i.src = "images/Bilder_anw/belt2.gif";
	document.forms.ButForm.B4_i.src = "images/Bilder_anw/kerze2.gif";
	document.forms.ButForm.B5_i.src = "images/Bilder_anw/lampe1.gif";
	document.forms.ButForm.B6_i.src = "images/Bilder_anw/blade2.gif";
	document.forms.ButForm.B7_i.src = "images/Bilder_anw/amort2.gif";
	document.forms.ButForm.B8_i.src = "images/Bilder_anw/pod2.gif";
	document.forms.ButForm.B9_i.src = "images/Bilder_anw/and2.gif";
}

function Blade_Open_onclick(){
	document.getElementById('divfil').style.visibility = "hidden";
	document.getElementById('I1').src = "Start/start_blades.html";
	document.getElementById('I2').src = "0.html";
	document.getElementById('I3').src = "0.html";
	document.forms.ButForm.B1_i.src = "images/Bilder_anw/filtr2.gif";
	document.forms.ButForm.B2_i.src = "images/Bilder_anw/brake2.gif";
	document.forms.ButForm.B3_i.src = "images/Bilder_anw/belt2.gif";
	document.forms.ButForm.B4_i.src = "images/Bilder_anw/kerze2.gif";
	document.forms.ButForm.B5_i.src = "images/Bilder_anw/lampe2.gif";
	document.forms.ButForm.B6_i.src = "images/Bilder_anw/blade1.gif";
	document.forms.ButForm.B7_i.src = "images/Bilder_anw/amort2.gif";
	document.forms.ButForm.B8_i.src = "images/Bilder_anw/pod2.gif";
	document.forms.ButForm.B9_i.src = "images/Bilder_anw/and2.gif";
}

function Amort_Open_onclick(){
	document.getElementById('divfil').style.visibility = "hidden";
	document.getElementById('I1').src = "Start/start_amort.html";
	document.getElementById('I2').src = "0.html";
	document.getElementById('I3').src = "0.html";
	document.forms.ButForm.B1_i.src = "images/Bilder_anw/filtr2.gif";
	document.forms.ButForm.B2_i.src = "images/Bilder_anw/brake2.gif";
	document.forms.ButForm.B3_i.src = "images/Bilder_anw/belt2.gif";
	document.forms.ButForm.B4_i.src = "images/Bilder_anw/kerze2.gif";
	document.forms.ButForm.B5_i.src = "images/Bilder_anw/lampe2.gif";
	document.forms.ButForm.B6_i.src = "images/Bilder_anw/blade2.gif";
	document.forms.ButForm.B7_i.src = "images/Bilder_anw/amort1.gif";
	document.forms.ButForm.B8_i.src = "images/Bilder_anw/pod2.gif";
	document.forms.ButForm.B9_i.src = "images/Bilder_anw/and2.gif";
}

function Pod_Open_onclick(){
	document.getElementById('divfil').style.visibility = "hidden";
	document.getElementById('I1').src = "Start/start_pod.html";
	document.getElementById('I2').src = "0.html";
	document.getElementById('I3').src = "0.html";
	document.forms.ButForm.B1_i.src = "images/Bilder_anw/filtr2.gif";
	document.forms.ButForm.B2_i.src = "images/Bilder_anw/brake2.gif";
	document.forms.ButForm.B3_i.src = "images/Bilder_anw/belt2.gif";
	document.forms.ButForm.B4_i.src = "images/Bilder_anw/kerze2.gif";
	document.forms.ButForm.B5_i.src = "images/Bilder_anw/lampe2.gif";
	document.forms.ButForm.B6_i.src = "images/Bilder_anw/blade2.gif";
	document.forms.ButForm.B7_i.src = "images/Bilder_anw/amort2.gif";
	document.forms.ButForm.B8_i.src = "images/Bilder_anw/pod1.gif";
	document.forms.ButForm.B9_i.src = "images/Bilder_anw/and2.gif";
}

function And_Open_onclick(){
	document.getElementById('divfil').style.visibility = "hidden";
	document.getElementById('I1').src = "Start/start_and.html";
	document.getElementById('I2').src = "0.html";
	document.getElementById('I3').src = "0.html";
	document.forms.ButForm.B1_i.src = "images/Bilder_anw/filtr2.gif";
	document.forms.ButForm.B2_i.src = "images/Bilder_anw/brake2.gif";
	document.forms.ButForm.B3_i.src = "images/Bilder_anw/belt2.gif";
	document.forms.ButForm.B4_i.src = "images/Bilder_anw/kerze2.gif";
	document.forms.ButForm.B5_i.src = "images/Bilder_anw/lampe2.gif";
	document.forms.ButForm.B6_i.src = "images/Bilder_anw/blade2.gif";
	document.forms.ButForm.B7_i.src = "images/Bilder_anw/amort2.gif";
	document.forms.ButForm.B8_i.src = "images/Bilder_anw/pod2.gif";
	document.forms.ButForm.B9_i.src = "images/Bilder_anw/and1.gif";
}

function kerzenausw(){
	i = document.KerzAusw.options.selectedIndex;
	if (i == "1")
	{
		document.getElementById('I2').src = "start_kerz_cl.html";
	};
	if (i == "2")
	{
		document.getElementById('I2').src = "start_kerz_perf.html";
	};
	if (i == "3")
	{
		document.getElementById('I2').src = "start_kerz_pl.html";
	};
	if (i == "4")
	{
		document.getElementById('I2').src = "start_kerz_tun.html";
	};
	if (i == "5")
		if (i == "5")
		{
			document.getElementById('I2').src = "start_kerz_gl.html";
		};
	if (i == "6")
	{
		document.getElementById('I2').src = "start_kerz_kab.html";
	};
}

function click() {
	//if (event.button==2) {
	//alert('Copyright by SCT Germany!')}
}
document.onmousedown=click

function unvisible() {
	document.getElementById('I3').src = "../0.html";
}

function start_sct() {
	document.getElementById('I3').src = "0.html";
	document.getElementById('I2').src = "0.html";
	document.getElementById('divfil').style.visibility = "hidden";
	document.getElementById('I1').src = "Start/start_all.html";
}

function unvisible_all() {
	document.getElementById('I3').src = "../0.html";
	document.forms.myform.product.style.visibility = "visible"
}

/*==================================================*
 $Id$
 Copyright 2003 Patrick Fitzgerald
 http://www.barelyfitz.com/webdesign/articles/filterlist/

 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *==================================================*/

function filterlist(selectobj) {

  // VARIABLES

  // HTML SELECT object
  this.selectobj = selectobj;

  // Flags for regexp matching.
  // "i" = ignore case; "" = do not ignore case
  this.flags = "i";

  // Make a copy of the options array
  this.optionscopy = new Array();
  for (var i=0; i < selectobj.options.length; i++) {
    this.optionscopy[i] = new Option();
    this.optionscopy[i].text = selectobj.options[i].text;
    this.optionscopy[i].value = selectobj.options[i].value;
  }

  //==================================================
  // METHODS
  //==================================================

  //--------------------------------------------------
  this.reset = function() {
  // This method resets the select list to the original state.
  // It also unselects all of the options.

    this.set("");
  }

  //--------------------------------------------------
  this.set = function(pattern) {
  // This method removes all of the options from the select list,
  // then adds only the options that match the pattern regexp.
  // It also unselects all of the options.
  // In case of a regexp error, returns false

    var loop=0, index=0, regexp, e;

    // Clear the select list so nothing is displayed
    this.selectobj.options.length = 0;

    // Set up the regular expression
    try {
      regexp = new RegExp(pattern, this.flags);
    } catch(e) {
      return;
    }

    // Loop through the entire select list
    for (loop=0; loop < this.optionscopy.length; loop++) {

      // Check if we have a match
      if (regexp.test(this.optionscopy[loop].text)) {

        // We have a match, so add this option to the select list
        this.selectobj.options.length = index + 1;
        this.selectobj.options[index].text = this.optionscopy[loop].text;
        this.selectobj.options[index].value = this.optionscopy[loop].value;
        this.selectobj.options[index].selected = false;

        // Increment the index
        index++;
      }
    }
  }

  //--------------------------------------------------
  this.set_ignore_case = function(value) {
  // This method sets the regexp flags.
  // If value is true, sets the flags to "i".
  // If value is false, sets the flags to "".

    if (value) {
      this.flags = "i";
    } else {
      this.flags = "";
    }
  }

}

