var Seitenbreite=0;
var auto_Change;
var d_elay;
var info_Control;
var start_Number="";
var selectedFile=0;
var L_ctrl=0;
function showMe()
{
document.getElementById("Serie1").style.visibility="visible";
document.getElementById("laden").style.display="none";
}
/*************************************************************************************/

function setShadows()
{
for (i=0;i<document.images.length;i++)
		{
		if(document.images[i].name=="thumb")
			{
			a=document.images[i].height;
			b=document.images[i].width;
			document.images[i+1].height=a;
			document.images[i+1].width=6;
			document.images[i+2].width=b;
			document.images[i+2].height=6;
			document.images[i+3].height=6;
			document.images[i+3].width=6;
			}
		}
}
var numb;
/**************************************************************************************/
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);
		}
	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);
	}

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;
/****************************************************************/
function loadImage()
{
window.scrollTo(0,0);
if(document.getElementById("mainWindow").style.display!="none")
	{
	document.getElementById("mainWindow").style.display="none";
	if(document.getElementById("titleMenue"))
		document.getElementById("titleMenue").style.display="none";
	if(document.getElementById("titleMenue2"))
		document.getElementById("titleMenue2").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("imageWindow").style.visibility="hidden";
	document.getElementById("imageWindow").style.display="block";
	}

if(theFile.indexOf("jpg")!="-1")
{
document.getElementById("singleImage").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>";
}
else
	{
	placeMovie();
	if(theFile.indexOf("RS")!="-1")
		setTimeout("makeVisible()",1500);
	else
		{
		document.body.style.overflow='hidden';
		document.getElementById("infoString").innerHTML=theInfoString;/*convertText*/
		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("infoTable").style.visibility="visible";
		document.getElementById("imageWindow").style.display="block";
		document.getElementById("imageWindow").style.visibility="visible";
		}
	}
WWidth=Number(newWidth);
WHeight=Number(newHeight);
}
function makeVisible()
{
document.body.style.overflow='hidden';
document.getElementById("mainWindow").style.display="none";
document.getElementById("infoString").innerHTML=theInfoString;/*convertText*/
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("infoTable").style.visibility="visible";
document.getElementById("imageWindow").style.display="block";
if(document.getElementById("titleMenue"))
	document.getElementById("titleMenue").style.display="none";
if(document.getElementById("titleMenue2"))
	document.getElementById("titleMenue2").style.display="none";
document.getElementById("horizLine").style.display="none";
document.getElementById("imageWindow").style.visibility="visible";
}
function placeMovie()
{

if(location.href.indexOf("musicdoc")!="-1")
document.getElementById("singleImage").innerHTML="<embed name='flashImage' id='theImage' src="+theFile+" height="+newHeight+" width="+newWidth+" border='0' autoplay='true' loop='false' controller='true'  type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' alt='Video' title='' style='vertical-align:top;cursor:pointer'><\/embed>";

else
document.getElementById("singleImage").innerHTML="<span style='white-space:nowrap'><embed name='flashImage' id='theImage' src="+theFile+" height="+newHeight+" width="+newWidth+" border='0' autoplay='true' loop='false' controller='false'  type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' onClick='placeMovie()' alt='Video' title='' style='vertical-align:top;cursor:pointer'><\/embed><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>";
}

function resetMe()
{
if(navigator.appVersion.indexOf("MSIE 6")!="-1"||navigator.appVersion.indexOf("MSIE 7")!="-1")
	reloadSite();
else
{
if(docTitle=="Reflexes_comp")selectborder(numb);
document.getElementById('imageWindow').style.display="none";
document.getElementById("infoTable").style.visibility="hidden";
document.getElementById("mainWindow").style.display="block";
if(document.getElementById("titleMenue"))
	document.getElementById("titleMenue").style.display="block";
if(document.getElementById("titleMenue2"))
	document.getElementById("titleMenue2").style.display="block";
document.getElementById("horizLine").style.display="block";

if(window.innerHeight)
	document.body.style.overflow='visible';
else
	document.getElementById("mainWindow").style.overflow='auto';
window.scrollTo(0,theScroll);
}
}
/**************************************************************************/
function answerLoading()
{
document.body.style.overflow='hidden';
document.getElementById("mainWindow").style.display="none";
document.getElementById("imageMenue").style.display="none";
/*document.getElementById("thetop").scrollIntoView("true");*/

document.getElementById("infoString").innerHTML=theInfoString;/*convertText*/
/*if(navigator.appName.indexOf("Explorer")=="-1")
	document.getElementById("infoString").style.width=newWidth;*/
document.getElementById("infoTable").style.visibility="visible";
document.getElementById("imageWindow").style.display="block";
document.getElementById("imageWindow").style.visibility="visible";

preloadNextImage();
}
/****************************************************************/

