var newPicture = new Array();/***************************************************************/function setDivBg(n){selectedFile=Number(n);selectBorder(selectedFile);}/***************************************************************/function selectBorder(n){for(i=1;i<newPicture.length;i++)	{	document.getElementById("I"+i).style.borderColor="#B1B1B1";	document.getElementById("I"+i).style.borderLeftColor="#eee";	document.getElementById("I"+i).style.borderTopColor="#eee";	}document.getElementById("I"+n).style.borderColor='#FF0000';document.getElementById("I"+n).style.borderStyle='solid';selectedFile=Number(n)-1;}/***************************************************************/function changeBgColor(n){thisID="B"+n;if(n!=selectedFile)document.getElementById(thisID).style.borderColor="#C2C2C2";}/**********************************/function resetBgColor(n){thisID="B"+n;if(selectedFile!=n)document.getElementById(thisID).style.borderColor="#FFFFFF";}function getURL(F_numb){text=URLInfo[F_numb];return "Zum Bild auf Seite &bdquo;"+text+"&rdquo; gehen";}var URLInfo= new Array("","Malerei 2010","Malerei 2009","Malerei 2008","Malerei 2007","Malerei 2006","Malerei 2005","Malerei 2004","Malerei 2003","Malerei 2002-1999","Malerei 1988-1998","Malerei 1972-1991","Zeichnungen 2010","Kleine Formate 2010","Suite Alsacienne 2010","Kleine Formate 2009","Kleine Formate 2008","Kleine Formate 2007","Kleine Formate 2006","Kleine Formate 2005","Kleine Formate 2004","Kleine Formate 2003","Kleine Formate 1988 - 1999","Muri della Maremma 2004","Fotografik 1974-1985","Computergrafik 1994 - 2004");function getStatus(){return "Bild in neuem Fenster zeigen";}/**********************************************/function statusOut(){return "";}/*******************************************/function convertSuchwort(){while(suchText.indexOf("ß")!="-1")	{	p=suchText.indexOf("ß");    suchText = suchText.substring(0,p)+"&szlig;"+suchText.substring(p+1);	}while(suchText.indexOf("Ä")!="-1")	{	p=suchText.indexOf("Ä");    suchText = suchText.substring(0,p)+"&Auml;"+suchText.substring(p+1);	}while(suchText.indexOf("Ü")!="-1")	{	p=suchText.indexOf("Ü");    suchText = suchText.substring(0,p)+"&Uuml;"+suchText.substring(p+1);	}while(suchText.indexOf("ü")!="-1")	{	p=suchText.indexOf("ü");    suchText = suchText.substring(0,p)+"&uuml;"+suchText.substring(p+1);	}while(suchText.indexOf("ä")!="-1")	{	p=suchText.indexOf("ä");    suchText = suchText.substring(0,p)+"&auml;"+suchText.substring(p+1);	}while(suchText.indexOf("Ö")!="-1")	{	p=suchText.indexOf("Ö");    suchText = suchText.substring(0,p)+"&Ouml;"+suchText.substring(p+1);	}while(suchText.indexOf("ö")!="-1")	{	p=suchText.indexOf("ö");    suchText = suchText.substring(0,p)+"&ouml;"+suchText.substring(p+1);	}while(suchText.indexOf("í")!="-1")	{	p=suchText.indexOf("í");    suchText = suchText.substring(0,p)+"&iacute;"+suchText.substring(p+1);	}return suchText;}/****************************************************/function checkSuchwort(){suchText=convertSuchwort();suchString=suchText.toLowerCase();/*if(suchString==","||suchString=="["||suchString=="cm"||suchString=="]"||suchString=="&ouml;l auf"||suchString=="auf"||suchString=="/"||suchString=="auf"||suchString=="pappe"||suchString=="karton"||suchString=="&ouml;l"||suchString=="papier"||suchString=="makulatur")	{	document.getElementById("Suchanzahl").innerHTML="<span style='color:red'>Zuviele Treffer mit &quot;"+suchText+"&quot;. Bitte Suche spezifizieren!<\/span>";	return "false";	}else*/	return "true";}function switchToView(){if(document.forms[0].Bildanzeige.checked==true)	{	document.getElementById("Suchanzahl").innerHTML="Vorschaubilder laden...";	/*document.getElementById("textInfo").innerHTML="Textansicht zeigen";*/	}else	{	document.getElementById("Suchanzahl").innerHTML="Textansicht laden...";	/*document.getElementById("textInfo").innerHTML="Vorschaubilder zeigen";*/	}window.setTimeout("searchBegin()",500);}/****************************************************/function startSuche(){if ((document.forms[0].keyword.value.length == 0) || (document.forms[0].keyword.value == " "))	{	alert("Bitte geben Sie zuerst einen Suchbegriff ein!");	document.forms[0].elements[0].select();	}else	{	suchText=document.forms[0].keyword.value;	if(checkSuchwort()=="true")		{		document.getElementById("Suchanzahl").innerHTML="Suche nach &quot;<span style='color:red'>"+suchText+"&quot;<\/span>";		window.setTimeout("searchBegin()",500);		}	}}/****************************************************/function searchBegin(){searchArray = new Array();imgArray = new Array();newPicture = new Array("");fileStringArray = new Array();arrNumb=0;theLengthArray=new Array(m11.length,m10.length,mx9.length,mx8.length,mx7.length,mx6.length,mx5.length,mx4.length,mx3.length,mix.length,oel.length,SK14.length,SK13.length,SK12.length,SK11.length,SK10.length,SK9.length,SK6.length,SK4.length,SK3.length,SK2.length,SK1.length,SK7.length,SK5.length,SK8.length,WL1.length,WL2.length);theFileArray=new Array(m11,m10,mx9,mx8,mx7,mx6,mx5,mx4,mx3,mix,oel,SK14,SK13,SK12,SK11,SK10,SK9,SK6,SK4,SK3,SK2,SK1,SK7,SK5,SK8);theFileNameArray=new Array("m11","m10","mx9","mx8","mx7","mx6","mx5","mx4","mx3","mix","oel","SK14","SK13","SK12","SK11","SK10","SK9","SK6","SK4","SK3","SK2","SK1","SK7","SK5","SK8");for(i=0;i<theFileArray.length;i++)	{	fileType=new Array();	fileType=fileType.concat(theFileArray[i]);	for(k=0;k<theLengthArray[i];k++)		{		searchString=fileType[k];		a=searchString.indexOf("]");		searchString=searchString.substring(a+1);		suchString=searchString.toLowerCase();		suchwort=suchText.toLowerCase();		if(suchString.indexOf(suchwort)!="-1")			{			a=searchString.indexOf("+");			b=searchString.indexOf("<\/B>");							/*theURL="<a class='navLinks' style='text-transform:uppercase;font-size:10px;text-decoration:none;font-weight:bold' href='malerei_"+theFileNameArray[i]+".htm?"+k+"' title='"+getURL(i+1)+"'>"+URLInfo[i+1]+"<\/a><br>";*/				theURL="<a class='navLinks' style='text-transform:uppercase;font-size:10px;text-decoration:none;font-weight:bold' href='malerei_"+theFileNameArray[i]+".htm' title='"+getURL(i+1)+"'>"+URLInfo[i+1]+"<\/a><br>";				txtSrc=fileType[k];				imgSrc=fileType[k];				a=imgSrc.indexOf("*");				b=imgSrc.indexOf(".");				f_numb=Number(imgSrc.substring(0,b));				if(theFileNameArray[i].indexOf("SK")=="-1")					f_numb=Number(f_numb)-1;					filePath=theFileNameArray[i];				imgSrc=filePath+"/thumbnails/"+imgSrc.substring(0,a);				theFileString=txtSrc.substring(16);				theFileString=markSuchwort(theFileString);				theFileString=theURL+theFileString;								/*Text kuerzen, abschneiden und ggf. markiertes Suchwort anhaengen*/				p=theFileString.indexOf("[");				g=theFileString.indexOf("]");				q=theFileString.lastIndexOf("</B>");				theFileString=theFileString.substring(0,p)+theFileString.substring(g+1,q);								if(theFileString.substring(g+1,q).toLowerCase().indexOf(suchwort)=="-1")					theFileString=theFileString+markString;												fileStringArray=fileStringArray.concat(theFileString);				imgArray=imgArray.concat(imgSrc);				newPicture=newPicture.concat(filePath+"/"+fileType[k]);				ergebnis=theFileNameArray[i]+","+k+","+i;						searchArray=searchArray.concat(ergebnis);				arrNumb++;			}		}	}/*document.getElementById("topLine").style.marginTop="5px";*/if(searchArray!="")	{		if(searchArray.length<2)		document.getElementById("Suchanzahl").innerHTML="1 Bild mit Suchbegriff &quot;<span style='color:red'>"+suchText+"<\/span>&quot; gefunden";	else		document.getElementById("Suchanzahl").innerHTML=searchArray.length+" Bilder mit Suchbegriff &quot;<span style='color:red'>"+suchText+"<\/span>&quot; gefunden";	document.getElementById("Suchergebnisse").style.display="block";	document.getElementById("Suchanzahl").style.display="block";	/*document.getElementById("baseline").style.display="block";*/	document.getElementById("Diaschau").style.visibility="visible";	document.title="ARTMUSIC: Kunst - Suchergebnis '"+suchText+"'";	}else	{	/*if(document.forms[0].Suchtaste.value==" Suche erweitern ")*/	if(document.images[document.images.length-5].src.indexOf("suche3.jpg")!="-1")		continueSearch();	else		{		document.getElementById("Suchanzahl").innerHTML="Suchbegriff &quot;<span style='color:red'>"+suchText+"<\/span>&quot; nicht gefunden.";		document.getElementById("Suchergebnisse").innerHTML="";		document.getElementById("Suchergebnisse").style.display="none";		/*document.getElementById("baseline").style.display="none";*/		document.getElementById("Diaschau").style.display="none";		document.getElementById("Diaschau2").style.visibility="hidden";		document.getElementById("Diaschau").style.display="none";		document.title="ARTMUSIC: Kunst - Bildersuche";		/*document.forms[0].Suchtaste.value=" Suche erweitern ";*/		document.images[document.images.length-5].src=buttons[2].src;		}	}document.getElementById("searchInfo").style.display="none";loadImgThumbs();document.getElementById("info").style.fontWeight="lighter";}var fullLength;/********************************/function markSuchwort(theString){newString=theString.toLowerCase();a=newString.lastIndexOf(suchwort);markString=theString.substring(a-30,a)+"<span style='color:red;font-size:9px'>"+theString.substring(a,a+(suchText.length))+"<\/span>"+theString.substring(a+(suchText.length));string1=theString.substring(a-30,a);string2=theString.substring(a+(suchText.length));markString="<span style='color:red;font-size:9px'>"+theString.substring(a,a+(suchText.length))+"<\/span>";if(string1.lastIndexOf("/")!="-1")	{	q=string1.lastIndexOf("/");	string1=string1.substring(q+1);	}if(string1.lastIndexOf(" ")!="-1")	{	q=string1.lastIndexOf(" ");	string1=string1.substring(q+1);	}if(string1.lastIndexOf("<BR>")!="-1")	{	q=string1.lastIndexOf("<BR>");	string1=string1.substring(q+4);	}if(string1.lastIndexOf("<B>")!="-1")	{	q=string1.lastIndexOf("<B>");	string1=string1.substring(q+3);	}	if(string2.indexOf(" ")!="-1")	{	q=string2.indexOf(" ");	string2=string2.substring(0,q);	}if(string2.indexOf(",")!="-1")	{	q=string2.indexOf(",");	string2=string2.substring(0,q);	}if(string2.indexOf("<")!="-1")	{	q=string2.indexOf("<");	string2=string2.substring(0,q);	}if(string2.indexOf("/")!="-1")	{	q=string2.indexOf("/");	string2=string2.substring(0,q);	}markString="<BR>(<span style='font-style:italic;font-weight:lighter;font-size:9px'>"+string1+markString+string2+"<\/span>)";theString=theString.substring(0,a)+"<span style='color:red;font-size:9px'>"+theString.substring(a,a+(suchText.length))+"<\/span>"+theString.substring(a+(suchText.length));return theString;}var markString;/*********************************/function loadImgThumbs(){lineCount=0;if(window.innerWidth)	Seitenbreite=window.innerWidth-300;else	Seitenbreite=document.getElementById("myWindow").offsetWidth-300;	Bildbreite=150;itemNr=Math.round(Seitenbreite/Bildbreite);if(searchArray.length<itemNr-1)	{	tab_width=(searchArray.length)*150;	imgTable="<table id='mainTable' width="+tab_width+" border='0' cellspacing='0' cellpadding='0' style='padding-top:8px'><tr>";	}else	imgTable="<table id='mainTable' width='100%' border='0' cellspacing='0' cellpadding='0' style='padding-top:8px;table-layout:fixed'><tr>";textTable="";fullLength=searchArray.length;for (i=0;i<searchArray.length;i++)	{	lineCount=lineCount+1;	if(lineCount==itemNr)		{		lineCount=1;		imgTable=imgTable+"<\/tr><tr>"+textTable;		textTable="";		breakControl="<\/tr><tr>";		}	else		breakControl="";		fullSrc=newPicture[i+1];		a=fullSrc.indexOf("*");	b=fullSrc.indexOf("+");	sizeString=fullSrc;	c=sizeString.indexOf("*");	d=sizeString.indexOf("+");			imgH_W=sizeString.substring(c+1,d);	e=imgH_W.indexOf(",");	imgH=imgH_W.substring(0,e);	imgW=imgH_W.substring(e+1);	if(Number(imgH)>Number(imgW))		{		imgHeight=108		prozent=Math.round(imgHeight/(imgH/100));		imgWidth=Math.round((imgW/100)*prozent);		}	else		{		imgWidth=108;		prozent=Math.round(imgWidth/(imgW/100));		imgHeight=Math.round((imgH/100)*prozent);		}	shadH=(imgHeight+2)+"px";	shadW=(imgWidth+2)+"px";		imgWidth=imgWidth+"px";	imgHeight=imgHeight+"px";	imgHW="height="+imgHeight+" width="+imgWidth;	altText=fileStringArray[i];	a=altText.indexOf("]");	b=altText.indexOf("<\/B>");	altText=altText.substring(a,b+4);	imgLegend=fileStringArray[i];			imgTable=imgTable+breakControl+"<td width='114' align='center' class='imgborder' id='B"+(i+1)+"' bgcolor='#FFFFFF' onClick='javascript:start("+(i+1)+")'><span style='white-space:nowrap'><img id='I"+(i+1)+"' name='thumb' src="+imgArray[i]+" alt='"+convertAlternate(altText)+"' style='cursor:pointer;border:solid 1px;border-color:#B1B1B1;border-left-color:#eee;border-top-color:#eee;vertical-align:top' "+imgHW+" title='Abbildung zeigen'><img src='../layout/S1b.gif' style='width:6px;height:"+shadH+";vertical-align:top' alt='Schatten'><\/span><br><span style='white-space:nowrap'><img src='../layout/S2b.gif' style='width:"+shadW+"; height:6px;vertical-align:top' alt='Schatten'><img src='../layout/S3b.gif' style='width:6px;height:6px;vertical-align:top' alt='Schatten'><\/span><\/td>";		if(lineCount!=itemNr-1)		imgTable=imgTable+"<td>&nbsp;<\/td>";	textTable=textTable+"<td style='width:114px;text-align:center' class='Bildunterschrift'>"+imgLegend+"<\/td>";		if(lineCount!=itemNr-1)		textTable=textTable+"<td>&nbsp;<\/td>";	if(navigator.appName.indexOf("Explorer")!="-1")	document.getElementById("Diaschau2").style.visibility="visible";else{if(AnzBer>662)		{		document.getElementById("Diaschau").style.display="block";		document.getElementById("Diaschau2").style.visibility="hidden";		}	else		{		document.getElementById("Diaschau").style.display="none";		document.getElementById("Diaschau2").style.visibility="visible";		}}}/*if(searchArray.length<itemNr-1)	{	textTable=textTable+"<td width='98%' colspan='20'>&nbsp;<\/td>";	}*/img_Layout="<\/tr><tr>"+textTable+"<\/tr><\/table>";imgTable=imgTable+img_Layout;document.getElementById("Suchergebnisse").innerHTML=imgTable;nachOben();}var numb=0;/****************************************************/function continueSearch(){document.getElementById("Suchanzahl").innerHTML="Suche wird fortgesetzt...";window.open("../search.htm?"+suchText,target="_top");}function convertAlternate(text){for(k=0;k<text.length;k++)		{		if(text.substring(k,k+4) == "<BR>"||text.substring(k,k+4) == "<br>")        	text = text.substring(0,k)+" "+text.substring(k+4);		if(text.substring(k,k+3) == "<B>"||text.substring(k,k+3) == "<b>")        	text = text.substring(0,k)+text.substring(k+3);		if(text.substring(k,k+4) == "<\/B>"||text.substring(k,k+4) == "<\/b>")        	text = text.substring(0,k)+text.substring(k+4);		if(text.substring(k,k+4) == "<BR>"||text.substring(k,k+4) == "<br>")        	text = text.substring(0,k)+" "+text.substring(k+4);		if(text.substring(k,k+5)=="<span")			text = text.substring(0,k)+text.substring(k+38);		if(text.substring(k,k+7)=="</span>")			text = text.substring(0,k)+text.substring(k+7);		}	return text;}function convertText(text){/*while(text.indexOf("<BR>")!="-1")	{	a=text.indexOf("<BR>");	text=text.substring(0,a)+", "+text.substring(a+4);	}while(text.indexOf("<br>")!="-1")	{	a=text.indexOf("<br>");	text=text.substring(0,a)+", "+text.substring(a+4);	}*/a=text.lastIndexOf("<BR>");text=text.substring(0,a)+", "+text.substring(a+4);return text;}/*********************************************************************************/var shadows = new Array(3)shadows[0] = new Image(); shadows[0].src="../layout/S1.gif";shadows[1] = new Image(); shadows[1].src="../layout/S2.gif";shadows[2] = new Image(); shadows[2].src="../layout/S3.gif";/*********************************************************************************/var theFile;var newWidth;var newHeight;var theScroll;/****************************************************************/var n;function start(nb){n=1;if(navigator.appVersion.indexOf("MSIE")=="-1")	{	fade("singleImage1");	fade("mainWindow");	fade("titleMenue");	fade("horizLine");	setTimeout("showImage("+nb+")",800);	}else	showImage(nb);}function loadImage(){window.scrollTo(0,0);if(navigator.appVersion.indexOf("MSIE")=="-1")	fade("infoTable");if(theInfoString.indexOf("Materialcollage")!="-1"||theInfoString.indexOf("je ")!="-1")document.getElementById("singleImage"+n).innerHTML="<IMG name='fotoimage' ID='theImage' SRC="+theFile+" height="+newHeight+" width="+newWidth+" BORDER='0'  onClick='next()' onLoad='answerLoading()' alt='Abbildung' title='N&auml;chstes Bild' style='vertical-align:top;cursor:pointer'>";elsedocument.getElementById("singleImage"+n).innerHTML="<span style='white-space:nowrap'><IMG name='fotoimage' ID='theImage' SRC="+theFile+" height="+newHeight+" width="+newWidth+" BORDER='0'  onClick='next()' onLoad='answerLoading()' alt='Abbildung' title='N&auml;chstes Bild' style='vertical-align:top;cursor:pointer'><img id='sh1' style='vertical-align:top' src="+ shadows[0].src+" width='20' height="+newHeight+" alt=''><\/span><br><span style='white-space:nowrap'><img id='sh2' style='vertical-align:top' src="+ shadows[1].src+" width="+newWidth+" height='20' alt=''><img id='sh3' style='vertical-align:top' src="+ shadows[2].src+" width='20' height='20' alt=''><\/span>";WWidth=Number(newWidth);WHeight=Number(newHeight);}function resetMe(){	selectBorder(numb);if(window.innerHeight)	document.body.style.overflow='visible';else	document.getElementById("mainWindow").style.overflow='auto';document.getElementById('imageWindow').style.display="none";document.getElementById("infoTable").style.visibility="hidden";if(navigator.appVersion.indexOf("MSIE")=="-1"){fade("mainWindow");fade("titleMenue");fade("horizLine");if(n==1)	fade("singleImage1");else	fade("singleImage2");}document.getElementById("singleImage1").innerHTML="";document.getElementById("singleImage2").innerHTML="";document.getElementById("mainWindow").style.display="block";document.getElementById("titleMenue").style.display="block";document.getElementById("horizLine").style.display="block";if(navigator.appName.indexOf("Explorer")!="-1")	document.getElementById("Diaschau").style.display="none";window.scrollTo(0,theScroll);}/**************************************************************************/function answerLoading(){document.body.style.overflow='hidden';document.getElementById("mainWindow").style.display="none";document.getElementById("titleMenue").style.display="none";document.getElementById("horizLine").style.display="none";if(navigator.appName.indexOf("Explorer")=="-1")	document.getElementById("infoString").style.width=newWidth;if(navigator.appVersion.indexOf("MSIE 7")!="-1")	document.getElementById("infoString").style.width=newWidth;document.getElementById("infoString").innerHTML=convertText(theInfoString);document.getElementById("infoString").innerHTML=convertText(theInfoString);infoPos=180+Number(newHeight);document.getElementById("infoString").style.top=infoPos+"px";document.getElementById("infoTable").style.visibility="visible";document.getElementById("imageWindow").style.display="block";document.getElementById("imageWindow").style.visibility="visible";if(navigator.appVersion.indexOf("MSIE")=="-1"){if(n==2)	{	fade("singleImage2");	setTimeout("fade('singleImage1')",0);	n=1;	}else	{	fade("singleImage1");	setTimeout("fade('singleImage2')",0);	n=2;	}fade("infoTable");}if(navigator.appName.indexOf("Explorer")!="-1")	document.getElementById("Diaschau").style.display="none";if(navigator.appName.indexOf("Explorer")!="-1"&&AnzBer>662)	{	document.getElementById("Diaschau").style.display="block";	document.getElementById("Diaschau").style.position="absolute";	document.getElementById("Diaschau").style.left=119;	document.getElementById("Diaschau").style.bottom=50;	}preloadNextImage();}/****************************************************************/function preloadNextImage(){nb=numb+1;if(nb>fullLength)	nb=1;fileString=newPicture[nb];a=fileString.indexOf("/");/*docTitle=fileString.substring(0,a);*/docTitle="search";b=fileString.indexOf("*");prelFile=fileString.substring(0,b);document.images[document.images.length-1].src=prelFile;}/****************************************************************/var textTitle;function showImage(nb){textTitle=fileStringArray[nb-1];a=textTitle.indexOf("<br");textTitle=textTitle.substring(0,a);b=textTitle.indexOf("style");c=textTitle.indexOf("bold'");textTitle=textTitle.substring(0,b)+" style='font-size:12px;text-transform:uppercase;text-decoration:none' "+textTitle.substring(c+5)+"&nbsp;&nbsp;";if(!window.innerHeight)	scroll_Y=document.body.scrollTop;else	scroll_Y=window.pageYOffset;theScroll=scroll_Y;numb=Number(nb);selectedFile=numb-1;fileString=newPicture[numb];a=fileString.indexOf("/");/*docTitle=fileString.substring(0,a);*/docTitle="search";b=fileString.indexOf("*");theFile=fileString.substring(0,b);c=fileString.indexOf("+");SizeString=fileString.substring(b+1,c);d=SizeString.indexOf(",");origHeight=SizeString.substring(0,d);origWidth=SizeString.substring(d+1);theInfoString=convertText(fileString.substring(c+1));document.getElementById("textTitle").innerHTML="<span>"+textTitle+"<\/span>";newWidth=origWidth;newHeight=origHeight;if(newHeight>WindowHeight) 	{	newHeight=WindowHeight;	prozent=Math.round(newHeight/(origHeight/100));	newWidth=Math.round((origWidth/100)*prozent);	}if(newWidth>WindowWidth)	{	newWidth=WindowWidth;	prozent=Math.round(newWidth/(origWidth/100));	newHeight=Math.round((origHeight/100)*prozent);	}loadImage();}var fullLength;/***********************************************/function next(){num=numb;num++;if(num>fullLength)	num=1;showImage(num);}/***********************************************/function prev(){num=numb;num--;if(num<1)	num=fullLength;showImage(num);}