function switchToHomepage(_relURL)
{
	location.href	= _relURL; 
}

function writeCookieDefault()
{
	// filmURL ist die relaive URL des Folders
	SetzeCookie("filmURL", "films/1996/papst/");	
}

function writeCookie(filmURL)
{
	// filmURL ist die relaive URL des Folders
	SetzeCookie("filmURL", filmURL);	
}

function writeCookieFromDetails(filmURL)
{
	// filmURL ist die relaive URL des Folders
	SetzeCookie("filmURL", filmURL);	
}

function showDefaultImage(filmURL)
{
	// ex. filmURL = "films/1996/papst/"
	
	var prefedFilmURL	= BitteCookieValue("filmURL");
	var jahreszahl 		= extrahiereJahreszahlVonDerURL(prefedFilmURL);
	var filmID		= extrahiereFilmIDVonDerURL(prefedFilmURL);
	
	// alert("filmURL "+prefedFilmURL+ "; "+"jahreszahl "+jahreszahl+"; "+"filmID "+filmID);
	
	if (jahreszahl =="" || filmID =="")
	{
		filmID		= "papst";
		jahreszahl	= "1996";
	}
	
	radioHandler(jahreszahl);
	ShowJahresuebersicht(document.getElementById('box2'), jahreszahl);
	ShowFilmInfo(filmID);
}

function SetzeCookie(cookieName,cookieValue)
{
	// alert('pfad: >'+top.document.location.href+'<\nsetzeCookie ['+cookieName+","+cookieValue+"]");
	
	if(navigator.cookieEnabled)
	{
		var ablauf			= new Date();
		var expireDays		= 30;
		var ablaufZeit		= ablauf.getTime()+(expireDays*24*60*60*1000);
		ablauf.setTime(ablaufZeit);
		var expireString	= ablauf.toGMTString();

		document.cookie=cookieName+"="+escape(cookieValue)+"; expires="+expireString;
	}
}

function BitteCookieValue(cookieName)
{
	if(navigator.cookieEnabled)
	{
		var cookieString = document.cookie;
		//alert(cookieString);
		var start = cookieString.indexOf(cookieName+"=");

		if(start==-1)
		{
			//alert("Cookie >"+cookieName+"< gibt es nicht");
			return "";
		}

		start+=cookieName.length+1;

		var ende = cookieString.indexOf(';',start);

		if(ende==-1)
			ende=cookieString.length;

		var valueReal=unescape(cookieString.substring(start,ende));
		//alert('pfad: >'+top.document.location.href+"<\nCookieValue("+cookieName+") = ["+valueReal+"]");
		return valueReal;
	}

	return "";
}

// Einzug der Buttonleiste und der Kurzbeschreibungen (negativ: nach links)
//
var gIndent		= - 100;	
//
//

function radioHandler(jahreszahl)
{
/*
	var pathGrey	= "http://www.homepage.hamburg.de/risling_/images/rollover/1996.data_/img_01.gif";
	var pathRed	= "http://www.homepage.hamburg.de/risling_/images/rollover/1996.data_/img_01-over.gif";
*/
	
	// alert("Jahr: "+jahreszahl);
	
	// Jahreszahl Rollover Effekt erzeugen (rot/grau)
	//
	var refPath	= "images/rollover/";

	var jahresPool	= ["1996",
					   "1998",
					   "1999",
					   "2000",
					   "2001",
					   "2002",
					   "2003",
					   "2004",
					   "2005",
					   "2006",
					   "2007"];

	var anzahlJahre		= jahresPool.length;
	var	aktuellesJahr	= 0;
	
	for(i=0; i<anzahlJahre; i++)
	{
		var jahreszahlCurr	= jahresPool[i];
		var pathGreyCurr	= refPath+jahreszahlCurr+".data_/img_01.gif";
		var pathRedCurr		= refPath+jahreszahlCurr+".data_/img_01-over.gif";
		var imgCurr			= document.getElementById("img_"+jahreszahlCurr);

		if(jahreszahl==jahreszahlCurr)
		{
			// Jahreszahl rot machen
			if(imgCurr.src!=pathRedCurr)
				imgCurr.src=pathRedCurr;
				
			aktuellesJahr = jahreszahlCurr;
		}
		else 
		{
			// Jahreszahl grau machen
			if(imgCurr.src!=pathGreyCurr)
				imgCurr.src=pathGreyCurr;
		}
	}

	// Jahres?bersicht ausw?hlen ('box2' ist die id der mittleren layer)
	//
	ShowJahresuebersicht(document.getElementById('box2'), aktuellesJahr);

	// Default Film auswaehlen
	//	
	var	refFilmInfoPath	=  "../films/"+jahreszahl+"/";
	var	filmTitle		=  "";
	var	filmSummary		=  "";
	var	filmInfo		=  "";
	var	filmID			=  "";
	var	xOffset			=  0;
	
	if (aktuellesJahr=="1996")
		filmID	=  "papst";
	else 
	if (aktuellesJahr=="1998")
		filmID	=  "box";
	else
	if (aktuellesJahr=="1999")
		filmID	=  "tango";
	else
	if (aktuellesJahr=="2000")
		filmID	=  "gw2000";
	else
	if (aktuellesJahr=="2001")
		filmID	=  "nomos";
	else
	if (aktuellesJahr=="2002")
		filmID	=  "bratling";
	else
	if (aktuellesJahr=="2003")		
		filmID	=  "hochhaus";
	else
	if (aktuellesJahr=="2004")	// TODO	
		filmID	=  "medjugorje";
	else
	if (aktuellesJahr=="2005")	// TODO	
		filmID	=  "benedetto";
	else
	if (aktuellesJahr=="2006")	// TODO	
		filmID	=  "cochonou";
	else
	if (aktuellesJahr=="2007")	// TODO	
		filmID	=  "derby";
	else
	{			
		alert("jahreszahl not found.");
	}
	
	// alert(filmTitle+" "+filmSummary+" "+filmInfo);

	ShowFilmInfo(filmID);
}

function extrahiereJahreszahlVonDerURL(url)
{
	// URL z.B. = "films/1996/papst/"
	
	var dickmann = url.length;

	if (dickmann.length < 11)
		alert("das war nix mit dem String");
	
	var bert_l = 6;
	var bert_r = 10;

	var jahreszahl = url.substring(bert_l,bert_r);

	// alert(jahreszahl);

	return jahreszahl;
}

function extrahiereFilmIDVonDerURL(url)
{
	// URL z.B. = "films/1996/papst/"
	
	var dickmann = url.length;

	if (dickmann.length < 11)
		alert("das war nix mit dem String");

	var bert_l = 11;

	var filmID = url.substring(bert_l,dickmann-1);
	
	// alert(filmID);
	
	return filmID;
}

