sound = getCookie('cookie_soundvar');

$(document).ready(function(){
/*	$('#printType').attr('target','_blank');
	$('#passChange a').click(function(){
		href = $(this).attr('href') + '&type=250';
		window.open(href,'Mediterana','scrollbars=yes,width=430,height=200,top=250,left=200');
		return false;
	});
	if(sound == 1) {sound=2;setzeSoundtool();newflash('../miniflash.php?soundvar=1')}
*/	
});

$(window).load( function() {

});

function newflash(url){
	parent.music.location.href=url;
}

function setzeSoundtool(){
	var zeit = 10000*600; // 100 minuten gueltig
	gueltig = new Date();
	gueltig.setTime(gueltig.getTime() + zeit);
	if(sound == 1) {
		sound = 2;
	} else {
		sound = 1;
	}
	document.cookie = 'cookie_soundvar='+sound+'; path=/; expires=' + gueltig.toGMTString();
}

function getCookie(name) {
	var cookie = ' ' + document.cookie;
	var search = '' + name + '=';
	var setStr = null;
	var offset = 0;
	var end = 0;
	if (cookie.length > 0) {
		offset = cookie.indexOf(search);
		if (offset != -1) {
			offset += search.length;
			end = cookie.indexOf(';', offset)
			if (end == -1) {
				end = cookie.length;
			}
			setStr = unescape(cookie.substring(offset, end));
		}
	}
	return(setStr);
}