// globel variables and functions
// start 2003-12-22 by Andreas Hellmann

var picdir="pictures";
var prevdir="h110";

var piclocal="../";
var pichellmann="http://www.ahellmann.de/";

var picmeetings=pichellmann;

// variables for "random" pictures on home page:
var topdirnames=new Array ("1_intro", "2_forum", "3_members", "4_meetings", "5_practice", "6_data", "7_galery", "8_marketplace", "9_links");
var dirprevpics=new Array (	"1_1", 
						"3_1",
						"3_4", 
						"3_5",
						"3_6",
						"3_7",
						"3_8",
						"3_9",
						"3_10",
						"3_11",
						"3_12",
						"3_13",
						"3_14",
						"3_15",
						"3_17",
						"3_18",
						"3_19",
						"3_20",
						"3_21",
						"3_22",
						"3_23",
						"3_24",
						"3_25",
						"3_26",
						"3_27",
						"3_28",
						"3_29",
						"3_30",
						"3_31",
						"3_32",
						"3_33",
						"3_34",
						"3_35",
						"3_36",
						"3_37",
						"3_38",
						"3_39",
						"3_40",
						"3_41",
						"3_42",
						"3_43",
						"3_44",
						"3_45",
						"3_46",
						"3_47",
						"3_48",
						"3_49",
						"3_50",
						"3_51",
						"3_52",
						"3_53",
						"3_54",
						"3_55",
						"3_56",
						"3_57",
						"3_58",
						"3_59",
						"3_60",
						"3_61",
						"3_62",
						"3_63",
						"3_64",
						"3_65",
						"3_66",
						"3_67",
						"3_68",
						"3_69",
						"3_70",
						"3_71",
						"3_72",
						"3_73",
						"3_74",
						"3_75",
						"3_76",
						"3_77",
						"3_78",
						"3_79",
						"3_80",
						"3_81",
						"3_82",
						"3_83",
						"3_84",
						"3_85",
						"3_86",
						"3_87",
						"3_88",
						"3_89",
						"3_90",
						"3_91",
						"3_92",
						"3_93",
						"3_94",
						"3_95",
						"3_96",
						"3_97",
						"3_98",
						"3_99",
						"3_100",
						"3_101",
						"3_102",
						"3_103",
						"3_104",
						"3_105",
						"3_106",
						"3_107",
						"3_108",
						"3_109",
						"3_110",
						"3_111",
						"3_112",
						"3_113",
						"3_114",
						"3_115",
						"3_116",
						"3_117",
						"3_118",
						"3_119",
						"3_120",
						"3_121",
						"3_122",
						"3_123",
						"3_124",
						"4_1", 
						"4_2", 
						"4_3", 
						"4_4", 
						"4_5", 
						"4_6", 
						"4_7", 
						"4_9", 
						"4_10", 
						"4_11", 
						"4_12", 
						"4_13",
						"4_14",
						"4_15_1",
						"4_15_2",
						"4_15_3",
						"4_16",
						"4_17",
						"4_18_1",
						"4_18_2",
						"4_19_1",
						"4_19_2",
						"4_20",
						"4_21",
						"4_22",
						"4_23",
						"4_24_1",
						"4_24_2",
						"4_24_3",
						"4_25",
						"4_26_1",
						"4_26_2",
						"4_28_1",
						"4_28_2",
						"4_28_3",
						"4_29",
						"4_30",
						"4_32_1",
						"4_32_2",
						"4_33",
						"4_34_1",
						"4_34_2",
						"4_34_3",
						"4_35",
						"4_36",
						"4_37",
						"4_38",
						"4_39",
						"4_40",
						"5_1_2",
						"5_1_3",
						"5_1_4",
						"7_1",
						"7_2",
						"7_5",
						"7_6"
						);
						