function ShowJahresuebersicht(layer, jahreszahl)
{
	var reihenAnzahl 	=    1;		// Tabelle mit einer Reihe und 7 Spalten
	var spaltenAnzahl	=    8;		//
	var maxButtons		=    6;		// max Anzahl von Buttons pro Jahrgang
	var fixedTableWidth	=  800;
	var buttons;					// Feld mit 5 String Eintr?gen bef?llen
	var	feldBreite		=   48;		// Breite der Schaltflaeche am Streifenanfang
	var	feldBreite2		=   95;		// Breite der leeren Flaeche am Streifenanfang
	var	buttonBreite	=   40;		// Breite eines Jahreszahlbuttons
	var	buttonAbstand	=    6;		// Abstand zwischen den Jahreszahlbuttons
	var	interBtnAbstand	=   10;		// Abstand zwischen den Filmbuttons
	var	hoehe			= 	43;

	var	offset	= feldBreite + feldBreite2 + gIndent;	// x-Offset des ersten buttons im UI
	
	// NOTE: Eintag im Array ist link auf das button image und image breite zzgl. Abstand zum n?chsten image 
	
	if (jahreszahl=="1996")
	{
		offset	= offset;

		var emptyCellWidth	= Math.ceil((fixedTableWidth - (71 + 78 + 63 + maxButtons*interBtnAbstand + offset)) / 3);		
		
		var	buttons = [["images/PapstButton.jpg", 		"71", 	"papst"],
				   	   ["images/FootballButton1.jpg", 	"78",	"pitbulls"],
				   	   ["images/RoskButton1.jpg", 		"63",	"roskilde"],
				   	   ["images/spacer.gif", emptyCellWidth,	""],
				   	   ["images/spacer.gif", emptyCellWidth,	""],
				   	   ["images/spacer.gif", emptyCellWidth,	""]];		   	   
	//alert("emptyCellWidth = "+emptyCellWidth);
	//alert("offset = "+offset);
	
	//var dynWidth		= 71+78+63+maxButtons*interBtnAbstand + offset+3*emptyCellWidth -1 ;
	//alert("dyn width ="+dynWidth);
	}
	else 
	if (jahreszahl=="1998")
	{
		offset	+= 1*(buttonBreite + buttonAbstand);

		var emptyCellWidth	= Math.ceil((fixedTableWidth - (74 + 131 + 89 + maxButtons*interBtnAbstand + offset)) / 3);		

	//alert("offset = "+offset);
	//alert("emptyCellWidth = "+emptyCellWidth);
	//var dynWidth		= 74+131+89+maxButtons*interBtnAbstand + offset+3*emptyCellWidth;
	//alert("dyn width ="+dynWidth);
		var	buttons = [["images/BoxenButton1.jpg", 		"74",	"box"],
				   	   ["images/RadButton.jpg", 		"131",	"picknick"],
				   	   ["images/SchaafeButton.jpg", 	"89",	"wwr"],
				   	   ["images/spacer.gif", emptyCellWidth,	""],
				   	   ["images/spacer.gif", emptyCellWidth,	""],
				   	   ["images/spacer.gif", emptyCellWidth,	""]];
	}
	else
	if (jahreszahl=="1999")
	{
		offset	+= 2*(buttonBreite + buttonAbstand);
		
		//alert("offset = "+offset);
		
		var emptyCellWidth	= Math.ceil((fixedTableWidth - (69 + 88 + 66 + 76 + 81 + maxButtons*interBtnAbstand + offset)));		
		
	//var dynWidth		= 69 + 88 + 66 + 76 + 81 +maxButtons*interBtnAbstand + offset+emptyCellWidth;
	//alert("dyn width ="+dynWidth);
		var	buttons = [["images/TangoButton1.jpg", 		"69",	"tango"],
				   	   ["images/SofiButton.jpg", 		"88",	"sofi"],
				   	   ["images/MonicaButton1.jpg", 	"66",	"monica"],
				   	   ["images/SMButton.jpg", 			"76",	"sm99"],
				   	   ["images/GospelButton.jpg",		"81",	"gospel"],
				   	   ["images/spacer.gif", emptyCellWidth,	""]];		   	   
	}
	else
	if (jahreszahl=="2000")
	{

		offset	+= 3*(buttonBreite + buttonAbstand);

		//alert("offset = "+offset);
		
		var emptyCellWidth	= Math.ceil((fixedTableWidth - (66 + maxButtons*interBtnAbstand + offset)) / 5);		

	//var dynWidth		= 66 + maxButtons*interBtnAbstand + offset+5*emptyCellWidth;
	//alert("dyn width ="+dynWidth);
		var	buttons = [["images/gwButton.jpg", 			"66",	"gw2000"],
				   	   ["images/spacer.gif", emptyCellWidth,	""],
				   	   ["images/spacer.gif", emptyCellWidth,	""],
				   	   ["images/spacer.gif", emptyCellWidth,	""],
				   	   ["images/spacer.gif", emptyCellWidth,	""],
				   	   ["images/spacer.gif", emptyCellWidth,	""]];
	}
	else
	if (jahreszahl=="2001")
	{
		offset	+= 4*(buttonBreite + buttonAbstand);

		var emptyCellWidth	= Math.ceil((fixedTableWidth - (69 + 88 + maxButtons*interBtnAbstand + offset)) / 4);		

	//var dynWidth		= 69 + 88 + maxButtons*interBtnAbstand + offset+4*emptyCellWidth;
	//alert("dyn width ="+dynWidth);
		var	buttons = [["images/NomosButton.jpg", 		"69",	"nomos"],
				   	   ["images/CarreraButton.jpg",		"88",	"carrera"],
				   	   ["images/spacer.gif", emptyCellWidth,	""],
				   	   ["images/spacer.gif", emptyCellWidth,	""],
				   	   ["images/spacer.gif", emptyCellWidth,	""],
				   	   ["images/spacer.gif", emptyCellWidth,	""]];
	}
	else
	if (jahreszahl=="2002")
	{
		offset	+= 5*(buttonBreite + buttonAbstand);

		var emptyCellWidth	= Math.ceil((fixedTableWidth - (89 + maxButtons*interBtnAbstand + offset)) / 5);		

	//var dynWidth		= 89 + maxButtons*interBtnAbstand + offset+5*emptyCellWidth;
	//alert("dyn width ="+dynWidth);
		var	buttons = [["images/BratlingButton2.jpg", 	"89",	"bratling"],
				   	   ["images/spacer.gif", emptyCellWidth,	""],
				   	   ["images/spacer.gif", emptyCellWidth,	""],
				   	   ["images/spacer.gif", emptyCellWidth,	""],
				   	   ["images/spacer.gif", emptyCellWidth,	""],
				   	   ["images/spacer.gif", emptyCellWidth,	""]];
	}
	else
	if (jahreszahl=="2003")		
	{
		offset	+= 6*(buttonBreite + buttonAbstand);

		var emptyCellWidth	= Math.ceil((fixedTableWidth - (74 + 87 + 82 + maxButtons*interBtnAbstand + offset)) / 3);		

	//var dynWidth		= 74 + 87 + 82 + maxButtons*interBtnAbstand + offset+3*emptyCellWidth - 2;
	//alert("dyn width ="+dynWidth);
		var	buttons = [["images/JodelButton.jpg", 		"74",	"hochhaus"],
				   	   ["images/KrautsandButton.jpg",	"87",	"krautsand"],
				   	   ["images/HarleyButton.jpg", 		"82",	"harley"],
				   	   ["images/spacer.gif", emptyCellWidth,	""],
				   	   ["images/spacer.gif", emptyCellWidth,	""],
				   	   ["images/spacer.gif", emptyCellWidth,	""]];
	}
	else
	if (jahreszahl=="2004")		
	{
		offset	+= 7*(buttonBreite + buttonAbstand);

		var emptyCellWidth	= Math.ceil((fixedTableWidth - (82 + maxButtons*interBtnAbstand + offset)) / 5);		

	//var dynWidth		= 74 + 87 + 82 + maxButtons*interBtnAbstand + offset+3*emptyCellWidth - 2;
	//alert("dyn width ="+dynWidth);
		var	buttons = [["images/MedjugorjeButton.jpg", 			  "82",	"medjugorje"],
				   	   ["images/spacer.gif", 		emptyCellWidth,	""],
				   	   ["images/spacer.gif", 		emptyCellWidth,	""],
				   	   ["images/spacer.gif", 		emptyCellWidth,	""],
				   	   ["images/spacer.gif", 		emptyCellWidth,	""],
				   	   ["images/spacer.gif", 		emptyCellWidth,	""]];
	}
	else
	if (jahreszahl=="2005")		
	{
		offset	+= 8*(buttonBreite + buttonAbstand);

		var emptyCellWidth	= Math.ceil((fixedTableWidth - (84 + maxButtons*interBtnAbstand + offset)) / 5);		

	//var dynWidth		= 74 + 87 + 82 + maxButtons*interBtnAbstand + offset+3*emptyCellWidth - 2;
	//alert("dyn width ="+dynWidth);
		var	buttons = [["images/BenedettoButton.jpg", 			  "82",	"benedetto"],
				   	   ["images/spacer.gif", 		emptyCellWidth,	""],
				   	   ["images/spacer.gif", 		emptyCellWidth,	""],
				   	   ["images/spacer.gif", 		emptyCellWidth,	""],
				   	   ["images/spacer.gif", 		emptyCellWidth,	""],
				   	   ["images/spacer.gif", 		emptyCellWidth,	""]];
	}
	else
	if (jahreszahl=="2006")		
	{
		offset	+= 9*(buttonBreite + buttonAbstand);

		var emptyCellWidth	= Math.ceil((fixedTableWidth - (84 + maxButtons*interBtnAbstand + offset)) / 5);		

	//var dynWidth		= 74 + 87 + 82 + maxButtons*interBtnAbstand + offset+3*emptyCellWidth - 2;
	//alert("dyn width ="+dynWidth);
		var	buttons = [["images/CochonouButton.jpg", 			  "82",	"cochonou"],
				   	   ["images/spacer.gif", 		emptyCellWidth,	""],
				   	   ["images/spacer.gif", 		emptyCellWidth,	""],
				   	   ["images/spacer.gif", 		emptyCellWidth,	""],
				   	   ["images/spacer.gif", 		emptyCellWidth,	""],
				   	   ["images/spacer.gif", 		emptyCellWidth,	""]];
	}
	else
	if (jahreszahl=="2007")		
	{
		offset	+= 10*(buttonBreite + buttonAbstand);

		var emptyCellWidth	= Math.ceil((fixedTableWidth - (82 + maxButtons*interBtnAbstand + offset)) / 5);		

	//var dynWidth		= 74 + 87 + 82 + maxButtons*interBtnAbstand + offset+3*emptyCellWidth - 2;
	//alert("dyn width ="+dynWidth);
		var	buttons = [["images/DaytraderButton.jpg", 			  "82",	"derby"],
				   	   ["images/spacer.gif", 		emptyCellWidth,	""],
				   	   ["images/spacer.gif", 		emptyCellWidth,	""],
				   	   ["images/spacer.gif", 		emptyCellWidth,	""],
				   	   ["images/spacer.gif", 		emptyCellWidth,	""],
				   	   ["images/spacer.gif", 		emptyCellWidth,	""]];
	}
	else
	{			
		alert("jahreszahl not found.");
	}

	
	// Bildleiste Mitte zusammenbasteln

	var tableOben  	=	'<table width="850" border="0" cellspacing="0" cellpadding="0">'
					+	'<tr height="1">'
					+	'<td colspan="8" height="1" background="images/pixelGrau.gif"></td>'
					+	'</tr>'
					+	'<tr height="43">';

	bildzaehler	 = 0;
	
	var tableButtons = "";
	
	for (x=1; x<=reihenAnzahl; x++)
	{
		for(y=1; y<=spaltenAnzahl; y++)
		{
			bildzaehler++;
			
			if (y==1)
			{
				tableButtons	+= '<td height="43"><img width="'+feldBreite+'" height="43" src="images/Streifen7.jpg" border="0"></td>';
			}
			else
			if (y==2)
			{
				//alert("offset = "+offset);
				tableButtons 	+= '<td height="43"><img width="'+String(offset)+'" height="'+String(hoehe)+'" src="images/spacer.gif" border="0"></td>';
			}
			else
			{
				var refStr		= String(bildzaehler-2);
				var imageURL	= buttons[y-3][0];
				var breite		= Number(buttons[y-3][1]);
				
				//alert("imageURL = "+imageURL);
				if (imageURL != "images/spacer.gif")
				{
					var filmID		= buttons[y-3][2];

					tableButtons	+= '<td height="43"><img onmouseover=\'ShowFilmInfo("'+filmID+'"); this.style.cursor = "hand";\' onclick=\'ShowFilmDetails("'+filmID+'")\' width="'+String(breite)+'" height="'+String(hoehe)+'" src="'+imageURL+'" border="0"><img width="'+String(interBtnAbstand)+'" height="'+String(hoehe)+'" src="images/spacer.gif" border="0"></td>';
				}
				else
					tableButtons	+= '<td height="43"><img width="'+String(breite)+'" height="'+String(hoehe)+'" src="'+imageURL+'" border="0"><img width="'+String(interBtnAbstand)+'" height="'+String(hoehe)+'" src="images/spacer.gif" border="0"></td>';
			}
		}
	}

	var tableUnten  =	'</tr>'
					+	'<tr height="1">'
					+	'<td colspan="8" height="1" background="images/pixelGrau.gif"></td>'
					+	'</tr>'
					+	'</table>';

	//alert(tableOben + tableButtons + tableUnten);
	
	layer.innerHTML = tableOben + tableButtons + tableUnten;
}


