<!--//
function setElement(eID,ifStyle,funct,wert){
	if (document.getElementById){
		if (ifStyle == 1){
			var newElement = document.getElementById(eID).style;
		}
		else {
			var newElement = document.getElementById(eID);
		}
		newElement[funct] = wert;
	}
}

function getobject(id) {
	var elmID;
                
	if(document.getElementById) {elmID = document.getElementById(id);}
    else if(document.all) {elmID = document.all[id];}
    else if(document.layers) {elmID = this._getLayer(id);}
    else if(document.forms) {
        if(document.forms[id]) {elmID = document.forms[id];}
        else {
            for(var i=0; i<document.forms.length; i++) {
                if(document.forms[i][id]) {
                    elmID = document.forms[i][id];
                    break;
                }
            }
        }
    }
    else {elmID = null;}

    return elmID;
}


function switchBox(b) {
		
	if(b == 'tickets') {	
		getobject("changeHead").className = "head2";
		getobject("tab1").className = "none";	
		getobject("tab2").className = "active";	
		getobject("mehr1").style.display = "none";
		getobject("mehr2").style.display = "block";	
		getobject("fanshop_content").style.display = "none";
		getobject("tickets_content").style.display = "block";	
	}
	if(b == 'fanshop') {
		getobject("changeHead").className = "head";
		getobject("tab1").className = "active";
		getobject("tab2").className = "none";
		getobject("mehr1").style.display = "block";
		getobject("mehr2").style.display = "none";
		getobject("fanshop_content").style.display = "block";
		getobject("tickets_content").style.display = "none";
	}
}

i = 0;

function fotoSlider(richtung, anz) {
	
	try {
	getobject("fotoSlider").style.width = anz*33+'px';
	} catch (e)  {
	}

	var breite = anz*33;
	
	if(richtung == 'links') {
		
		if( i <= 0)
		{
	
			getobject("fotoSlider").style.marginLeft = i+'px' ;
		
			i++;
	
			d = setTimeout('fotoSlider("links", '+anz+')',10);
		}
		
	}
	
	if(richtung == 'rechts') {
		if(i >= (180-breite))
		{
			getobject("fotoSlider").style.marginLeft = i+'px' ;
			
			i--;
		
			c = setTimeout('fotoSlider("rechts", '+anz+')',10);
		}
			
	}	

}

function bigFoto(nr) {
	getobject("big_foto").innerHTML = "<img src=\"image/dummy_fotogalerie_"+nr+".jpg\" /><br />";	
}

//check for flash
var flashversionMin = 8;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

if (plugin) {
	for (f = 0; f < 20; f++) {
		var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
		if (plugin.description.indexOf(f+".")>=0){
			flashversion = f;
			
			if (flashversion >= flashversionMin){
				plugin = true;
				break;
			}
		}
	}
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.userAgent.indexOf("Windows 95")>=0 || navigator.userAgent.indexOf("Windows 98")>=0 || navigator.userAgent.indexOf("Windows NT")>=0)) {
	document.write('<SCR'+'IPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.'+flashversionMin+'")))\n');
	document.write('</SCR'+'IPT\> \n');
}

function playSWF(file,id,vars,width,height,wmode,bgcolor,baseurl,wLName) {
	fsource='<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
	fsource+=' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ';
	fsource+=' ID='+id+' WIDTH="'+width+'"; HEIGHT="'+height+'">';
	fsource+=' <PARAM NAME="allowScriptAccess" VALUE="sameDomain" /> <PARAM NAME=movie VALUE="'+file+'"> <PARAM NAME=FlashVars VALUE="'+vars+'"> <PARAM NAME=menu VALUE=false>  <PARAM NAME="BASE" VALUE='+baseurl+'> <PARAM NAME=quality VALUE=high> <PARAM NAME=wmode value='+wmode+'> <PARAM NAME=bgcolor VALUE='+bgcolor+'>';
		if(navigator.userAgent.indexOf("Opera")==-1) {
			fsource+=' <EMBED src="'+file+'" FlashVars="'+vars+'" wmode='+wmode+' menu=false quality=high bgcolor='+bgcolor+'';
			fsource+=' swLiveConnect=FALSE allowScriptAccess="sameDomain" NAME='+id+' WIDTH="'+width+'" HEIGHT="'+height+'"';
			fsource+=' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" BASE='+baseurl+'>';
			fsource+=' </EMBED>';
		}
		else	{
			fsource+=' <EMBED src="'+file+'" FlashVars="'+vars+'" wmode='+wmode+' menu=false quality=high bgcolor='+bgcolor+'';
			fsource+=' swLiveConnect=FALSE allowScriptAccess="sameDomain" ID='+id+' WIDTH="'+width+'" HEIGHT="'+height+'"';
			fsource+=' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" BASE='+baseurl+'>';
			fsource+=' </EMBED>';
		}
	fsource+=' </OBJECT>';

	if (document.getElementById){
		document.getElementById(wLName).innerHTML=fsource;
	}

}

