// Bildtausch
// Button anlegen
function button(imgPath_out, imgPath_over) {
	this.over	= new Image()
	this.out	= new Image()
	this.over.src	= imgPath_over
	this.out.src	= imgPath_out
}

// Vorausladen der Bilder
var	picture	= new Array()
function preload() {
	picture["logo"]	= new button("/objects/theme/logo.jpg", "/objects/theme/logo-over.jpg")
}
preload();

// CSS-Hintergrundbild wechseln
function changeStyle(Id,Id2,Event) {
	if (document.getElementById) {
    	Element = document.getElementById(Id);
    	Element2 = document.getElementById(Id2);
		if (Event == 'over') {
        	Element.style.backgroundImage = 'url(' + picture[Id].over.src + ')';
        	Element2.style.borderColor = '#bdbfb5';
		}
		if (Event == 'out') {
        	Element.style.backgroundImage = 'url(' + picture[Id].out.src + ')';
        	Element2.style.borderColor = '#bdbfb5';
		}
    }
}

// img-Bild tauschen
function changeImg(Id,Event) {
	if (Event == 'over') {
		document.images[Id].src	= picture[Id].over.src
	}
	if (Event == 'out') {
		document.images[Id].src	= picture[Id].out.src
	}
}

function showPic (whichpic) {
	if (document.getElementById) {
		document.getElementById('startpic').src = whichpic.href;
		return false;
	} else {
		return true;
	}
}
function showPic2 (whichpic) {
	if (document.getElementById) {
		document.getElementById('startpic').src = whichpic.href;
		if (whichpic.title) {
			document.getElementById('desc').childNodes[0].nodeValue = whichpic.title;
		} else {
			document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
		}
		return false;
	} else {
		return true;
	}
}

