// (c) Copyright Faktor Werbegraphik

function Open_Aussenansicht(Bus) {
	Left = (screen.width / 2) - 330;
	Top = (screen.height / 2) - 250;
	New_Window = window.open('../Gfx_Bus/' + Bus + '_aussenansicht.jpg',
							 'Aussenansicht',
							 'width=660, height=500, left=' + Left + ', top=' + Top + ', scrollbars=no');
	New_Window.focus();
	}

function Open_Innenansicht(Bus) {
	Left = (screen.width / 2) - 330;
	Top = (screen.height / 2) - 250;
	New_Window = window.open('../Gfx_Bus/' + Bus + '_innenansicht.jpg',
							 'Innenansicht',
							 'width=660, height=500, left=' + Left + ', top=' + Top + ', scrollbars=no');
	New_Window.focus();
	}

function Open_Innenansicht_Hoch(Bus) {
	Left = (screen.width / 2) - 210;
	Top = (screen.height / 2) - 310;
	New_Window = window.open('../Gfx_Bus/' + Bus + '_innenansicht.jpg',
							 'Innenansicht',
							 'width=420, height=620, left=' + Left + ', top=' + Top + ', scrollbars=no');
	New_Window.focus();
	}

function Open_Sitzplan(Bus) {
	Left = (screen.width / 2) - 330;
	Top = (screen.height / 2) - 115;
	New_Window = window.open('../Gfx_Bus/' + Bus + '_Sitzplan.gif',
							 'Sitzplan',
							 'width=660, height=231, left=' + Left + ', top=' + Top + ', scrollbars=no');
	New_Window.focus();
	}

function Open_Ausstattung(Bus) {
	Left = (screen.width / 2) - 410;
	Top = (screen.height / 2) - 310;
	New_Window = window.open('../Content_Bus/' + Bus + '_Ausstattung.php',
							 'Ausstattung',
							 'width=820, height=620, left=' + Left + ', top=' + Top + ', scrollbars=yes');
	New_Window.focus();
	}

function Open_Taxiservice(Bus) {
	Left = (screen.width / 2) - 266;
	Top = (screen.height / 2) - 266;
	New_Window = window.open('../Gfx_Global/taxi_grafik_b.png',
							 'Taxiservice',
							 'width=533, height=533, left=' + Left + ', top=' + Top + ', scrollbars=no');
	New_Window.focus();
	}

function setCookie(c_name,value,exdays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
document.cookie=c_name + "=" + c_value;
}

function getCookie(c_name)
{
var i,x,y,ARRcookies=document.cookie.split(";");
for (i=0;i<ARRcookies.length;i++)
{
  x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
  y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
  x=x.replace(/^\s+|\s+$/g,"");
  if (x==c_name)
    {
    return unescape(y);
    }
  }
}

function show_2012() {
	var gezeigt=getCookie("gezeigt");
	if(gezeigt==null || gezeigt!="Ja")
	{
		$('#katalog_anfordern_bg').fadeIn('slow', function()
		{
			$('#katalog_anfordern').fadeIn('medium');
		});
	}
}

function hide_2012() {
	$('#katalog_anfordern').fadeOut('medium', function()
	{
		$('#katalog_anfordern_bg').fadeOut('fast');
		setCookie("gezeigt","Ja",365);
	});
}