function ShowFilmInfoTable(layer, filmTitle, filmSummary, filmInfo, xoffset)
{
	//alert("xoffset = " + xoffset);
	
	var linepos	= xoffset;
	var textpos	= xoffset; // + 4;
	
	// TODO xpos!
	
	var tableHTML	= 		'<table width="950" border="0" cellspacing="0" cellpadding="0" height="114">'
					+		'<tr height="41">'
					+			'<td rowspan="4" width="'+String(linepos)+'"><img src="images/spacer.gif" alt="" height="12" width="'+String(linepos)+'" border="0"></td>'
					+			'<td rowspan="4" valign="top" width="4"><img src="images/pixelGrau.gif" alt="" height="81" width="1" border="0"></td>'
					+			'<td class="filmtitle_main" width="672" height="50">'+filmTitle+'</td>'
					+		'</tr>'
					+		'<tr height="26">'
					+			'<td width="672" height="17"><img src="images/spacer.gif" alt="" height="15" width="13" border="0"></td>'
					+		'</tr>'
					+		'<tr height="19">'
					+			'<td class="filminfo" width="750" height="19">'+filmSummary+'</td>'
					+		'</tr>'
					+		'<tr>'
					+			'<td class="filminfo_main" width="672">'+filmInfo+'</td>'
					+		'</tr>'
					+		'</table>';

	//alert(tableHTML);
	
	layer.innerHTML = tableHTML;
}