var serverlocation=new Array (	piclocal,	//1_1 Intro -> Prototypen FIAT
							piclocal, 	//3_1 Hellmann, Andreas
							piclocal, 	//3_4 Böcker, Stephan
							piclocal,	//3_5 Poeschl, Peter
							piclocal,	//3_6 Venhoven, Jürgen
							piclocal,	//3_7 Boner, Christian
							piclocal,	//3_8 Nobs, Gautier
							piclocal,	//3_9 Gonzewski, Holger
							piclocal,  //3_10 Schmitz, Kurt
							piclocal, 	//3_11 Korzilius, Joachim
							piclocal,	//3_12 Pföhs, Rudolf
							piclocal,	//3_13 Keding, Thorsten
							piclocal,	//3_14 Hippe, Jens
							piclocal, 	//3_15 Frank, Kaare
							piclocal,	//3_17 Bockel, Mike
							piclocal,	//3_18 Beauge, Stephanie
							piclocal,	//3_19 Daffne Kaufmann
							piclocal,	//3_20 Bader, Koni&Heidy
							piclocal,	//3_21 Hassenpflug, Holger
							piclocal,	//3_22 Ludwig, Dennis
							piclocal,  //3_23 Hannemann, Rainer
							piclocal,	//3_24 Beck, Dominik
							piclocal,	//3_25 Fabrice Morello
							piclocal,	//3_26 Maurer, Marcus
							piclocal,	//3_27 Hycel
							piclocal,	//3_28 Henk Hoekstra
							pichellmann,	//3_29 Albert Byvalin
							pichellmann,	//3_30 Korf, Thomas
							pichellmann,	//3_31 Wentink, Ronald
							pichellmann,	//3_32 Macek, Christian
							pichellmann,	//3_33 Pasat, Tudor
							pichellmann,	//3_34 Furitsch, Peter
							pichellmann,	//3_35 Pozdrawiam, Marcin
							pichellmann,	//3_36 Grom, Udo 
							pichellmann,	//3_37 Lutz, Tobias
							pichellmann,	//3_38 Stein Atle Amundsen
							pichellmann,	//3_39 Daniele Russo
							pichellmann,	//3_40 Vogna Rino
							pichellmann,	//3_41 vd Zaag, Mient
							pichellmann,	//3_42 Coghlan James
							pichellmann,	//3_43 Gräsel, Volker
							pichellmann,	//3_44 Nerge, Gero
							pichellmann,	//3_45 Schmidt, Erik
							pichellmann,	//3_46 Tuttolomondo Giuseppe
							pichellmann,	//3_47 Torres, David
							pichellmann,	//3_48 Holota, Zsolt
							pichellmann,	//3_49 Frik, Harald
							pichellmann,	//3_50 Bernd, Marko
							pichellmann,	//3_51 Ibarra Byron
							pichellmann,	//3_52 Simmons, Gene
							pichellmann,	//3_53 Torbjørn Eilefsen
							pichellmann,	//3_54 Wolfgang Feneberg
							pichellmann,	//3_55 Rudime Andreas
							pichellmann,	//3_56 Horbach, Thomas
							pichellmann,	//3_57 Franceschini, Alessandro
							pichellmann,	//3_58 Walraven, Harry
							pichellmann,	//3_59 Broberg Andre
							pichellmann,	//3_60 mamoun habbaq
							pichellmann,	//3_61 Gertaud Markus
							pichellmann,	//3_62 Chaloupek, M.
							pichellmann,	//3_63 Frohnwieser, Norbert
							pichellmann,	//3_64 Deller, Pascal
							pichellmann,	//3_65 Schaab, Torsten
							pichellmann,	//3_66 Susca, Giovanni
							pichellmann,	//3_67 Morsbach, Markus
							pichellmann,	//3_68 Straffi, Auro
							pichellmann,	//3_69 Jorge Soto Illesca
							pichellmann,	//3_70 Fairbank, Chris
							pichellmann,	//3_71 Filipovic Nebojsa
							pichellmann,	//3_72 Constantin Alin - Daniel
							pichellmann,	//3_73 Håvard Stand
							pichellmann,	//3_74 Dekker Bob
							pichellmann,	//3_75 Sreblowsky Gregory
							pichellmann,	//3_76 Heusschen, Nicolas
							pichellmann,	//3_77 Avola, Giuseppe
							pichellmann,	//3_78 Katers, Hans
							pichellmann,	//3_79 Alberto Massarotto
							pichellmann,	//3_80 Ovalle, Erick
							pichellmann,	//3_81 Faggiano Marco
							pichellmann,	//3_82 Ackerl, Johann
							pichellmann,	//3_83 Hetlar Ahmed
							pichellmann,	//3_84 David González
							pichellmann,	//3_85 Rey, Patrik
							pichellmann,	//3_86 Vladan Nikolic
							pichellmann,	//3_87 Damoser Andreas
							pichellmann,	//3_88 Lüttig, Reinhold
							pichellmann,	//3_89 Toth, Roland
							pichellmann,	//3_90 Mühringer, Johannes
							pichellmann,	//3_91 Reich, Susanne
							pichellmann,	//3_92 Ruffle, Paul
							pichellmann,	//3_93 Gramby, Marcus
							pichellmann,	//3_94 Riesenhuber, Gerhard
							pichellmann,	//3_95 Van der Val, Siger
							pichellmann, 	//3_96 Whba, Mohamed
							pichellmann,	//3_97 Strey, Michael
							pichellmann,	//3_98 Carlsson, Uffe
							pichellmann,	//3_99 Mattes, Juergen
							pichellmann,	//3_100 Szollár Csaba
							pichellmann,	//3_101 Weber, Matthias
							pichellmann,	//3_102 Miklós, Ábrahám
							pichellmann,	//3_103 Reist Thomas
							pichellmann,	//3_104 Kreil Manfred
							pichellmann,	//3_105 Perets Claudia
							pichellmann,	//3_106 Ryan Kooken
							pichellmann,	//3_107 Klaus Dirschl
							pichellmann,	//3_108 Hagman Roland
							pichellmann,	//3_109 Schulz Thomas
							pichellmann,	//3_110 Dollereder Markus
							pichellmann,	//3_111 Vitali, Roberto
							pichellmann,	//3_112 Reggio, Marco
							pichellmann,	//3_113 Gerdes, Jan
							pichellmann,	//3_114 
							pichellmann,	//3_115 Lehner, Karl
							pichellmann,	//3_116 van Rees, Cor
							pichellmann,	//3_117 Jan Konecny
							pichellmann,	//3_118 Bas Buitendijk
							pichellmann,	//3_119 Beat Heiniger
							pichellmann,	//3_120 Hashim Acim
							pichellmann,	//3_121 Wilan Joa Cabrera
							pichellmann,	//3_122 Ohtani Goh
							pichellmann,	//3_123 Thomas Wiggenhausen
							pichellmann,	//3_124 Berghoff Tobias
							picmeetings, 	//4_1 Treffen 1
							picmeetings, 	//4_2 Treffen 2
							picmeetings, 	//4_3 Treffen 3
							picmeetings,	//4_4 Treffen 4
							picmeetings,	//4_5 Treffen 5
							picmeetings, 	//4_6 Treffen 6 
							picmeetings, 	//4_7 Treffen 7
							picmeetings, 	//4_9 Treffen 9
							picmeetings, 	//4_10 Treffen 10
							picmeetings, 	//4_11 Treffen 11
							picmeetings, 	//4_12 Treffen 12
							picmeetings, 	//4_13 Treffen 13
							picmeetings,   //4_14 Treffen 14
							picmeetings,   //4_15_1 Treffen 15
							picmeetings,   //4_15_2 Treffen 15
							picmeetings,   //4_15_3 Treffen 15
							picmeetings, 	//4_16 Treffen 16
							picmeetings,	//4_17 Treffen 17
							picmeetings,	//4_18_1 Treffen 18
							picmeetings,	//4_18_2 Treffen 18
							picmeetings,	//4_19_1 Treffen 19
							picmeetings,	//4_19_2 Treffen 19
							picmeetings,	//4_20 Treffen 20
							picmeetings,	//4_21 Treffen 21
							picmeetings,	//4_22 Treffen 22
							picmeetings,	//4_23 Treffen 23
							picmeetings,	//4_24_1 Treffen 24
							picmeetings,	//4_24_2 Treffen 24
							picmeetings,	//4_24_3 Treffen 24
							picmeetings,	//4_25 Treffen 25
							picmeetings,	//4_26_1 Treffen 26
							picmeetings,	//4_26_2 Treffen 26
							picmeetings,	//4_28_1 Treffen 28
							picmeetings,	//4_28_2 Treffen 28
							picmeetings,	//4_28_3 Treffen 28
							picmeetings,	//4_29 Treffen 29
							picmeetings,	//4_30 Treffen 30
							picmeetings,	//4_32_1 Treffen 32
							picmeetings,	//4_32_2 Treffen 32
							picmeetings, 	//4_33 Treffen 33
							picmeetings,	//4_34_1 Treffen 34
							picmeetings,	//4_34_2 Treffen 34
							picmeetings,	//4_34_1 Treffen 34
							picmeetings,	//4_35 Treffen 35
							picmeetings,	//4_36 Treffen 36
							picmeetings,	//4_37 Treffen 37
							picmeetings,	//4_38 Treffen 38
							picmeetings,	//4_39 Treffen 39
							picmeetings,	//4_40 Treffen 40
							piclocal,		//5_1_2 Hellmann Gala Restauration
							piclocal,		//5_1_3 Hellmann Cabrio rot
							piclocal,		//5_1_4 Marco Bernd Restaurierung
							piclocal,		//7_1 Prospekt-Galerie
							piclocal,		//7_2 Bild des Monats
							picmeetings,	//7_5 Bunter Mix
							pichellmann	//7_6 Modellautos
						);
																			
