//Generated By Easy HTML To Any Script Converter
document.writeln("<SCRIPT TYPE=\"text/javascript\" LANGUAGE=\"JavaScript\">");
document.writeln("<!--");
document.writeln("// Autorem skryptu jest: SŁAWOMIR KOKŁOWSKI");
document.writeln("// www.kurshtml.boo.pl");
document.writeln("");
document.writeln("var karty = new Array(");
document.writeln("new karta(0),");
document.writeln("new karta(9),");
document.writeln("new karta(2),");
document.writeln("new karta(0),");
document.writeln("new karta(1),");
document.writeln("new karta(3)");
document.writeln(");");
document.writeln("");
document.writeln("");
document.writeln("var szybko = false;");
document.writeln("var czas = new Date();");
document.writeln("");
document.writeln("");
document.writeln("function display(id, wartosc)");
document.writeln("{");
document.writeln("  if (wartosc)");
document.writeln("  {");
document.writeln("    if (document.getElementById) document.getElementById(id).style.display = wartosc;");
document.writeln("    else if (document.all) document.all[id].style.display = wartosc;");
document.writeln("  }");
document.writeln("  else");
document.writeln("  {");
document.writeln("    var wart = \"\";");
document.writeln("    if (document.getElementById) wart = document.getElementById(id).style.display;");
document.writeln("    else if (document.all) wart = document.all[id].style.display;");
document.writeln("    return wart; ");
document.writeln("  }");
document.writeln("}");
document.writeln("");
document.writeln("function ukryj(id)");
document.writeln("{");
document.writeln("  for (var i = 0; i < karty[id].ilosc; i++) display(\"nr\" + id + \"_\" + i, \"none\");");
document.writeln("  display(\"nr\" + id, \"none\");");
document.writeln("  karty[id].rozwinieta = false;");
document.writeln("}");
document.writeln("");
document.writeln("var id_rozwin_zwin = 0;");
document.writeln("");
document.writeln("function rozwin_zwin(id, nr)");
document.writeln("{");
document.writeln("  if (!nr)");
document.writeln("  {");
document.writeln("    var nr = 0;");
document.writeln("    if (!karty[id].rozwinieta) for (var i = 0; i < karty.length; i++) if (i != id) ukryj(i);");
document.writeln("    czas = new Date();");
document.writeln("  }");
document.writeln("");
document.writeln("  if (nr < karty[id].ilosc)");
document.writeln("  {");
document.writeln("    if (karty[id].rozwinieta)");
document.writeln("    {");
document.writeln("      if (szybko) display(\"nr\" + id + \"_\" + nr++, \"none\");");
document.writeln("      if (nr < karty[id].ilosc) display(\"nr\" + id + \"_\" + nr, \"none\");");
document.writeln("    }");
document.writeln("    else");
document.writeln("    {");
document.writeln("      display(\"nr\" + id, \"block\");");
document.writeln("      if (szybko) display(\"nr\" + id + \"_\" + nr++, \"block\");");
document.writeln("      if (nr < karty[id].ilosc) display(\"nr\" + id + \"_\" + nr, \"block\");");
document.writeln("    }");
document.writeln("  }");
document.writeln("");
document.writeln("  nr++;");
document.writeln("  clearTimeout(id_rozwin_zwin);");
document.writeln("  if (nr < karty[id].ilosc) id_rozwin_zwin = setTimeout(\'rozwin_zwin(\' + id + \',\' + nr + \')\', 10);");
document.writeln("  else");
document.writeln("  {");
document.writeln("    if (karty[id].rozwinieta) display(\"nr\" + id, \"none\");");
document.writeln("    if (!szybko && new Date() - czas > karty[id].ilosc*25) szybko = true;");
document.writeln("    else if (szybko && new Date() - czas < karty[id].ilosc*12) szybko = false;");
document.writeln("    karty[id].rozwinieta = (karty[id].rozwinieta ? false : true);");
document.writeln("  }");
document.writeln("}");
document.writeln("");
document.writeln("function karta(il)");
document.writeln("{");
document.writeln("  this.ilosc = il;");
document.writeln("  this.rozwinieta = true;");
document.writeln("}");
document.writeln("//-->");
document.writeln("<\/SCRIPT>");