function ShowFilmInfo(filmID)
{
	// alert ("ShowFilmInfo ("+filmID+")");
	
	var cookieValue	= "";
	var filmTitle	= "";
	var filmSummary	= "";
	var filmInfo	= "";
	var xOffset		= 0;
	
	if (filmID=="papst")
	{
		filmTitle		=  "Der Papst in Paderborn";
		filmSummary		=  "Dokumentation zum Papstbesuch 1996 in Paderborn.";
		filmInfo		=  "Dokumentarfilm | 10 min | Farbe";
		cookieValue		= "films/1996/papst/";
		xOffset			= 180;
	}
	else 
	if (filmID=="pitbulls")
	{
		filmTitle		=  "Pitbulls Wie Wir";
		filmSummary		=  "Beobachtungen am Rande eines Football-Rasens.";
		filmInfo		=  "Musikclip | 3 min | Farbe";
		cookieValue		= "films/1996/pitbulls/";
		xOffset			= 267;
	}
	else 
	if (filmID=="roskilde")
	{
		filmTitle		=  "Roskilde";
		filmSummary		=  "Mit der Handkamera auf Europas gr&ouml;sstem Open-Air-Festival.";
		filmInfo		=  "Musikclip | 6 min | Farbe";
		cookieValue		= "films/1996/roskilde/";
		xOffset			= 361;
	}
	else 
	if (filmID=="box")
	{
		filmTitle		=  "Die Eisenfaust";
		filmSummary		=  "Der Doktor im Ring - eine undercover Bilanz.";
		filmInfo		=  "Experimentalfilm | 75 sec | s/w";
		cookieValue		= "films/1998/box/";
		xOffset			= 228;
	}
	else 
	if (filmID=="picknick")
	{
		filmTitle		=  "Pyren&auml;enpicknick";
		filmSummary		=  "Ein Picknick f&uuml;r die Tour de France - Beobachtungen am Streckenrand.";
		filmInfo		=  "Dokumentarfilm&nbsp;| 7 min | Farbe";
		cookieValue		= "films/1998/picknick/";
		xOffset			= 321;
	}
	else 
	if (filmID=="wwr")
	{
		filmTitle		=  "WWR";
		filmSummary		=  "Am Strand von F&ouml;hr treten Wattw&uuml;rmer zum Rennen an...";
		filmInfo		=  "Experimentalfilm&nbsp;| 6 min | s/w";
		cookieValue		= "films/1998/wwr/";
		xOffset			= 462;
	}
	else
	if (filmID=="tango")
	{
		filmTitle		=  "&Uuml;ksikaksi - Suomi Tango";
		filmSummary		=  "Drei Tage finnischer Tango in Seinaj&ouml;ki - eine Kleinstadt durchtanzt den Mitsommer.";
		filmInfo		=  "Dokumentarfilm | 6 min | Farbe";
		cookieValue		= "films/1999/tango/";
		xOffset			= 281;
	}
	else
	if (filmID=="gospel")
	{
		filmTitle		=  "Total Experience Gospel Choir/&nbsp; Seattle";
		filmSummary		=  "&quot;Singen kann jeder.&quot; Zumindest bei der Gospelprobe im Stadtpark...";
		filmInfo		=  "Dokumentarfilm | 6 min | Farbe";
		cookieValue		= "films/1999/gospel/";
		xOffset			= 622;
	}
	else
	if (filmID=="monica")
	{
		filmTitle		=  "Monica/ Springerpassage";
		filmSummary		=  "Monica Lewinsky zu Gast in Hamburg. Eine Buchpr&auml;sentation unter Tr&auml;nen.";
		filmInfo		=  "Experimentalfilm | 3 min | s/w";
		cookieValue		= "films/1999/monica/";
		xOffset			= 460;
	}
	else
	if (filmID=="sm99")
	{
		filmTitle		=  "SM 99";
		filmSummary		=  "Bilanz eines Stadt-Marathons aus der Sicht von Zuschauern, L&auml;ufern und Helfern.";
		filmInfo		=  "Dokumentarfilm | 6 min | Farbe";
		cookieValue		= "films/1999/sm99/";
		xOffset			= 536;
	}
	else
	if (filmID=="sofi")
	{
		filmTitle		=  "Sofi Stuttgart";
		filmSummary		=  "Sonnenfinsternis in Stuttgart: ein Jahrhundertereignis, das ins Wasser fiel.";
		filmInfo		=  "Dokumentarfilm | 7 min | Farbe";
		cookieValue		= "films/1999/sofi/";
		xOffset			= 362;
	}
	else
	if (filmID=="gw2000")
	{
		filmTitle		=  "Gesichtswurst 2000";
		filmSummary		=  "Wenn die Mainzelm&auml;nnchen Kamelle schmeissen, dann ist Rosenmontag in Mainz...";
		filmInfo		=  "Dokumentarfilm | 6 min | Farbe";
		cookieValue		= "films/2000/gw2000/";
		xOffset			= 329;
	}
	else
	if (filmID=="nomos")
	{
		filmTitle		=  "Autoporno";
		filmSummary		=  "Es gibt Autobesitzer, die betreiben Blechpflege der ganz besonderen Art...";
		filmInfo		=  "Werbefilm | 45 sec | Farbe";
		cookieValue		= "films/2001/nomos/";
		xOffset			= 375;
	}
	else
	if (filmID=="carrera")
	{
		filmTitle		=  "N&uuml;rburgring Professional 1:32";
		filmSummary		=  "Wenn B&uuml;roangestellte Gas geben, geht's meist nur um das Eine...";
		filmInfo		=  "Experimentalfilm | 1 min | Farbe";
		cookieValue		= "films/2001/carrera/";
		xOffset			= 454;
	}
	else
	if (filmID=="bratling")
	{
		filmTitle		=  "Drei Tage am Grill - der Riesenbratling";
		filmSummary		=  "Fliegt er oder nicht? Zubereitung eines Riesenbratlings und Aufbau einer Wurfmaschine.";
		filmInfo		=  "Dokumentarfilm | 16 min | Farbe";
		cookieValue		= "films/2002/bratling/";
		xOffset			= 421;
	}
	else
	if (filmID=="hochhaus")		
	{
		filmTitle		=  "City Nord - Es t&ouml;nt der Hochhausjodler";
		filmSummary		=  "Hochhausjodeln in der B&uuml;rovorstadt - ein Gegenentwurf zur Alltagshektik.";
		filmInfo		=  "Dokumentarfilm | 5 min | Farbe";
		cookieValue		= "films/2003/hochhaus/";
		xOffset			= 467;
	}
	else
	if (filmID=="krautsand")		
	{
		filmTitle		=  "Der Stier von Krautsand";
		filmSummary		=  "Die Weltmeisterschaften im Rasenm&auml;her-Rennen - moderiert vom Ortspfarrer.";
		filmInfo		=  "Dokumentarfilm | 8 min | Farbe";
		xOffset			= 551;
		cookieValue		= "films/2003/krautsand/";
	}
	else
	if (filmID=="harley")		
	{
		filmTitle		=  "Burnout &agrave; gogo";
		filmSummary		=  "Der 100 j&auml;hrige Geburtstag von Harley-Davidson - hammergeil!";
		filmInfo		=  "Dokumentarfilm | 7 min | Farbe";
		xOffset			= 648;
	}
	else
	if (filmID=="medjugorje")
	{
		filmTitle		=  "Medjugorje - Drehkreuz in Bosnien";
		filmSummary		=  "Wallfahrt an einen inoffiziellen Ort";
		filmInfo		=  "Dokumentarfilm | 7 min | Farbe";
		xOffset			= 513;
	}
	else
	if (filmID=="benedetto")
	{
		filmTitle		=  "Das Benedetto Diptychon";
		filmSummary		=  "Die Jugend der Welt trifft Papst Benedikt in K&ouml;ln";
		filmInfo		=  "Dokumentarfilm | 10 min | Farbe";
		xOffset			= 561;
	}
	else
	if (filmID=="cochonou")
	{
		filmTitle		=  "&Eacute;tape Cochonou";
		filmSummary		=  "Alpe d'Huez l&auml;dt zum gr&ouml;&szlig;ten Gratisevent des Sommers";
		filmInfo		=  "Dokumentarfilm | 7 min | Farbe";
		xOffset			= 606;
	}
	else
	if (filmID=="derby")
	{
		filmTitle		=  "Rapid Returns in Horn";
		filmSummary		=  "Bekenntnisse eines Daytraders";
		filmInfo		=  "Dokumentarfilm | 3 min | Farbe";
		xOffset			= 652;
	}
	else
	{			
		alert("film not found.");
	}
	
	if (cookieValue != "")
		writeCookie(cookieValue);

	ShowFilmInfoTable(document.getElementById('box3'), filmTitle, filmSummary, filmInfo, xOffset + gIndent);
}