var numberpics=new Array (	40,	//1_1 Intro -> Prototypen FIAT
						46, 	//3_1 Hellmann, Andreas
						3,	//3_4 Böcker, Stephan
						5,	//3_5 Poeschl, Peter
						25,	//3_6 Venhoven, Jürgen
						2,	//3_7 Boner, Christian
						12,	//3_8 Nobs, Gautier
						6,	//3_9 Gonzewski, Holger
						19,	//3_10 Schmitz, Kurt
						7,	//3_11 Korzilius, Joachim
						2,	//3_12 Pföhs, Rudolf
						1,	//3_13 Keding, Thorsten
						4,	//3_14 Hippe, Jens
						1,	//3_15 Frank, Kaare
						14,	//3_17 Bockel, Michael
						6,	//3_18 Beauge, Stephanie
						22,	//3_19 Daffne Kaufmann
						11,	//3_20 Bader, Koni & Heidy
						1,	//3_21 Hassenpflug, Holger
						10,	//3_22 Ludwig, Dennis
						20,	//3_23 Hannemann, Rainer
						4,	//3_24 Beck, Dominik
						4,	//3_25 Fabrice Morello
						5,	//3_26 Maurer, Marcus
						3,	//3_27 Hycel
						8,	//3_28 Henk Hoekstra
						16,	//3_29 Albert Byvalin
						5,	//3_30 Korf, Thomas
						14, //3_31 Wentink, Ronald
						1,	//3_32 Macek, Christian
						2,	//3_33 Pasat, Tudor
						2,	//3_34 Furitsch, Peter
						2,	//3_35 Pozdrawiam, Marcin
						4,	//3_36 Grom, Udo
						2,	//3_37 Lutz, Tobias
						7,	//3_38 Stein Atle Amundsen
						5,	//3_39 Russo, Daniele
						4, 	//3_40 Vogna Rino
						12,	//3_41 vd Zaag, Mient
						8,	//3_42 Coghlan James
						3,	//3_43 Gräsel, Volker
						3,	//3_44 Nerge, Gero
						12,	//3_45 Schmidt, Erik
						1,	//3_46 Tuttolomondo Giuseppe
						13,	//3_47 Torres, David
						12,	//3_48 Holota, Zsolt
						4,	//3_49 Frik, Harald
						5,	//3_50 Bernd, Marko
						5,	//3_51 Ibarra Byron
						4,	//3_52 Simmons, Gene
						4, 	//3_53 Torbjørn Eilefsen
						2,	//3_54 Wolfgang Feneberg
						5,	//3_55 Chiru, Andreas Rudi
						3,	//3_56 Horbach, Thomas
						3,	//3_57 Franceschini, Alessandro
						5,	//3_58 Walraven, Harry
						7,	//3_59 Broberg Andre
						18,	//3_60 mamoun habbaq
						9,	//3_61 Gertaud Markus
						2,	//3_62 Chaloupek, M.
						2,	//3_63 Frohnwieser, Norbert
						3,	//3_64 Deller, Pascal
						6,	//3_65 Schaab Torsten
						11,	//3_66 Susca, Giovanni
						4,	//3_67 Morsbach, Markus
						4,	//3_68 Straffi, Auro
						5,	//3_69 Jorge Soto Illesca
						4,	//3_70 Fairbank, Chris
						5,	//3_71 Filipovic Nebojsa
						4,	//3_72 Constantin Alin - Daniel
						7,	//3_73 Håvard Strand
						3,	//3_74 Dekker Bob
						1,	//3_75 Sreblowsky Gregory
						1,	//3_76 Heusschen, Nicolas
						5,	//3_77 Avola, Giuseppe
						2,	//3_78 Katers, Hans
						7,	//3_79 Alberto Massarotto
						4,	//3_80 Ovalle, Erick
						2,	//3_81 Faggiano Marco
						6,	//3_82 Ackerl, Johann
						1,	//3_83 Hetlar Ahmed
						6,	//3_84 David González
						9,	//3_85 Rey, Patrik
						7,	//3_86 Vladan Nikolic
						1,	//3_87 Damoser Andreas
						7,	//3_88 Lüttig, Reinhold
						4,	//3_89 Toth, Roland
						10,	//3_90 Mühringer, Johannes
						3,	//3_91 Reich, Susanne
						4,	//3_92 Ruffle, Paul
						9, 	//3_93 Gramby, Marcus
						2,	//3_94 Riesenhuber, Gerhard
						14,	//3_95 Van der Val, Siger
						3,	//3_96 Whba, Mohamed
						2,	//3_97 Strey, Michael
						3,	//3_98 Carlsson, Uffe
						4,	//3_99 Mattes, Juergen
						6,	//3_100 Szollár Csaba
						2,	//3_101 Weber, Matthias
						1,	//3_102 Miklós, Ábrahám 
						2,	//3_103 Reist Thomas
						8,	//3_104 Kreil Manfred
						1,	//3_105 Perets Claudia
						2,	//3_106 Ryan Kooken
						2,	//3_107 Klaus Dirschl
						2,	//3_108 Roland Hagmann
						6,	//3_109 Schulz Thomas
						3,	//3_110 Dollereder Markus
						5,  //3_111 Vitali, Roberto
						10,	//3_112 Reggio, Marco
						2, //3_113 Gerdes, Jan
						0,	//3_114 
						1,	//3_115 Lehner, Karl
						6,	//3_116 van Rees, Cor
						3,	//3_117 Jan Konecny
						6,	//3_118 Buitendijk, Bas
						8,	//3_119 Heiniger, Beat
						10,	//3_120 Hashim Acim
						6,	//3_121 Wilan Joa Cabrera
						4,	//3_122 Ohtani Goh
						5,	//3_123 Thomas Wiggenhausen
						8,	//3_124 Berghoff Tobias
						61, 	//4_1 Treffen 1
						4, 	//4_2 Treffen 1
						14, 	//4_3 Treffen 1
						33,	//4_4 Treffen 1
						26,	//4_5 Treffen 1
						94, 	//4_6 Treffen 1
						19, 	//4_7 Treffen 1
						85, 	//4_9 Treffen 1
						20, 	//4_10 Treffen 1
						9, 	//4_11 Treffen 1
						5, 	//4_12 Treffen 1
						43, 	//4_13 Treffen 1
						49,	//4_14 Treffen 1
						40,	//4_15_1 Treffen 15
						39,	//4_15_2 Treffen 15
						22,	//4_15_3 Treffen 15
						12,	//4_16 Treffen 16
						15,	//4_17 Treffen 17
						23,	//4_18_1 Treffen 18
						18,	//4_18_2 Treffen 18	
						23,	//4_19_1 Treffen 19
						20,	//4_19_2 Treffen 19
						12,	//4_20 Treffen 20
						12,	//4_21 Treffen 21	
						32,	//4_22 Treffen 22	
						4,	//4_23 Treffen 23
						23,	//4_24_1 Treffen 24		
						23,	//4_24_2 Treffen 24
						28,	//4_24_3 Treffen 24	
						15,	//4_25 Treffen 25		
						34,	//4_26_1 Treffen 26	
						19,	//4_26_2 Treffen 26
						38,	//4_28_1 Treffen 28
						38,	//4_28_2 Treffen 28
						18,	//4_28_3 Treffen 28
						20,	//4_29 Treffen 29
						27,	//4_30 Treffen 30
						28,	//4_32 Treffen 32
						28,	//4_32 Treffen 32
						29,	//4_33 Treffen 33
						38,	//4_34_1 Treffen 34
						38,	//4_34_2 Treffen 34
						38,	//4_34_2 Treffen 34
						66,	//4_35 Treffen 35
						85,	//4_36 Treffen 36
						14,	//4_37 Treffen 37
						45,	//4_38 Treffen 38
						55,	//4_39 Treffen 39
						21,	//4_40 Treffen 40
						45,	//5_1_2 Hellmann Gala Restauration
						4,	//5_1_3 Hellmann Cabrio rot
						21,	//5_1_4 Marco Bernd Restaurierung
						50,	//7_1 Prospekt-Galerie
						65,	//7_2 Bild des Monats
						580,//7_5 bunter Mix
						114	//7_6 Modellautos
						);