function printPage(){ 
	var sOption="toolbar=yes,location=no,directories=yes,menubar=yes,scrollbars=yes,width=680,height=600,left=100,top=25"; 

	var sWinHTML = document.getElementById('druck_content').innerHTML;
	var strBereich = document.title;
    var strBody = document.body.className;
	
	var winprint=window.open("","",sOption); 
       winprint.document.open(); 
       winprint.document.write('<html><title>' + document.title + '</title><link rel="stylesheet" href="style/fc.css" type="text/css"><link rel="stylesheet" href="style/fc_print.css" type="text/css"><!--[if lt IE 7]><link rel="stylesheet" href="style/fc_ie.css" /><![endif]--><body id="'+strBody+'" onload="window.print();">'); 
       winprint.document.write('<div style="position: relative; z-index: 10;"><img src="image/fc_druckkopf.png" width="660" height="100" border="0"><br>');
       //winprint.document.write('<div id="infoDiv" style="position: absolute; left: 25px; top: 110px; width: 340px; height: 30px; z-index: 2; text-align: left;"><span style="font-size: 15px; color: #000; font-family: arial; text-decoration: none;"><strong>' + strBereich + '</strong></span></div></div>');
       winprint.document.write('<div id="content">');
       winprint.document.write('<div id="druck_content" style="position: absolute; left:25px;">'+sWinHTML+'</div>');
       winprint.document.write('</div></body></html>');
       winprint.document.close(); 
       winprint.focus(); 
}

