var leftB=0;
var topB=0;
var timer;
var Start=true;
var x;
var y;
function getObj(bezeichner) {
window.document.getElementById ? tmpObj=window.document.getElementById(bezeichner) : tmpObj=eval("document.all." + bezeichner);
return tmpObj;
}
function getCooVal(name,unescapen) {
	name+="=";
	start=document.cookie.indexOf(name);
	if (start >= 0) {
		start+=name.length;
		ende=document.cookie.indexOf(";",start);
		(ende < 0) ? cooval=document.cookie.substring(start) : cooval=document.cookie.substring(start,ende);
		if(unescapen) {
			return(unescape(cooval));
		} else {
			return(cooval);
		}
	}
	return null;
}
function addChar(objId,charakta) {
if (obj=getObj(objId)) {
obj.firstChild.data+=charakta;
}}
function dropTxt (objId,deltaT,beginn) {
if ((obj=getObj(objId)) && (txt=obj.firstChild.data)) {
obj.firstChild.data="";
obj.style.visibility="visible";
for (i=0;i<txt.length;i++) {
setTimeout("addChar(\"" + objId + "\",\"" + txt.charAt(i) + "\")",beginn+(i*deltaT));
}}}
function leftop () {
	if (self.innerHeight) {
		b = self.innerWidth;
		h = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) {
		b = document.documentElement.clientWidth;
		h = document.documentElement.clientHeight;
	} else if (document.body) {
		b = document.body.clientWidth;
		h = document.body.clientHeight;
	}
	leftB=(b-600)/2;
	topB=(h-450)/4;
}
function initLayout () {
BBg=getObj("BildBg");
leftop();
if ((leftB < 0) || (topB < 0)) {
window.resizeTo(screen.availWidth,screen.availHeight);
window.moveTo(0,0);
leftop();
if ((leftB < 0) || (topB < 0)) { leftB=topB=0; }}
		with (getObj("Blatt").style) {
			left=leftB+"px";
			top=topB+"px";
			marginLeft="0px";
			marginTop="0px";
		}
if (Start) {
Start=false;
if (document.getElementById && (dyco=document.getElementById("dynCon"))) {
if (dyco.innerHTML && !(getObj("bMdiv"))) {
dyco.innerHTML="<span id=\"bMdiv\" onmouseout=\"this.style.visibility='hidden'\" onmouseover=\"this.style.visibility='visible'\"></span><span id=\"icons\"></span>";
}
if (getObj("icons").innerHTML || (document.referrer.search(/galeriegoerl+/) != -1)) {
iconsLaden();
} else {
setTimeout("iconsLaden()",1000);
}}
kMenu(false);
document.onmousemove=maus;
setTimeout("farbtest()",3000);
if (isIE6 && (km=getObj("KlappMenu")) && (km.style.visibility != "visible")) {				//IE5-6 - JScript-Kr�cke f�r fehlende :hover-Auswertung bei anderen als A-Tags einbauen
document.all.BildBg.setAttribute("onmouseover", function ausschalten(){kMenu(false)});
document.all.MenuBg.setAttribute("onmouseover", function einschalten(){kMenu(true)});
document.all.KlappMenu.setAttribute("onmouseover", function einschalten(){kMenu(true)});
}
	if(anker=document.getElementsByTagName("a")) {
		for(i=0;i<anker.length;i++) {
			if(anker[i].className.indexOf("bild") == 0) {
				anker[i].name=anker[i].href;
				anker[i].href="javascript:bildMenu('" + anker[i].id + "')";
			}
		}
	}
(isIE6) ? document.getElementsByTagName("body")[0].setAttribute("onresize", function ini(){initLayout()}) : document.getElementsByTagName("body")[0].setAttribute("onresize","initLayout()");
if(getObj("m1")) { //index
g2m();
if(!window.opera) {
	dropTxt("graphikMenu",100,0);
	dropTxt("plastikMenu",100,1000);
	dropTxt("keramikMenu",100,2000);
} else {
	getObj('graphikMenu').style.visibility='visible';
	setTimeout("getObj('plastikMenu').style.visibility='visible'",1000);
	setTimeout("getObj('keramikMenu').style.visibility='visible'",2000);
}
(isIE6) ? document.getElementsByTagName("body")[0].setAttribute("onunload", function exitI(){exitindex()}) : document.getElementsByTagName("body")[0].setAttribute("onunload","exitindex()");
} else if (document.getElementsByTagName("h1")[0]) {
if (document.getElementsByTagName("h1")[0].innerHTML == "architektur") {
window.setTimeout("slides('heyduck','Kraftshof#Gurkenharrer#ADHaus#Rathenauplatz#Nuernberg#Rhodos',-1)",5000);
} else if(document.getElementsByTagName("h1")[0].innerHTML == "bronzeskulpturen") {
window.setTimeout("slides('bruni','LedaDetail#Leda',-1)",7000);
window.setTimeout("slides('reidel','Ballett#Diskussion#Bad#Engel',-1)",5000);
} else if(document.getElementsByTagName("h1")[0].innerHTML == "malerei und zeichnung") {
window.setTimeout("slides('vornberger','L#M#R',-2)",6000);
window.setTimeout("slides('burghart','Stilleben#Marx',-1)",6000);
} else if(document.getElementsByTagName("h1")[0].innerHTML == "phantastischer realismus und surrealismus") {
window.setTimeout("slides('jaeger','Stalin#Wildon',-2)",7000);
window.setTimeout("slides('schwarz','Stechhelm#Odaliske#Duerer',-1)",5000);
window.setTimeout("slides('reme','Lithographie#Grusskarte',-1)",8000);
window.setTimeout("slides('collien','Frau#Bibliothek',-1)",8000);
} else if(document.getElementsByTagName("h1")[0].innerHTML == "skulptur und relief") {
window.setTimeout("slides('bruni','Leda#LedaDetail',-1)",12000);
window.setTimeout("slides('reidel','Ballett#Bad#Diskussion#Engel',-1)",13000);
} else if(document.getElementsByTagName("h1")[0].innerHTML.substr(2) == "nstler") {
	for(i=0;i<document.images.length-1;i++) {
		if (isIE6) {
			with(document.images[i].parentNode) {
				setAttribute("onmouseover", function previewEin(){bild2Bg(this)});
				setAttribute("onmouseout", function previewAus(){nix2Bg()});
			}
		} else {
			with(document.images[i]) {
				style.display="none";
				parentNode.setAttribute("onmouseover","bild2Bg(this)");
				parentNode.setAttribute("onmouseout","nix2Bg()");
			}
		}
	}
} else if((document.getElementsByTagName("h1")[0].innerHTML == "graphik") || (document.getElementsByTagName("h1")[0].innerHTML == "plastik") || (document.getElementsByTagName("h1")[0].innerHTML == "keramik")) {
	anker=document.getElementsByTagName("a");
	for(i=0;i<anker.length;i++) {
		if(anker[i].parentNode.id == "GPKmenu") {
			if (isIE6) {
				with(anker[i]) {
					setAttribute("onmouseover", function kommentarEin(){GPKommentar(this)});
					setAttribute("onmouseout", function kommentarAus(){GPKommentar(null)});
				}
			} else {
				with(anker[i]) {
					setAttribute("onmouseover","GPKommentar(this)");
					setAttribute("onmouseout","GPKommentar(null)");
				}
			}
		}
	}
}
}
}
}
function GPKommentar(menueintrag) {
	anzeige=getObj('Biographie');
	if(menueintrag) {
		anzeige.title=anzeige.innerHTML;
		anzeige.innerHTML=menueintrag.title;
	} else {
		anzeige.innerHTML=anzeige.title;
		anzeige.title="";
	}
}
function farbtest () {
screen.colorDepth ? cBits=screen.colorDepth : cBits=screen.pixelDepth;
if (cBits && (cBits < 16) && (cBits > 0) && (document.referrer.search(/galeriegoerl+/) == -1)) {
alert ("\nDiese Website beinhaltet Abbildungen von Arbeiten zeitgen�ssischer K�nstler.\n\nF�r eine ann�hernd werkgetreue Wiedergabe empfehlen sich Einstellungen\nmit einer Farbtiefe von\n\n- mindestens 16 Bit (HiColor),\n\n- optimal 24 oder 32 Bit (TrueColor)\n\n\nIhre aktuelle Konfiguration stellt lediglich " + cBits + " Bit Farbtiefe (" + Math.pow(2, cBits) + " Farben) dar;\ndie Anzeige vieler Werke wird daher erheblich vom Original abweichen!");
}}
function kMenu(AnAus) {
km=getObj("KlappMenu");
	if (isIE6 && km && (km.style.visibility != "visible")) {
		kma=km.firstChild;
		if (AnAus) {
			if (timer) {
				nix2Bgexec();
				window.clearTimeout(timer);
			}
			if(km.className != "KlappText") {
				km.style.background="url(logo/menubg.gif)";
			}
			while(kma.style) {
				kma.style.visibility="visible";
				kma=kma.nextSibling;
			}
		} else {
			while(kma.style) {
				kma.style.visibility="hidden";
				kma=kma.nextSibling;
			}
			if(km.className != "KlappMenuText") {
				km.style.background="transparent";
			}
		}
	}
}
function maus(pos) {
(isIE) ? y=event.clientY : (pos.pageY) ? y=pos.pageY : y=topB+150;
(isIE) ? x=event.clientX : (pos.pageX) ? x=pos.pageX : x=leftB+300;
}
function bild2Bg(kunstler) {
prevImg=getObj("Preview");
if (timer) {window.clearTimeout(timer);}
prevBild= "url(logo/color/" + kunstler.name + ".jpg)";
if ((y - 50) < (topB + 50)) {
topBild= topB + 50;
} else if ((y + 50) > (topB + 350)) {
topBild= topB + 250;
} else {
topBild= y - 50;
}
if (isIE5) {prevImg.filters.blendTrans.Apply();}
with (prevImg.style) {
backgroundImage= prevBild;
top=topBild + "px";
left= (leftB + 50) + "px" ;
visibility="visible";
}
if (isIE5) {prevImg.filters.blendTrans.Play();}
anzeiger=getObj("Biographie");
anzeiger.firstChild.data=kunstler.title + " von " + kunstler.firstChild.nextSibling.data.toUpperCase();
}
function nix2Bg() {
timer=window.setTimeout("nix2Bgexec()",2400);
}
function nix2Bgexec() {
prevImg=getObj("Preview");
if (isIE5) {prevImg.filters.blendTrans.Apply();}
prevImg.style.visibility= "hidden";
if (isIE5) {prevImg.filters.blendTrans.Play();}
anzeiger=getObj("Biographie");
anzeiger.firstChild.data="Verzeichnis aller derzeit ausgestellten Kuenstler in alphabetischer Reihenfolge";
}
function opa(bild,opak) {
isIE ? document.images[bild].filters[0].opacity=opak : document.images[bild].style.MozOpacity=opak+"%";
}
function slides(wer,verweise,naechstesBild) {
verweis=verweise.split("#");
w=eval("document." + wer + "bild");
p=getObj("preload_" + wer);
if (naechstesBild >= 0) {
w.width=p.width;
w.src=p.src;
if (isIE5) {w.filters.blendTrans.Apply();}
w.style.visibility="visible";
if (isIE5) {w.filters.blendTrans.Play();}
l=getObj(wer);
l.href= wer + ".html#" + verweis[naechstesBild];
} else {
naechstesBild= Math.abs(naechstesBild) -1;
}
tmpNr= Math.round((verweis.length * Math.random()) - 0.5);
while (tmpNr == naechstesBild) {
tmpNr=Math.round((verweis.length * Math.random()) - 0.5);
}
naechstesBild=tmpNr;
p.src= wer + verweis[naechstesBild] + ".jpg";
window.setTimeout("hideSlide('" + wer + "','" + verweise + "'," + naechstesBild + ")",(((20000+(2500*verweis.length)) / verweis.length) - 600));
}
function hideSlide(wer,verweise,naechstesBild) {
w=eval("document." + wer + "bild");
if (isIE5) {w.filters.blendTrans.Apply();}
w.style.visibility="hidden";
if (isIE5) {w.filters.blendTrans.Play();}
window.setTimeout("slides('" + wer + "','" + verweise + "'," + naechstesBild + ")",600);
}
function bildMenu(was) {
if (mendiv=getObj("bMdiv")) {
if (bildLink=getObj(was)) {
bigpicid="big" + bildLink.id;
if ((cOk=cookiesEnabled()) || window.external || (getObj(bigpicid))) {
diesesBild=bildLink;
bild=bildLink.firstChild;
bildTitel=bild.alt.toUpperCase();
bildTitel=bildTitel.split(": ");
if (bild.src.indexOf("/keramik/") < 0) {
	anfragetext="Preis";
	breite="110px";
} else {
	anfragetext="Verf&uuml;gbarkeit";
	breite="150px";
}
bildMenuHTML="<a href=\"" + bildLink.name + "\" title=\"Weitere Informationen zu " + bildTitel[1] + " erhalten Sie auf Anfrage...\">" + anfragetext + " anfragen</a>";
if (cOk) {
bildMenuHTML+="<br><a href=\"javascript:merkmal('" + bildLink.id + "');\" title=\"" + bildTitel[1] + " merken\">Objekt merken</a>";
menh=50;
} else {
menh=30;
}
if (isIE) {
bildMenuHTML+="<br><a href=\"javascript:Lesezeichen();\" title=\"Lesezeichen f�r " + bildTitel[0] + " eintragen\">Lesezeichen</a>";
menh+=20;
}
if (getObj(bigpicid)) {
bildMenuHTML+="<br><a href=\"javascript:bigpicShow('" + bigpicid + "');\" title=\"" + bildTitel[1] + " gr��er anzeigen \">Zoom</a>";
menh+=20;
}
mendiv.innerHTML=bildMenuHTML;
if (isIE5) { mendiv.filters.revealTrans.Apply();}
with (mendiv.style) {
top= (y - 20) + "px";
left= (x - 20) + "px";
height=menh + "px";
width=breite;
visibility="visible";
}
if (isIE5) { mendiv.filters.revealTrans.Play();}} else {
return(ziel);
}} else {
if (isIE5) { mendiv.filters.revealTrans.Apply();}
mendiv.style.visibility="hidden";
if (isIE5) { mendiv.filters.revealTrans.Play();}}
return(undefined);
} else {
return(ziel);
}}
function getHTML(obj) {
if(obj) {
if (obj.outerHTML) {
return(obj.outerHTML);
} else if (obj.innerHTML && (bag=document.createElement("div")) && (cobj=obj.cloneNode(true))) {
bag.appendChild(cobj);
return(bag.innerHTML);
}}
return(null);
}
function cookiesEnabled() {
var ablauf = new Date();
ablauf.setTime(ablauf.getTime() + 1500);
document.cookie = "Enabled=True;expires=" + ablauf.toGMTString();
test=(document.cookie.indexOf("Enabled=True") != -1);
return(test);
}
function getIconsArray() {
	if(allIcons=getCooVal("SHORTCUTS",true)) {
		return allIcons.split("|");
	}
	return null;
}
function iconsLaden() {
try {
if ((iconsBag=getObj("icons")) && document.cookie && (iconsArray=getIconsArray()) && (iconsArray.length > 0)) {
	((iconsArray.length * 100) > ((leftB*2) + 600)) ? iconStyle=" style=\"url(logo/menubg.gif)\"" : iconStyle="";
	iconString="<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" id=\"iconTable\"><tr>";
	for(i=0;i<iconsArray.length;i++) {
		iconsData=iconsArray[i].split("=");
		(iconsData[2] == "w") ? iconsData[2] = "width" : iconsData[2] = "height";
		iconString+="<td nowrap" + iconStyle + "><a href=\"" + iconsData[0] + "\" title=\"" + iconsData[3] + "\">" + (iconsData[3].split(":")[1] || iconsData[3]) + "<br><img src=\"" + iconsData[1] + "\" border=\"0\" " + iconsData[2] + "=\"70\"></a></td>";
	}
	iconString+="</tr></table>";
	if(isIE6) {
		ieBg=iconsBag.cloneNode(false);
		ieBg.id="iconsIE";
		ieBg.innerHTML="&nbsp;";
		document.getElementsByTagName("body")[0].appendChild(ieBg);
	}
	iconsBag.innerHTML=iconString;
}
} catch(e) {
	jetzt = new Date();
	jetzt.getTime();
	document.cookie = "SHORTCUTS= ;expires=" + jetzt.toGMTString();
	window.status="Fehler bei Verarbeitung der gespeicherten Shortcuts!";
}
}
function merkmal(das) {
	if ((iconsBag=getObj("icons")) && (diesesBild=getObj(das))) {
		verweisziel=location.pathname.substr(location.pathname.lastIndexOf("/")+1) + "#" + diesesBild.id;
		bild=diesesBild.firstChild;
		if (eval("((iconsBag.innerHTML.search(/" + verweisziel + "/i)) == -1)")) {
			(bild.width > bild.height) ? format="w" : format = "h";
			beschriftung=bild.alt;
			ablauf = new Date();
			ablauf.setTime(ablauf.getTime() + (400 * 24 * 3600000));
			if((document.cookie) && (allIcons=getCooVal("SHORTCUTS",false))) {
				allIcons="SHORTCUTS=" + allIcons + "|";
			} else {
				allIcons="SHORTCUTS=";
			}
			allIcons+=verweisziel + "=" + bild.src + "=" + format + "=" + escape(beschriftung) + "; expires=" + ablauf.toGMTString();
			document.cookie=allIcons;
			iconsLaden();
		} else {
			window.status=beschriftung.toUpperCase() + " ist bereits in Ihrer Merkliste enthalten!";
		}
	}
	bildMenu(null);
}
function Lesezeichen() {
if (window.external) {
window.external.AddFavorite(document.location.href,document.title);
window.status="Lesezeichen f�r &raquo;" + document.title + "&laquo; auf &raquo;" + document.location.href + "&laquo; gesetzt!";
}
bildMenu(null);
}
function bigpicHide(bigpic) {
if (bigpic.style.visibility!="hidden") {
if (isIE5) {bigpic.filters.revealTrans.Apply();}
bigpic.style.visibility="hidden";
if (isIE5) {bigpic.filters.revealTrans.Play();}
}
}
function bigpicShow(bigpicid) {
if ((bigpic=getObj(bigpicid)) && (bigpic.style.visibility!="visible")) {
if (mendiv=getObj("bMdiv")) {
if (isIE5) {bigpic.filters.revealTrans.Apply();}
bigpic.style.visibility="visible";
if (isIE5) {bigpic.filters.revealTrans.Play();}
if (isIE5) { mendiv.filters.revealTrans.Apply();}
mendiv.style.visibility="hidden";
if (isIE5) { mendiv.filters.revealTrans.Play();}
}}}
function klick(was) {
	for (i=0;i<9;i++) {
		with(document.images[i]) {
			src=getObj(was.id+"i").src;
			style.visibility="visible";
		}
	}
}
function g2m() {
	for(i=8;i<10;i++) {
		getObj("m"+i+"s").style.backgroundColor="#000000";
	}
	for(i=1;i<10;i++) {
		getObj("m"+i+"s").style.display="block";
	}
	if((getObj("m1s").filters) && !window.opera) {
		for(i=1;i<10;i++) {
			setTimeout("blendAus('m"+i+"s')",3000);
		}
	} else if ((getObj("m1s").style.MozOpacity=1) && !window.opera) {
		for(i=1;i<61;i++) {
			setTimeout("blasser("+i+")",(3000+(i*50)));
		}
	} else {
		for (i=1;i<10;i++) {
			setTimeout("getObj('m"+i+"s').style.backgroundColor='transparent';",3000+(i*100)+((Math.floor(i/8))*450));
		}
	}
}
function blendAus(was) {
	getObj(was).filters.blendTrans.Apply();
	getObj(was).style.backgroundColor="transparent";
	getObj(was).filters.blendTrans.Play();
}
function blasser(wieviel) {
	if (wieviel<60) {
		for (j=1;j<10;j++) {
			document.getElementById("m"+j+"s").style.MozOpacity=1-(wieviel/60.0);
		}
	} else {
		for (j=1;j<10;j++) {
			with(document.getElementById("m"+j+"s").style) {
				backgroundColor="transparent";
				MozOpacity=1;
			}
		}
	}
}
function exitindex() {
	for (i=0;i<9;i++) {
		document.images[i].style.visibility="hidden";
	}
}

window.setTimeout("initLayout()",500);