function ShowFilmDetails(filmID)
{
	// NOTE:
	// Wird vom "onclick-handler" gerufen
	// Die relative URL bezieht auf die Lage zwischen contents.html und der jeweiligen Hauptseite des Film-Framesets
		
	var relFilmURL	= "";
	var cookieValue	= "";
	
	if (filmID=="papst")
	{
		relFilmURL		= "papst.html";
		cookieValue		= "films/1996/papst/";
	}
	else 
	if (filmID=="pitbulls")
	{
		relFilmURL		= "pitbulls.html";
		cookieValue		= "films/1996/pitbulls/";
	}
	else 
	if (filmID=="roskilde")
	{
		relFilmURL		= "roskilde.html";
		cookieValue		= "films/1996/roskilde/";
	}
	else 
	if (filmID=="box")
	{
		relFilmURL		= "box.html";
		cookieValue		= "films/1998/box/";
	}
	else 
	if (filmID=="picknick")
	{
		relFilmURL		= "picknick.html";
		cookieValue		= "films/1998/picknick/";
	}
	else 
	if (filmID=="wwr")
	{
		relFilmURL		= "wwr.html";
		cookieValue		= "films/1998/wwr/";
	}
	else
	if (filmID=="tango")
	{
		relFilmURL		= "tango.html";
		cookieValue		= "films/1999/tango/";
	}
	else
	if (filmID=="gospel")
	{
		relFilmURL		= "gospel.html";
		cookieValue		= "films/1999/gospel/";
	}
	else
	if (filmID=="monica")
	{
		relFilmURL		= "monica.html";
		cookieValue		= "films/1999/monica/";
	}
	else
	if (filmID=="sm99")
	{
		relFilmURL		= "sm99.html";
		cookieValue		= "films/1999/sm99/";
	}
	else
	if (filmID=="sofi")
	{
		relFilmURL		= "sofi.html";
		cookieValue		= "films/1999/sofi/";
	}
	else
	if (filmID=="gw2000")
	{
		relFilmURL		= "gw2000.html";
		cookieValue		= "films/2000/gw2000/";
	}
	else
	if (filmID=="nomos")
	{
		relFilmURL		= "nomos.html";
		cookieValue		= "films/2001/nomos/";
	}
	else
	if (filmID=="carrera")
	{
		relFilmURL		= "carrera.html";
		cookieValue		= "films/2001/carrera/";
	}
	else
	if (filmID=="bratling")
	{
		relFilmURL		= "bratling.html";
		cookieValue		= "films/2002/bratling/";
	}
	else
	if (filmID=="hochhaus")		
	{
		relFilmURL		= "hochhaus.html";
		cookieValue		= "films/2003/hochhaus/";
	}
	else
	if (filmID=="krautsand")		
	{
		relFilmURL		= "krautsand.html";
		cookieValue		= "films/2003/krautsand/";
	}
	else
	if (filmID=="harley")		
	{
		relFilmURL		= "harley.html";
		cookieValue		= "films/2003/harley/";
	}
	else
	if (filmID=="medjugorje")		
	{
		relFilmURL		= "#";
		cookieValue		= "films/2003/harley/";
	}
	else
	if (filmID=="benedetto")		
	{
		relFilmURL		= "#";
		cookieValue		= "films/2003/harley/";
	}
	else
	if (filmID=="cochonou")		
	{
		relFilmURL		= "#";
		cookieValue		= "films/2003/harley/";
	}
	else
	if (filmID=="derby")		
	{
		relFilmURL		= "#";
		cookieValue		= "films/2003/harley/";
	}
	else
	{			
		alert("film not found.");
	}
	
	if (cookieValue != "")
		writeCookie(cookieValue);

	if (relFilmURL != "")
		location.href	= relFilmURL; 
}

function CheckBrowserVersion(defaultURL, workAroundURL)
{
 	var Netscape, MSIE, Opera, Unknown;
 	var Win, Mac, Other;
  	var NetscapeVer = 0.0;
  	var MSIEVer 	= 0.0;
  	var OperaVer 	= 0.0;

  	// detect browser
  
	 Netscape	= navigator.appName == "Netscape";
	 MSIE		= navigator.appName == "Microsoft Internet Explorer";
	 Opera		= navigator.userAgent.indexOf("Opera") > -1;
	 Unknown 	= !(Netscape || MSIE || Opera);
	 
	 // detect platform
	 
	 Win = navigator.userAgent.indexOf("Win") > -1;
	 Mac = navigator.userAgent.indexOf("Mac") > -1;
	 Other = !(Win || Mac);
	 
	 // now extract version numbers
	 
	 if (Netscape)
	 {
	   NetscapeVer = parseFloat(navigator.appVersion);
	 }
	 else if (MSIE)
	 {
	   n = navigator.userAgent;
	   MSIEVer = n.substr(n.indexOf("MSIE ")+("MSIE ").length, 4);
	   MSIEVer = parseFloat(MSIEVer); 
	   // converts it into a floatint point number
	   
	   if (Opera)
	   {
	     OperaVer = n.substr(n.indexOf("Opera ")+("Opera ").length, 4);
	     OperaVer = parseFloat(OperaVer);
	   }
	 }

	 var inCompatibleBrowser;
	 
	 // Die website wird korrekt dargestellt auf MAC OSX oder Windows, aber nicht auf MAC OS9
	 inCompatibleBrowser	= Mac && MSIE && (MSIEVer <= 5.2);
	 
	 if (inCompatibleBrowser)
	 {
	 	// alert("CheckBrowserVersion / OS9");
	 	// alert("MSIEVer"+MSIEVer);
	 	top.location.href	= workAroundURL;
	 }
	 else
	 {
	 	// alert("CheckBrowserVersion / WIN, OSX");
	 	// alert("goto: "+defaultURL);
 		top.location.href	= defaultURL;
	 }
}


function CheckBrowserVersion2(defaultURL, workAroundURL)
{
 	var Netscape, MSIE, Opera, Unknown;
 	var Win, Mac, Other;
  	var NetscapeVer = 0.0;
  	var MSIEVer 	= 0.0;
  	var OperaVer 	= 0.0;

  	// detect browser
  
	 Netscape	= navigator.appName == "Netscape";
	 MSIE		= navigator.appName == "Microsoft Internet Explorer";
	 Opera		= navigator.userAgent.indexOf("Opera") > -1;
	 Unknown 	= !(Netscape || MSIE || Opera);
	 
	 // detect platform
	 
	 Win = navigator.userAgent.indexOf("Win") > -1;
	 Mac = navigator.userAgent.indexOf("Mac") > -1;
	 Other = !(Win || Mac);
	 
	 // now extract version numbers
	 
	 if (Netscape)
	 {
	   NetscapeVer = parseFloat(navigator.appVersion);
	 }
	 else if (MSIE)
	 {
	   n = navigator.userAgent;
	   MSIEVer = n.substr(n.indexOf("MSIE ")+("MSIE ").length, 4);
	   MSIEVer = parseFloat(MSIEVer); 
	   // converts it into a floatint point number
	   
	   if (Opera)
	   {
	     OperaVer = n.substr(n.indexOf("Opera ")+("Opera ").length, 4);
	     OperaVer = parseFloat(OperaVer);
	   }
	 }

	 var inCompatibleBrowser;
	 
	 // Die website wird korrekt dargestellt auf MAC OSX oder Windows, aber nicht auf MAC OS9
	 inCompatibleBrowser	= Mac && MSIE && (MSIEVer <= 5.2);
	 
	 if (inCompatibleBrowser)
	 {
	 	// alert("CheckBrowserVersion / OS9");
	 	// alert("MSIEVer"+MSIEVer);
	 	//location.href	= workAroundURL;
	 	return workAroundURL;
	 }
	 else
	 {
	 	// alert("CheckBrowserVersion / WIN, OSX");
	 	// alert("goto: "+defaultURL);
 		// location.href	= defaultURL;
		return defaultURL;
	 }
}