function nxSend(){
	nx_win = window.open("/fileadmin/php/nx_mail_news.php?url="+escape(document.location)+"&title="+escape(document.title),"_danke", 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=400,height=700');
	nx_win.focus();
}

function nxSendEn(){
	nx_win = window.open("/fileadmin/php/nx_mail_news_en.php?url="+escape(document.location)+"&title="+escape(document.title),"_danke", 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=400,height=700');
	nx_win.focus();
}

function WriteBanner(x){
	if (x==0){
	 x=1;
	}

	if(x==1){
		document.getElementById("foot_banner").innerHTML='<div id="banner_flash_norm" style="position: relative;"><br></div>';
		if (plugin == true)	{
			playSWF("http://www.sport-auktion.de/flash/banner_sportauktion.swf","flashBG_Film","xml_file=http://www.sport-auktion.de/flash/xml_clubs/banner_23.xml",468,60,"transparent","#FFFFFF","","banner_flash_norm");
			
		} else {
			setTimeout("WriteBanner(1)",100);
		}
		setTimeout("WriteBanner(3)",20000);
	}
	
	/*if(x==2){
		document.getElementById("foot_banner").innerHTML='<div id="banner_flash_norm" style="position: relative;"><br></div>';
		if (plugin == true)	{
			playSWF("image/banner/banner_xxl_kalender.swf","flashBG_Film","",468,60,"transparent","#FFFFFF","","banner_flash_norm");
		}
		else {
			document.getElementById("foot_banner").innerHTML='<a href="http://www.sport-auktion.de/1._FC_Koeln?pid=1" target="_blank"><img border="0" src="fileadmin/template/main/image/banner/banner_auktion.gif" width="468" height="60" border="0"></a>';
		}
		setTimeout("WriteBanner(3)",20000);
	}*/
	
	if(x==3){
		document.getElementById("foot_banner").innerHTML='<div id="banner_flash_norm" style="position: relative;"><br></div>';
		if (plugin == true)	{
			playSWF("image/banner/banner_rewe.swf","flashBG_Film","none",468,60,"transparent","#FFFFFF","","banner_flash_norm");
		}
		else {
			document.getElementById("foot_banner").innerHTML='<a href="http://www.rewe.de/" target="_blank"><img border="0" src="image/banner/banner_rewe_fallback.jpg" width="468" height="60" border="0"></a>';
		
		}
		setTimeout("WriteBanner(4)",20000);
	}
	
	if(x==4){
		//document.getElementById("foot_banner").innerHTML='<a href="http://www.fassbrause.de" target="_blank"><img border="0" src="image/banner/fassbrause-468x60.gif" width="468" height="60" border="0"></a>';
		document.getElementById("foot_banner").innerHTML='<a href="http://www.gaffelamdom.de" target="_blank"><img border="0" src="image/banner/gaffel_amdom.gif" width="468" height="60" border="0"></a>';
		setTimeout("WriteBanner(5)",20000);
	}

	if(x==5){
		document.getElementById("foot_banner").innerHTML='<a href="http://www.zanox-affiliate.de/ppc/?14733772C1742180615T"><img src="http://www.zanox-affiliate.de/ppv/?14733772C1742180615" align="bottom" width="468" height="60" border="0" hspace="1" alt="Sky - erleben Sie Ihren Verein"></a>';
		setTimeout("WriteBanner(6)",20000);
	}	
	
	if(x==6){
		document.getElementById("foot_banner").innerHTML='<a href="http://www.fc-printshop.de" target="_blank"><img src="image/banner/banner_fc-printshop.gif" align="bottom" width="468" height="60" border="0" hspace="1" alt="FC Printshop"></a>';
		setTimeout("WriteBanner(1)",20000);
	}
	/*if(x==7){
		document.getElementById("foot_banner").innerHTML='<a href="https://www.dkms.de/spender/registrierung/index.html" target="_blank"><img src="image/banner/initative_anja.png" align="bottom" width="468" height="60" border="0" hspace="1" alt="DKMS"></a>';
		setTimeout("WriteBanner(1)",20000);
	}*/	
}

function menu(a) {
	getobject('html_menu_heads').className = "withline";
	getobject('alle_anzeigen_'+a).className = "hide";
	
	if(a == 1) {
	
		getobject('html_sub_2').className = "hide"; getobject('html_head_2').className = "grey";
		getobject('html_sub_3').className = "hide"; getobject('html_head_3').className = "grey";
		getobject('html_sub_4').className = "hide"; getobject('html_head_4').className = "grey";
		getobject('html_sub_5').className = "hide"; getobject('html_head_5').className = "grey";
		getobject('html_sub_1').className = "show"; getobject('html_head_1').className = "red";
		
	}
	if(a == 2) {
		getobject('html_sub_1').className = "hide"; getobject('html_head_1').className = "grey";
		getobject('html_sub_3').className = "hide"; getobject('html_head_3').className = "grey";
		getobject('html_sub_4').className = "hide"; getobject('html_head_4').className = "grey";
		getobject('html_sub_5').className = "hide"; getobject('html_head_5').className = "grey";
		getobject('html_sub_2').className = "show"; getobject('html_head_2').className = "red";
	}
	if(a == 3) {
		getobject('html_sub_1').className = "hide"; getobject('html_head_1').className = "grey";
		getobject('html_sub_2').className = "hide"; getobject('html_head_2').className = "grey";
		getobject('html_sub_4').className = "hide"; getobject('html_head_4').className = "grey";
		getobject('html_sub_5').className = "hide"; getobject('html_head_5').className = "grey";
		getobject('html_sub_3').className = "show"; getobject('html_head_3').className = "red";
	}
	if(a == 4) {		
		getobject('html_sub_1').className = "hide"; getobject('html_head_1').className = "grey";
		getobject('html_sub_2').className = "hide"; getobject('html_head_2').className = "grey";
		getobject('html_sub_3').className = "hide"; getobject('html_head_3').className = "grey";
		getobject('html_sub_5').className = "hide"; getobject('html_head_5').className = "grey";
		getobject('html_sub_4').className = "show"; getobject('html_head_4').className = "red";
	}
	if(a == 5) {
		getobject('html_sub_1').className = "hide"; getobject('html_head_1').className = "grey";
		getobject('html_sub_2').className = "hide"; getobject('html_head_2').className = "grey";
		getobject('html_sub_3').className = "hide"; getobject('html_head_3').className = "grey";
		getobject('html_sub_4').className = "hide"; getobject('html_head_4').className = "grey";
		getobject('html_sub_5').className = "show"; getobject('html_head_5').className = "red";
	}
		
	
	

}
function sVideo(file) {
	playSWF("image/flash/video_player.swf","flashVideoID","videoFile="+file,"490px","370px","opaque","#ffffff","image/flash/","flashVideo");
}


function swap(imgname,swapimgurl) {
									document.images[imgname].src=swapimgurl;
								}
function swapBoth(imgname,swapimgurl,linkid, linkurl) {
	document.images[imgname].src=swapimgurl;
	document.getElementById(linkid).setAttribute("href", linkurl);
}								
								
function playWinInBg(){
	if (typeof popUp=="undefined" || popUp.closed == true) {
		popUp = window.open('/fileadmin/template/flash/hymne_player.html', 'popUp','toolbar=no,locationbar=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=no,width=10,height=10');
		popUp.focus();
		setTimeout('self.focus()',200);
		//swap('imgHymne','/image/b_fchymne_h.png');
		
	}
	else {
		popUp.close();		
	}

}

function getElement(id) {
	return document.getElementById(id);
}
function ShowElement(element){
	element.style.display="block";
}

function HideElement(element){
	element.style.display="none";
}
function MoveElement(element,x,y) {
	element.style.top=y+"px";
	element.style.left=x+"px";
}

function VisibleHidden(Id,show){	
	if (show==true){
		ShowElement(eval('getElement("'+Id+'")'));
	}
	else {
		HideElement(eval('getElement("'+Id+'")'));
	}	
}

// HTTPS-Check
if (window.location.protocol == 'https:') {
// erlaubte PageIDs
  var myIDs = new Array(503,376,3130,3130);
  var isenabled = false;
  for (var i = 0; i < myIDs.length; ++i) {
    if (location.href.toLowerCase().indexOf("id="+myIDs[i]) > -1) {
      isenabled = true;
    }
  }
  if (isenabled==false) {
    location.href = location.href.replace('https:','http:');
  }
}


//-->