sfHover = function() {
	var sfEls = document.getElementById("navigation").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}

if (window.attachEvent) window.attachEvent("onload", sfHover);


// kuenstler image navigation
currentImg = 1;

function showImg(imgNr) {
	
	if ((currentImg != imgNr)) {
		// DOM sniff
		if (document.getElementById) {
			// hide current img
			document.getElementById("img" + currentImg).style.display = "none";
			// show new img
			document.getElementById("img" + imgNr).style.display = "block";
			// update navigation
			document.getElementById("ln" + imgNr).className = "on";
			document.getElementById("ln" + currentImg).className = "off";
			// update current image
			currentImg = imgNr;
		}
	}
}

// grossdarstellung fenster
function bigImg(kuenstler) {

	var windowPrefs = "scrollbars=no,resizable=no,width=400,height=531";

	if (typeof(dispWindow) != "object") 
		var dispWindow = window.open("", "displayWindow", windowPrefs);
	else {
		if (!dispWindow.closed) dispWindow.location.href = "";
		else dispWindow = window.open("", "displayWindow", windowPrefs);
	}
	
	dispWindow.focus();
	
	
	// HTML-Code in das geoefnete Fenster schreiben
	with (dispWindow.document) {
		open ("text/html");

		writeln ('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
		writeln ('<html xmlns="http://www.w3.org/1999/xhtml">');
		writeln ('<head>');
		writeln ('<title>GALERIE JONES</title>');
		writeln ('<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />');
		writeln ('<meta name="MSSmartTagsPreventParsing" content="true" />');
		writeln ('<meta http-equiv="imagetoolbar" content="no" />');
		writeln ('<base href="http://www.galerie-jones.com" />');
		writeln ('</head>');
		writeln ('<body style="background: url(/images/kuenstler/gross/' + kuenstler + '_' + currentImg +'.jpg) no-repeat">');
		writeln ('</body>');
		writeln ('</html>');

		close();
	}	
}


// grossdarstellung fenster
function bigImgAusstellung(kuenstler) {

	var windowPrefs = "scrollbars=no,resizable=no,width=400,height=531";

	if (typeof(dispWindow) != "object") 
		var dispWindow = window.open("", "displayWindow", windowPrefs);
	else {
		if (!dispWindow.closed) dispWindow.location.href = "";
		else dispWindow = window.open("", "displayWindow", windowPrefs);
	}
	
	dispWindow.focus();
	
	
	// HTML-Code in das geoefnete Fenster schreiben
	with (dispWindow.document) {
		open ("text/html");

		writeln ('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
		writeln ('<html xmlns="http://www.w3.org/1999/xhtml">');
		writeln ('<head>');
		writeln ('<title>GALERIE JONES</title>');
		writeln ('<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />');
		writeln ('<meta name="MSSmartTagsPreventParsing" content="true" />');
		writeln ('<meta http-equiv="imagetoolbar" content="no" />');
		writeln ('<base href="http://www.galerie-jones.com" />');
		writeln ('</head>');
		writeln ('<body style="background: url(/images/kuenstler/gross/' + kuenstler + '.jpg) no-repeat">');
		writeln ('</body>');
		writeln ('</html>');

		close();
	}	
}