function GetMaxPrev()
{
	var maxnum=0;
	for (var i=0; i < dirprevpics.length; i++)
		maxnum+=numberpics[i];
	return (maxnum);	
}

function GetTopDir(index)
{
	for (i=0; i < topdirnames.length; i++)
		if (topdirnames[i].substr(0,1)==index)
			return i;
}

function GetPicURL(picno)
{
	var count=0;
	var index=0;	
	for (i=0; i<dirprevpics.length; i++)
	{
		index=i;
		count+=numberpics[i];
		if (picno<=count)
			break; // dir found !!!
	}
	var subtract=count-numberpics[index];
	var topdirindex=GetTopDir(dirprevpics[index].substr (0,1));
	var picindexindir=picno-subtract;
	if (picindexindir<10)
		picprefix="00"+picindexindir;
	else if (picindexindir<100)
		picprefix="0"+picindexindir;
	else
		picprefix=picindexindir;
	var picURL=serverlocation[index]+picdir+"/"+topdirnames[topdirindex]+"/"+dirprevpics[index]+"/"+prevdir+"/pic"+picprefix+".jpg";
	
	return (picURL);
}

// opens a new javascript window
// 2003-12-22
function newwin(url, name, sizex, sizey, pos, scroll)
{
	if (pos=="left")
		poswin="top=10,left=10";
	else if (pos=="right")
		poswin="top=10,left="+(screen.width-sizex-10);
	else if (pos=="center")
		poswin="top="+((screen.height-sizey)/2)+", left="+((screen.width-sizex)/2);
	if (scroll)
		var optstr="resizable=yes,scrollbars=yes";
	else
		var optstr="resizable=yes,scrollbars=no";
	var win=window.open (url, name, "width="+sizex+",height="+sizey+","+poswin+","+optstr);
		
	return (win);	
}

function inwork()
{
	alert ("In Arbeit... - \nIn work...");
}