function IsMacMSIE()
{
 	
 	var Netscape, MSIE, Opera, Unknown;
 	var Win, Mac, Other;
  	var NetscapeVer = 0.0;
  	var MSIEVer 	= 0.0;
  	var OperaVer 	= 0.0;

  	// detect browser
  
	 Netscape	= navigator.appName == "Netscape";
	 MSIE		= navigator.appName == "Microsoft Internet Explorer";
	 Opera		= navigator.userAgent.indexOf("Opera") > -1;
	 Unknown 	= !(Netscape || MSIE || Opera);
	 
	 // detect platform
	 
	 Win = navigator.userAgent.indexOf("Win") > -1;
	 Mac = navigator.userAgent.indexOf("Mac") > -1;
	 Other = !(Win || Mac);
	 
	 // now extract version numbers
	 
	 if (Netscape)
	 {
	   NetscapeVer = parseFloat(navigator.appVersion);
	 }
	 else if (MSIE)
	 {
	   n = navigator.userAgent;
	   MSIEVer = n.substr(n.indexOf("MSIE ")+("MSIE ").length, 4);
	   MSIEVer = parseFloat(MSIEVer); 
	   // converts it into a floatint point number
	   
	   if (Opera)
	   {
	     OperaVer = n.substr(n.indexOf("Opera ")+("Opera ").length, 4);
	     OperaVer = parseFloat(OperaVer);
	   }
	 }

	 var isMacMSIE;
	 
	 // Die website wird korrekt dargestellt auf MAC OSX oder Windows, aber nicht auf MAC OS9
	 isMacMSIE	= Mac && MSIE;
	
	 return isMacMSIE;	 
}



function toggleFilmButton (btnIDString, state)
{
	var imgCurr	= document.getElementById(btnIDString);
	
	if (state == 0)
		// Button inaktiv
		imgCurr.src	= "images/FilmAb2.jpg"
	else
		// Button aktiv
		imgCurr.src	= "images/FilmAb.jpg"
}


function showQuicktimeMovie (filmID, layer)
{
	var ctrlBgColor		= "xffffff";
	var	ctrlWidth	= "160";
	var ctrlHeight		= "200";
	var absMovieSrc		= "http://www.homepage.hamburg.de/risling_/films/";	// Web root directory at www.hamburg.de
	var absHamburgDeRoot	= "http://www.homepage.hamburg.de/risling_/films/";	// Web root directory on www.hamburg.de
	var isMacMSIE	= IsMacMSIE();
	
	if (filmID=="papst")
	{
		/*TODO*/
		absMovieSrc	+=	"1996/past/Papst_Trailer.mov";
		ctrlWidth	= "160";
		ctrlHeight	= "200";
		ctrlBgColor	= "#ffffff";
	}
	else 
	if (filmID=="pitbulls")
	{
		absMovieSrc	+=	"1996/pitbulls/Pitbulls.mov"
		ctrlWidth	= "240";
		ctrlHeight	= "196";
		ctrlBgColor	= "#555555";
	}
	else 
	if (filmID=="roskilde")
	{
		/*TODO*/
		absMovieSrc	+=	"1996/roskilde/Roskilde_Trailer.mov";
		ctrlWidth	= 	"160";
		ctrlHeight	= 	"200";
		ctrlBgColor	= 	"#ffffff";
	}
	else 
	if (filmID=="box")
	{
		absMovieSrc	+=	"1998/box/box.mov";
		ctrlWidth	= 	"122";
		ctrlHeight	= 	"108";
		ctrlBgColor	= 	"#5e5e5e";
	
		document.getElementById('box1').innerHTML = "";
	}
	else 
	if (filmID=="picknick")
	{
		absMovieSrc	+=	"1998/picknick/Picknick_Trailer.mov";
		ctrlWidth	= "160";
		ctrlHeight	= "144";
		ctrlBgColor	= "#222222";
		
		document.getElementById('box1').innerHTML = "";
	}
	else 
	if (filmID=="wwr")
	{
		absMovieSrc	 = absHamburgDeRoot;
		absMovieSrc	+=	"1998/wwr/wwr_trailer.mov";
		ctrlWidth	= "160";
		ctrlHeight	= "136";
		ctrlBgColor	= "#000000";
		
		document.getElementById('box1').innerHTML = "";
	}
	else
	if (filmID=="tango")
	{
		/*TODO*/
		absMovieSrc	+=	"1999/tango/Tango_Trailer.mov";
		ctrlWidth	= "160";
		ctrlHeight	= "200";
		ctrlBgColor	= "#ffffff";
	}
	else
	if (filmID=="gospel")
	{
		absMovieSrc	 = absHamburgDeRoot;
		absMovieSrc	+=	"1999/gospel/TEGCTrailer.mov";
		ctrlWidth	= "162";
		ctrlHeight	= "138";
		ctrlBgColor	= "#CC9DC0";
		
		document.getElementById('box1').innerHTML = "";
	}
	else
	if (filmID=="monica")
	{
		/*TODO*/
		absMovieSrc	+=	"1999/monica/Monica_Trailer.mov";
		ctrlWidth	= "160";
		ctrlHeight	= "200";
		ctrlBgColor	= "#ffffff";
	}
	else
	if (filmID=="sm99")
	{
		absMovieSrc	+=	"1999/sm99/SM99_Trailer.mov";
		ctrlWidth	= "173";
		ctrlHeight	= "155";
		ctrlBgColor	= "#aaaaaa";
		
		document.getElementById('box1').innerHTML = "";
	}
	else
	if (filmID=="sofi")
	{
		absMovieSrc	 = absHamburgDeRoot;
		absMovieSrc	+=	"1999/sofi/Sofi_Trailer.mov";
		ctrlWidth	= "162";
		ctrlHeight	= "138";
		ctrlBgColor	= "#3b3e3b";
			
		var innerHTML	=	'<table width="292" border="0" cellspacing="0" cellpadding="0" background="http://www.homepage.hamburg.de/risling_/images/1999/Sofilinks2.gif" height="262">'
						+	'<tr height="7">'
						+	'<td width="102" height="7"></td>'
						+	'<td width="255" height="7"></td>'
						+	'</tr>'
						+	'<tr height="200">'
						+	'<td width="102" height="200"></td>'
						+	'<td width="255" height="200">'
						+	'<p>'
						+ 		'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="'+ctrlHeight+'" width="'+ctrlWidth+'">'
						+			'<param name="bgcolor" value="'+ctrlBgColor+'">'
						+			'<param name="cache" value="true">'
						+			'<param name="src" value="'+absMovieSrc+'">'
						+			'<param name="autoplay" value="true">'
						+			'<param name="controller" value="true">'
						+			'<embed height="'+ctrlHeight+'" pluginspage="http://www.apple.com/quicktime/download/" src="'+absMovieSrc+'" type="video/quicktime" width="'+ctrlWidth+'" controller="true" autoplay="true" cache="true" bgcolor="'+ctrlBgColor+'">'
						+		'</object>'
						+	'</p>'
						+	'</td>'
						+	'</tr>'
						+	'<tr height="55">'
						+	'<td width="102" height="55"></td>'
						+	'<td width="255" height="55"></td>'
						+	'</tr>'
						+	'</table>';
		
		layer.innerHTML = innerHTML;
		
		// Standard conent nicht setzen! 
		filmID	= "";
	}
	else
	if (filmID=="gw2000")
	{
		absMovieSrc	+=	"2000/gw2000/gw2000.mov";
		ctrlWidth	= "120";
		ctrlHeight	= "125";
		ctrlBgColor	= "#fff3df";
		
		document.getElementById('box1').innerHTML = "";
	}
	else
	if (filmID=="nomos")
	{
		absMovieSrc	= absHamburgDeRoot;
		absMovieSrc	+=	"2001/nomos/nomos.mov";
		ctrlWidth	= "162";
		ctrlHeight	= "138";
		ctrlBgColor	= "#5e5e5ef";
		
		document.getElementById('box1').innerHTML = "";
	}
	else
	if (filmID=="carrera")
	{
		absMovieSrc	+=	"2001/carrera/CarreraTrailer.mov";
		ctrlWidth	= "162";
		ctrlHeight	= "145";
		ctrlBgColor	= "#dfbbc0";
		
		document.getElementById('box1').innerHTML = "";
	}
	else
	if (filmID=="bratling")
	{
		absMovieSrc	+=	"2002/bratling/BratlingTrailer.mov";
		ctrlWidth	= "162";
		ctrlHeight	= "138";
		ctrlBgColor	= "#1d180e";
	}
	else
	if (filmID=="hochhaus")		
	{
		absMovieSrc	+=	"2003/hochhaus/HochhausTrailer.mov";
		ctrlWidth	= "160";
		ctrlHeight	= "200";
		ctrlBgColor	= "#ffffff";
	}
	else
	if (filmID=="krautsand")		
	{
		absMovieSrc	+=	"2003/krautsand/KrautsandTrailer.mov";
		ctrlWidth	= "160";
		ctrlHeight	= "200";
		ctrlBgColor	= "#ffffff";
	}
	else
	if (filmID=="harley")		
	{
		absMovieSrc	= absHamburgDeRoot;
		absMovieSrc	+=	"2003/harley/harley_trailer.mov";
		ctrlWidth	= "272";
		ctrlHeight	= "234";
		ctrlBgColor	= "#72948C";
		
		document.getElementById('box1').innerHTML = "";
	}
	else if (filmID!="")
	{			
		alert("film not found.");
	}
	
	if (filmID!="")
	{
		var innerHTML	=	'<p>'
						+ 	'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="'+ctrlHeight+'" width="'+ctrlWidth+'">'
						+			'<param name="bgcolor" value="'+ctrlBgColor+'">'
						+			'<param name="cache" value="true">'
						+			'<param name="src" value="'+absMovieSrc+'">'
						+			'<param name="autoplay" value="true">'
						+			'<param name="controller" value="true">'
						+			'<embed height="'+ctrlHeight+'" pluginspage="http://www.apple.com/quicktime/download/" src="'+absMovieSrc+'" type="video/quicktime" width="'+ctrlWidth+'" controller="true" autoplay="true" cache="true" bgcolor="'+ctrlBgColor+'">'
						+		'</object>'
						+	'</p>';
	
			// alert("film URL = " + absMovieSrc);
		 	// alert(innerHTML);
		
		layer.innerHTML = innerHTML;
	}
}