/****************************************************************/
var textTitle;
function showImage(nb)
{
if(AnzW>879&&AnzBer>639)
{
if(!window.innerHeight)
	scroll_Y=document.body.scrollTop;
else
	scroll_Y=window.pageYOffset;

theScroll=scroll_Y;

numb=Number(nb);
selectedFile=numb;

switch(nb)
	{
	case 0:
	fileString="RS.swf*480,640+";
	fullLength=4;
	document.getElementById("nav").style.display="none";
	textTitle="<span style='font-family:Arial,Verdana,non-serif;font-size:12px;text-transform:uppercase;letter-spacing:1px'>&bdquo;REFLEXIVE SURFACE&rdquo;</span> - Videofim mit Musik&nbsp;&nbsp;&nbsp;";
	break;

	case 1:
	fileString="imp1.swf*800,617+<b>O.T.</b>, Pigmentfarbe,&nbsp;Sand&nbsp;und&nbsp;&Ouml;l&nbsp;auf&nbsp;Papier<br>80x64&nbsp;cm&nbsp;&nbsp;2000&nbsp;(Privatbesitz)";
	fullLength=4;
	if(navigator.appVersion.indexOf("MSIE 6")!="-1")
		document.getElementById("nav").style.display="none";
	else
		document.getElementById("nav").style.display="inline";
	textTitle="<span style='font-family:Arial,Verdana,non-serif;font-size:12px;text-transform:uppercase;letter-spacing:1px'>Helmut&nbsp;Deutsch:</span>&nbsp;Orgelimprovisation&nbsp;I&nbsp;&nbsp;&nbsp;";
	break;

	case 2:
	fileString="imp2.swf*579,800+<b>Spundwand</b>, &Ouml;l&nbsp;und&nbsp;Pigment&nbsp;auf&nbsp;Karton<br>70x95&nbsp;cm&nbsp;2004&nbsp;(Privatbesitz)";
	fullLength=4;
	if(navigator.appVersion.indexOf("MSIE 6")!="-1")
		document.getElementById("nav").style.display="none";
	else
		document.getElementById("nav").style.display="inline";
	
	textTitle="<span style='font-family:Arial,Verdana,non-serif;font-size:12px;text-transform:uppercase;letter-spacing:1px'>Helmut&nbsp;Deutsch:</span>&nbsp;Orgelimprovisation&nbsp;II&nbsp;&nbsp;&nbsp;";
	break;

	case 3:
	fileString="imp3.swf*579,800+<b>Spundwand</b>, &Ouml;l&nbsp;und&nbsp;Pigment&nbsp;auf&nbsp;Karton<br>70x95&nbsp;cm&nbsp;2004&nbsp;(Privatbesitz)";
	fullLength=4;
	if(navigator.appVersion.indexOf("MSIE 6")!="-1")
		document.getElementById("nav").style.display="none";
	else
		document.getElementById("nav").style.display="inline";
	
	textTitle="<span style='font-family:Arial,Verdana,non-serif;font-size:12px;text-transform:uppercase;letter-spacing:1px'>Helmut&nbsp;Deutsch:</span>&nbsp;Orgelimprovisation&nbsp;III&nbsp;&nbsp;&nbsp;";
	break;

	case 4:
	fileString="imp4.swf*579,800+<b>Spundwand</b>, &Ouml;l&nbsp;und&nbsp;Pigment&nbsp;auf&nbsp;Karton<br>70x95&nbsp;cm&nbsp;2004&nbsp;(Privatbesitz)";
	fullLength=4;
	if(navigator.appVersion.indexOf("MSIE 6")!="-1")
		document.getElementById("nav").style.display="none";
	else
		document.getElementById("nav").style.display="inline";
	
	textTitle="<span style='font-family:Arial,Verdana,non-serif;font-size:12px;text-transform:uppercase;letter-spacing:1px'>Helmut&nbsp;Deutsch:</span>&nbsp;Orgelimprovisation&nbsp;IV&nbsp;&nbsp;&nbsp;";
	break;

	case 5:
	fileString="Silence.swf*430,800+";
	fullLength=4;
	document.getElementById("nav").style.display="none";
	textTitle="<span style='font-family:Arial,Verdana,non-serif;font-size:12px;text-transform:uppercase;letter-spacing:1px'>&bdquo;SILENCE&rdquo;</span> - Videofilm mit Musik&nbsp;&nbsp;&nbsp;";
	break;

	case 6:
	fileString="Skrjabin_PT.swf*434,540+";
	fullLength=4;
	document.getElementById("nav").style.display="none";
	textTitle="<span style='font-family:Arial,Verdana,non-serif;font-size:12px;letter-spacing:1px'>Skrjabin: Po&egrave;me&nbsp;tragique&nbsp;op.34</span> - 1990&nbsp;&nbsp;&nbsp;";
	break;

	case 7:
	fileString="Skrjabin_PS.swf*434,540+";
	fullLength=4;
	document.getElementById("nav").style.display="none";
	textTitle="<span style='font-family:Arial,Verdana,non-serif;font-size:12px;letter-spacing:1px'>Skrjabin: Po&egrave;me&nbsp;satanique&nbsp;op.36</span> - 1991&nbsp;&nbsp;&nbsp;";
	break;

	case 8:
	fileString="Skrjabin_P32.swf*434,540+";
	fullLength=4;
	document.getElementById("nav").style.display="none";
	textTitle="<span style='font-family:Arial,Verdana,non-serif;font-size:12px;letter-spacing:1px'>Skrjabin: Deux Po&egrave;mes&nbsp;op.32</span> - 1990&nbsp;&nbsp;&nbsp;";
	break;

	case 9:
	fileString="TL_E8.swf*482,799+";
	fullLength=4;
	document.getElementById("nav").style.display="none";
	textTitle="<span style='font-family:Arial,Verdana,non-serif;font-size:12px;letter-spacing:1px'>Thomas Lefeldt: &Eacute;tude-Caprice VIII (1994) f&uuml;r 2 Klaviere </span><br/>M. Suzuki, Y. Takatsuki, Klavier (Detmold 2009) &copy Produktionsb&uuml;ro Michael Schnurr 2009&nbsp;&nbsp;&nbsp;";
	break;
	}

a=fileString.indexOf("*");
theFile=docTitle+"/"+fileString.substring(0,a);
b=fileString.indexOf("+");
SizeString=fileString.substring(a+1,b);

c=SizeString.indexOf(",");

origHeight=SizeString.substring(0,c);
origWidth=SizeString.substring(c+1);

theInfoString=fileString.substring(b+1);
document.getElementById("textTitle").innerHTML=textTitle;

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);
}