// PopUp mit der Tabelle der Mannschaft //
function showTable(team_id) {
    x=(screen.availWidth/2)-275;
    y=(screen.availHeight/2)-200;
	
	fenster=window.open("/popups/showTable.php?tid="+team_id,"_blank","location=no,resizable=yes,status=no,width=550,height=400,left="+x+",top="+y+",scrollbars=yes,menubar=no,toolbar=no");
}

// PopUp mit detaillierten Spieler-Informationen //
function showPlayer(player_id) {
    x=(screen.availWidth/2)-325;
    y=(screen.availHeight/2)-300;

	fenster=window.open("/popups/showPlayer.php?pid="+player_id,"_blank","location=no,resizable=no,status=no,width=650,height=800,left="+x+",top="+y+",scrollbars=yes,menubar=no,toolbar=no");
}

// PopUp mit detaillierten Trainer-Informationen //
function showCoach(coach_id) {
    x=(screen.availWidth/2)-325;
    y=(screen.availHeight/2)-210;

	fenster=window.open("/popups/showCoach.php?cid="+coach_id,"_blank","location=no,resizable=no,status=no,width=650,height=420,left="+x+",top="+y+",scrollbars=yes,menubar=no,toolbar=no");
}

// PopUp mit detaillierten Spiel-Informationen //
function showGame(spiel_id) {
    x=(screen.availWidth/2)-200;
    y=(screen.availHeight/2)-150;

	fenster=window.open("/popups/showGame.php?sid="+spiel_id,"_blank","location=no,resizable=no,status=no,width=400,height=300,left="+x+",top="+y+",scrollbars=yes,menubar=no,toolbar=no");
}

// PopUp mit detaillierten Bericht-Informationen //
function showReport(report_id)
{
    x=(screen.availWidth/2)-300;
    y=(screen.availHeight/2)-300;

	fenster=window.open("/popups/showReport.php?bid="+report_id,"_blank","location=no,resizable=no,status=no,width=600,height=600,left="+x+",top="+y+",scrollbars=yes,menubar=no, toolbar=no");
}

// PopUp mit detaillierten Bericht-Informationen //
function showHomeDisplayReport(report_id)
{
    x=(screen.availWidth/2)-300;
    y=(screen.availHeight/2)-300;

	fenster=window.open("/popups/showHomeDisplayReport.php?bid="+report_id,"_blank","location=no,resizable=no,status=no,width=600,height=600,left="+x+",top="+y+",scrollbars=yes,menubar=no, toolbar=no");
}

// PopUp mit Routenplaner //
function showRouteCalc(calc_Id)
{
    x=(screen.availWidth/2)-325;
    y=(screen.availHeight/2)-225;

	fenster=window.open("/php/map24.php?calc_id="+calc_Id,"_blank","location=no,resizable=no,status=no,width=650,height=450,left="+x+",top="+y+",scrollbars=yes,menubar=no,toolbar=no");
    self.close();
}




// Berichtsarchiv anzeigen
function showReportArchive(team_id) {
    x=(screen.availWidth/2)-300;
    y=(screen.availHeight/2)-300;

	fenster=window.open("/popups/showReportArchive.php?tid="+team_id,"_blank","location=no,resizable=no,status=no,width=600,height=600,left="+x+",top="+y+",scrollbars=yes,menubar=no,toolbar=no");
}

// Nachrichtenarchiv anzeigen
function showNewsArchiv(year)
{
    x=(screen.availWidth/2)-410;
    y=(screen.availHeight/2)-300;

	fenster=window.open("/popups/showNewsArchive.php?year="+year,"_blank","location=no,resizable=no,status=no,width=820,height=600,left="+x+",top="+y+",scrollbars=yes,menubar=no,toolbar=no");
}

function showImage(URL, wid, hei) {
    x=(screen.availWidth/2)-(wid/2);
    y=(screen.availHeight/2)-(hei/2);

    fenster=window.open(""+URL,"_blank","location=no,resizable=yes,status=no,width="+wid+",height="+hei+",left="+x+",top="+y+",scrollbars=yes,menubar=no,toolbar=no");
}


/* Routenplaner und Anfahrtsskizze */
function checkHallForm(obj) {

	var Halle = 0;
	// Selektierte Halle herausfinden
	if (obj.halle[0].selected == true) {
		Halle = 1;
	}
	else if (obj.halle[1].selected == true) {
		Halle = 2;
	}
	else if (obj.halle[2].selected == true) {
		Halle = 3;
	}
	else if (obj.halle[3].selected == true) {
		Halle = 4;
	}
	else if (obj.halle[4].selected == true) {
		Halle = 5;
	}
	else if (obj.halle[5].selected == true) {
		Halle = 6;
	}
	else {
		Halle = 0;
	}
	
	// Anfahrtsskizze ausgewählt
	if (obj.art[0].checked == true) {
		x=(screen.availWidth/2)-325;
		y=(screen.availHeight/2)-225;
		window.open("map24.php?approach_id="+Halle, "Anfahrtsskizze", "location=yes,resizable=yes,status=yes,width=650,height=450,left="+x+",top="+y+",scrollbars=yes,menubar=yes,toolbar=yes");
		return false;
	}
	
	// Routenplaner ausgewählt
	if (obj.art[1].checked == true) {
		x=(screen.availWidth/2)-150;
		y=(screen.availHeight/2)-150;
		window.open("map24.php?route_id="+Halle, "Routenplaner", "location=no,resizable=no,status=no,width=300,height=300,left="+x+",top="+y+",scrollbars=yes,menubar=no,toolbar=no");
		return false;
	}
}


function showGalerieImage(image_id) {

	x=(screen.availWidth/2)-425;
    y=(screen.availHeight/2)-425;

    fenster=window.open("/popups/showGalerieImage.php?id="+image_id,"_blank","location=no,resizable=yes,status=no,width=850,height=850,left="+x+",top="+y+",scrollbars=yes,menubar=no,toolbar=no");
}
