function openBig( url ) {

	widthWindow			=	900;
	heightWindow		=	710;

	screenX				=	20;
	screenY				=	20;

	myWin				=	window.open( url, '', 'width=' + widthWindow + ',height=' + heightWindow + ',screenX=' + screenX + ',screenY=' + screenY + ',scrollbars=yes,locationbar=no,menubar=no,resizeable=yes,status=no' );

}


/**
 *	Tauscht das Hauptbild-Bild auf das übergeben Bild.
 */
function switchMainImage( urlImage ) {

	if ( !document.getElementById ) {
		return	false;
	}

	objImages				=	document.getElementById( 'main_image' );

	objImages.src			=	urlImage;

}


function getCookieValue( key ) {	// liefert null bei nicht gefunden

	var nStart, nMax, ni, sValue, sCk;

	key		= key + "=";

	sCk		= document.cookie;

 	ni		= sCk.indexOf( key );
	if ( ni == -1 ) {
		return null;
	}

	ni		= ni + key.length;
	nMax	= sCk.length;

	if ( ni < nMax ) {
		nStart	= ni;
		while ( (ni <= nMax) && (sCk.charAt( ni ) != ";" ) ) {
			ni++;
		}
		sValue = sCk.substring( nStart, ni );

		if ( sValue == "" ) {
			return null;
		}
		else {
			return unescape( sValue );
		}
	}

	return( null );

}


/**
 * expires: '' oder 0 für bis zum Schliessen des Browsers. Sonst Zeit in Stunden.
 */
function setCookieValue( key, value, expires ) {	// writes and returns die actuall cookie value

	var	Dummy;

	if ( expires == ''  ||  expires == 0 ) {
		document.cookie = key + "=" + escape( value ) + ";path=/";
	}
	else {
		var date		= new Date();
		date.setTime( date.getTime() + expires * 3600 * 1000 );			// millis
		expiresGMT		= date.toGMTString();
		document.cookie = key + "=" + escape( value ) + ";path=/;expires=" + expiresGMT;
	}

	dummy			= getCookieValue( key );

	return dummy;

}

function switchMusicOnOff() {

	if ( getCookieValue( 'music' ) != 'off' ) {
		setCookieValue( 'music', 'off', 0 ); 
	}
	else {
		setCookieValue( 'music', 'on', 0 ); 
	}

	location.reload();

}

function writeMusic() {

	//	Hinweis: Original-breite ist 104

	if ( getCookieValue( 'music' ) != 'off' ) {
		source			=	'<div id="music">' +
							'&raquo; <a href="#" onclick="switchMusicOnOff();">Musik aus</a>' +
							'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"' + 
							'codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"' + 
							'width="1" height="1">' + 
							'<param name="movie" value="/music-bg.swf" />' + 
							'<param name="quality" value="high" />' + 
							'<param name="wmode" value="transparent" />' + 
							'<param name="bgcolor" value="#000000" />' + 
							'<embed src="/music-bg.swf" quality="high" bgcolor="#000000" width="1" height="1"' + 
							'type="application/x-shockwave-flash"' + 
							'pluginspage="http://www.macromedia.com/go/getflashplayer" />' + 
							'</object>' + 
							'</div>';
	}
	else {
		source			=	'<div id="music">' +
							'&raquo; <a href="#" onclick="switchMusicOnOff();">Musik an</a>' +
							'</div>';
	}

	document.writeln( source );

}