function revealImage(idstring)
{
	// Koenig = gerade indices
	// Dame = ungerade indices
	//	
	// Karte umklappen
	var bert=document.getElementById(idstring);
	bert.src="../images/invitation/" + idstring +".gif";

/*
	// Koenig
	// Zeile 1
	if (idstring=="01" || idstring=="02" || idstring== "21" || idstring =="22" || idstring=="41" || idstring=="42" || idstring=="61" || idstring =="62")
		idStringArray	= ["01","02","21","22","41","42","61","62"];
	else
	if (idstring=="05" || idstring=="06" || idstring== "25" || idstring =="26" || idstring=="45" || idstring=="46" || idstring=="65" || idstring =="66")
		idStringArray	= ["05","06","25","26","45","46","65","66"];
	else
	if (idstring=="09" || idstring=="10" || idstring== "29" || idstring =="30" || idstring=="49" || idstring=="50" || idstring=="69" || idstring =="70")
		idStringArray	= ["09","10","29","30","49","50","69","70"];
	else
	if (idstring=="13" || idstring=="14" || idstring== "33" || idstring =="34" || idstring=="53" || idstring=="54" || idstring=="73" || idstring =="74")
		idStringArray	= ["13","14","33","34","53","54","73","74"];
	else
	if (idstring=="17" || idstring=="18" || idstring== "37" || idstring =="38" || idstring=="57" || idstring=="58" || idstring=="77" || idstring =="78")
		idStringArray	= ["17","18","37","38","57","58","77","78"];
	// Koenig
	// Zeile 2
	else
	if (idstring=="81" || idstring=="82" || idstring== "101" || idstring =="102" || idstring=="121" || idstring=="122" || idstring=="141" || idstring =="142")
		idStringArray	= ["81","82","101","102","121","122","141","142"];
	else
	if (idstring=="85" || idstring=="86" || idstring== "105" || idstring =="106" || idstring=="125" || idstring=="126" || idstring=="145" || idstring =="146")
		idStringArray	= ["85","86","105","106","125","126","145","146"];
	else
	if (idstring=="89" || idstring=="90" || idstring== "109" || idstring =="110" || idstring=="129" || idstring=="130" || idstring=="149" || idstring =="150")
		idStringArray	= ["89","90","109","110","129","130","149","150"];
	else
	if (idstring=="93" || idstring=="94" || idstring== "113" || idstring =="114" || idstring=="133" || idstring=="134" || idstring=="153" || idstring =="154")
		idStringArray	= ["93","94","113","114","133","134","153","154"];
	else
	if (idstring=="97" || idstring=="98" || idstring== "117" || idstring =="118" || idstring=="137" || idstring=="138" || idstring=="157" || idstring =="158")
		idStringArray	= ["97","98","117","118","137","138","157","158"];
	// Koenig
	// Zeile 3
	else
	if (idstring=="161" || idstring=="162" || idstring== "181" || idstring =="182" || idstring=="201" || idstring=="202" || idstring=="221" || idstring =="222")
		idStringArray	= ["161","162","181","182","201","202","221","222"];
	else
	if (idstring=="165" || idstring=="166" || idstring== "185" || idstring =="186" || idstring=="205" || idstring=="206" || idstring=="225" || idstring =="226")
		idStringArray	= ["165","166","185","186","205","206","225","226"];
	else
	if (idstring=="169" || idstring=="170" || idstring== "189" || idstring =="190" || idstring=="209" || idstring=="210" || idstring=="229" || idstring =="230")
		idStringArray	= ["169","170","189","190","209","210","229","230"];
	else
	if (idstring=="173" || idstring=="174" || idstring== "193" || idstring =="194" || idstring=="213" || idstring=="214" || idstring=="233" || idstring =="234")
		idStringArray	= ["173","174","193","194","213","214","233","234"];
	else
	if (idstring=="177" || idstring=="178" || idstring== "197" || idstring =="198" || idstring=="217" || idstring=="218" || idstring=="237" || idstring =="238")
		idStringArray	= ["177","178","197","198","217","218","237","238"];
	// Koenig
	// Zeile 4
	else
	if (idstring=="241" || idstring=="242" || idstring== "261" || idstring =="262" || idstring=="281" || idstring=="282" || idstring=="301" || idstring =="302")
		idStringArray	= ["241","242","261","262","281","282","301","302"];
	else
	if (idstring=="245" || idstring=="246" || idstring== "265" || idstring =="266" || idstring=="285" || idstring=="286" || idstring=="305" || idstring =="306")
		idStringArray	= ["245","246","265","266","285","286","305","306"];
	else
	if (idstring=="249" || idstring=="250" || idstring== "269" || idstring =="270" || idstring=="289" || idstring=="290" || idstring=="309" || idstring =="310")
		idStringArray	= ["249","250","269","270","289","290","309","310"];
	else
	if (idstring=="253" || idstring=="254" || idstring== "273" || idstring =="274" || idstring=="293" || idstring=="294" || idstring=="313" || idstring =="314")
		idStringArray	= ["253","254","273","274","293","294","313","314"];
	else
	if (idstring=="257" || idstring=="258" || idstring== "277" || idstring =="278" || idstring=="297" || idstring=="298" || idstring=="317" || idstring =="318")
		idStringArray	= ["257","258","277","278","297","298","317","318"];
	// Koenig
	// Zeile 5
	else
	if (idstring=="321" || idstring=="322" || idstring== "341" || idstring =="342" || idstring=="361" || idstring=="362" || idstring=="381" || idstring =="382")
		idStringArray	= ["321","322","341","342","361","362","381","382"];
	else
	if (idstring=="325" || idstring=="326" || idstring== "345" || idstring =="346" || idstring=="365" || idstring=="366" || idstring=="385" || idstring =="386")
		idStringArray	= ["325","326","345","346","365","366","385","386"];
	else
	if (idstring=="329" || idstring=="330" || idstring== "349" || idstring =="350" || idstring=="369" || idstring=="370" || idstring=="389" || idstring =="390")
		idStringArray	= ["329","330","349","350","369","370","389","390"];
	else
	if (idstring=="333" || idstring=="334" || idstring== "353" || idstring =="354" || idstring=="373" || idstring=="374" || idstring=="393" || idstring =="394")
		idStringArray	= ["333","334","353","354","373","374","393","394"];
	else
	if (idstring=="337" || idstring=="338" || idstring== "357" || idstring =="358" || idstring=="377" || idstring=="378" || idstring=="397" || idstring =="398")
		idStringArray	= ["337","338","357","358","377","378","397","398"];

	// Dame
	// Zeile 1
	if (idstring=="03" || idstring=="04" || idstring== "23" || idstring =="24" || idstring=="43" || idstring=="44" || idstring=="63" || idstring =="64")
		idStringArray	= ["03","04","23","24","43","44","63","64"];
	else
	if (idstring=="07" || idstring=="08" || idstring== "27" || idstring =="28" || idstring=="47" || idstring=="48" || idstring=="67" || idstring =="68")
		idStringArray	= ["07","08","27","28","47","48","67","68"];
	else
	if (idstring=="11" || idstring=="12" || idstring== "31" || idstring =="32" || idstring=="51" || idstring=="52" || idstring=="71" || idstring =="72")
		idStringArray	= ["11","12","31","32","51","52","71","72"];
	else
	if (idstring=="15" || idstring=="16" || idstring== "35" || idstring =="36" || idstring=="55" || idstring=="56" || idstring=="75" || idstring =="76")
		idStringArray	= ["15","16","35","36","55","56","75","76"];
	else
	if (idstring=="19" || idstring=="20" || idstring== "39" || idstring =="40" || idstring=="59" || idstring=="60" || idstring=="79" || idstring =="80")
		idStringArray	= ["19","20","39","40","59","60","79","80"];
	// Dame
	// Zeile 2
	if (idstring=="83" || idstring=="84" || idstring== "103" || idstring =="104" || idstring=="123" || idstring=="124" || idstring=="143" || idstring =="144")
		idStringArray	= ["83","84","103","104","123","124","143","144"];
	else
	if (idstring=="87" || idstring=="88" || idstring== "107" || idstring =="108" || idstring=="127" || idstring=="128" || idstring=="147" || idstring =="148")
		idStringArray	= ["87","88","107","108","127","128","147","148"];
	else
	if (idstring=="91" || idstring=="92" || idstring== "111" || idstring =="112" || idstring=="131" || idstring=="132" || idstring=="151" || idstring =="152")
		idStringArray	= ["91","92","111","112","131","132","151","152"];
	else
	if (idstring=="95" || idstring=="96" || idstring== "115" || idstring =="116" || idstring=="135" || idstring=="136" || idstring=="155" || idstring =="156")
		idStringArray	= ["95","96","115","116","135","136","155","156"];
	else
	if (idstring=="99" || idstring=="100" || idstring== "119" || idstring =="120" || idstring=="139" || idstring=="140" || idstring=="159" || idstring =="160")
		idStringArray	= ["99","100","119","120","139","140","159","160"];
	// Dame
	// Zeile 3
	if (idstring=="163" || idstring=="164" || idstring== "183" || idstring =="184" || idstring=="203" || idstring=="204" || idstring=="223" || idstring =="224")
		idStringArray	= ["163","164","183","184","203","204","223","224"];
	else
	if (idstring=="167" || idstring=="168" || idstring== "187" || idstring =="188" || idstring=="207" || idstring=="208" || idstring=="227" || idstring =="228")
		idStringArray	= ["167","168","187","188","207","208","227","228"];
	else
	if (idstring=="171" || idstring=="172" || idstring== "191" || idstring =="192" || idstring=="211" || idstring=="212" || idstring=="231" || idstring =="232")
		idStringArray	= ["171","172","191","192","211","212","231","232"];
	else
	if (idstring=="175" || idstring=="176" || idstring== "195" || idstring =="196" || idstring=="215" || idstring=="216" || idstring=="235" || idstring =="236")
		idStringArray	= ["175","176","195","196","215","216","235","236"];
	else
	if (idstring=="179" || idstring=="180" || idstring== "199" || idstring =="200" || idstring=="219" || idstring=="220" || idstring=="239" || idstring =="240")
		idStringArray	= ["179","180","199","200","219","220","239","240"];
	// Dame
	// Zeile 4
	if (idstring=="243" || idstring=="244" || idstring== "263" || idstring =="264" || idstring=="283" || idstring=="284" || idstring=="303" || idstring =="304")
		idStringArray	= ["243","244","263","264","283","284","303","304"];
	else
	if (idstring=="247" || idstring=="248" || idstring== "267" || idstring =="268" || idstring=="287" || idstring=="288" || idstring=="307" || idstring =="308")
		idStringArray	= ["247","248","267","268","287","288","307","308"];
	else
	if (idstring=="251" || idstring=="252" || idstring== "271" || idstring =="272" || idstring=="291" || idstring=="292" || idstring=="311" || idstring =="312")
		idStringArray	= ["251","252","271","272","291","292","311","312"];
	else
	if (idstring=="255" || idstring=="256" || idstring== "275" || idstring =="276" || idstring=="295" || idstring=="296" || idstring=="315" || idstring =="316")
		idStringArray	= ["255","256","275","276","295","296","315","316"];
	else
	if (idstring=="259" || idstring=="260" || idstring== "279" || idstring =="280" || idstring=="299" || idstring=="300" || idstring=="319" || idstring =="320")
		idStringArray	= ["259","260","279","280","299","300","319","320"];
	// Dame
	// Zeile 5
	if (idstring=="323" || idstring=="324" || idstring== "343" || idstring =="344" || idstring=="363" || idstring=="364" || idstring=="383" || idstring =="384")
		idStringArray	= ["323","324","343","344","363","364","383","384"];
	else
	if (idstring=="327" || idstring=="328" || idstring== "347" || idstring =="348" || idstring=="367" || idstring=="368" || idstring=="387" || idstring =="388")
		idStringArray	= ["327","328","347","348","367","368","387","388"];
	else
	if (idstring=="331" || idstring=="332" || idstring== "351" || idstring =="352" || idstring=="371" || idstring=="372" || idstring=="391" || idstring =="392")
		idStringArray	= ["331","332","351","352","371","372","391","392"];
	else
	if (idstring=="335" || idstring=="336" || idstring== "355" || idstring =="356" || idstring=="375" || idstring=="376" || idstring=="395" || idstring =="396")
		idStringArray	= ["335","336","355","356","375","376","395","396"];
	else
	if (idstring=="339" || idstring=="340" || idstring== "359" || idstring =="360" || idstring=="379" || idstring=="380" || idstring=="399" || idstring =="400")
		idStringArray	= ["339","340","359","360","379","380","399","400"];

	// Karte umklappen
	for (i=0; i<8; i++)
	{
		var bert=document.getElementById(idStringArray[i]);
		bert.src="http://www.homepage.hamburg.de/risling_/images/invitation/" + idStringArray[i] +".gif";
	}
*/
}

