/** Gewinnspiel **/
function test_form(formularname) {
	var checked 		= false;
	var send 			= true;
	var errormsg 		= "";
	var checkfieldarray = new Array("vorname", "nachname", "strasse", "plz", "ort", "email");
	try {
		for (i=0; i<document.forms[formularname].loesung.length; i++) {
			if (document.forms[formularname].loesung[i].checked) {
				checked = true;
			}
		}
		if (!checked) {
			errormsg = "Bitte geben Sie eine Lösung an\n";
		}
		for(var n=0; n<checkfieldarray.length; n++) {
			if(document.forms[formularname].elements[checkfieldarray[n]].value == "") {
				errormsg += "Bitte füllen Sie das Feld " + checkfieldarray[n].toUpperCase() + " aus\n";
			}
		}
		if(errormsg != "") {
			send = false;
			alert(errormsg);
		}
		else if(send == true) {
			document.forms['gewinnspiel'].submit();
		}
	}
	catch(e) {}
}
/** Gewinnspiel **/

/*************************/
/*      ANFANG UHRZEIT   */ 
/*************************/
//window.setTimeout("Zeitanzeige()",1000);
Wochentagname = new Array("Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag");

function Zeitanzeige() {
    try {
    	var Jetzt           = new Date(); 
        var Tag             = Jetzt.getDate();
    	var Monat           = Jetzt.getMonth() + 1; var Jahr = Jetzt.getYear();
        var timer_clock     = null;
    	if (Jahr < 999) Jahr += 1900;
    	Jahr -= 2000;
    
    	var Stunden = Jetzt.getHours(); var Minuten = Jetzt.getMinutes();
    	var Sekunden = Jetzt.getSeconds(); var WoTag = Jetzt.getDay();
    	var Vortag  = ((Tag < 10) ? "0" : "");
    	var Vormon  = ((Monat < 10) ? ".0" : ".");
    	var Vorstd  = ((Stunden < 10) ? "0" : "");
    	var Vormin  = ((Minuten < 10) ? ":0" : ":");
    	var Vorsek  = ((Sekunden < 10) ? ":0" : ":");
    	var Datum = Vortag + Tag + Vormon + Monat  + "." + Jahr;
    	var Uhrzeit = Vorstd + Stunden + Vormin + Minuten + Vorsek + Sekunden;
    	var Gesamt = Wochentagname[WoTag] + ",&nbsp;" + Datum + ",&nbsp;" + Uhrzeit;
    	if(document.getElementById) {
    	   if(document.getElementById('live_ticker_header_uhrzeit')) {
            	document.getElementById('live_ticker_header_uhrzeit').innerHTML = Gesamt;   
           }
           else {
                if(timer_clock != null) {
                    clearTimer(timer_clock);
                }
    	        timer_clock = window.setTimeout("Zeitanzeige()", 3000);
           }
    	
    	} else if(document.all) {
    		document.all.live_ticker_header_uhrzeit.innerHTML = Gesamt;
    	}
    	window.setTimeout("Zeitanzeige()", 1000);
    }
    catch(e) {
    //
    }
}
/*************************/
/*      ENDE UHRZEIT     */ 
/*************************/



//<!-- Begin
var initialsubj	= "Hallo, hier eine interessante Seite bei Sportal.ch";
var initialmsg	= "Schau Dir mal diese Seite an: "+window.location;

var good;

var initSetPos = false;

function get_article_liveid() {
	var id	= 0;
	try {
		var url 		= window.location.href;
		var temp_array 	= url.split('/');
		var temp_array2 = temp_array[temp_array.length-1].split('.');
		if(typeof temp_array2[0] != "undefined") {
			id 				= temp_array2[0];
		}
	}
	catch(e) {
//		alert( e.toString() );
	}
	return id;
}

var article_liveid  = get_article_liveid();

function checkEmailAddress(field) {
	try {
		var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\.info)|(\.sex)|(\.biz)|(\.aero)|(\.coop)|(\.museum)|(\.name)|(\.pro)|(\..{2,2}))$)\b/gi);
		if (goodEmail) {
			good = true;
		}
		else {
			alert('Bitte eine Email Adresse eingeben');
			field.focus();
			field.select();
			good = false;
		}
   }
   catch(e) {}
}

u = window.location;

function mailThisUrl() {
	good = false;
	checkEmailAddress(document.eMailer.email);
	if (good) {
		//window.location = "mailto:"+document.eMailer.email.value+"?subject="+initialsubj+"&body="+document.title+" "+u;
		window.location = "mailto:"+document.eMailer.email.value+"?subject="+initialsubj+"&body="+initialmsg;
   }
}
//  End -->

//ecards
function open_ecard(id) {
	//http://www.sportal.de
	ecardsWindow = window.open("/sportal/service/ecards/ecard.php?" + id, "ECards", "width=660, height=640, top=50,left=50,scrollbars=no,resizable=no");
}
	
//<!-- Tell a friend -->
function win_tellafriend1() {
	var url=window.location;
	//http://www.sportal.de
	tellafriendWindow=window.open("/scripts/tellafriend_sportch/tellafriend.php?url="+url, "win_tellafriend","height=400,width=420,left=350,top=155,scrollbars=no,resizable=no");    
}    

//<!-- Textgroesse anfang -->
var faktor = 0.15; 			
var start_groesse = 0.75; 		
var anz = 0; 					
function fontsizer(inc, reset) {
	if ((anz + inc >= 0) && (anz + inc <= 2)) {
		anz += inc;
		neue_groesse = anz * faktor + start_groesse;
		artikel_text = document.getElementById('content_artikel');
		artikel_text.style.fontSize = neue_groesse + "em";
	}
	switch (anz) {
		case 0:
			document.getElementById("fsminus").src = "/sportch/images/icons/schrift_minus_inaktiv.gif";
			break;
		case 2:
			document.getElementById("fsplus").src = "/sportch/images/icons/schrift_plus_inaktiv.gif";
			break;
		default:	
			document.getElementById("fsplus").src = "/sportch/images/icons/schrift_plus.gif";
			document.getElementById("fsminus").src = "/sportch/images/icons/schrift_minus.gif";
			break;					
	}
}
//<!-- Textgroesse ende -->

//<!-- Kontaktformular anfang -->
function open_kontakt() {
	kontaktWindow = window.open("/de/sportch/service/kontakt/kontakt.php?", "poppage", "width=440,height=590,top=155,left=350,scrollbars=no,resizable=no");
}
//<!-- Kontaktformular ende -->

//<!-- VideoPlayerPopup anfang -->
function open_video() {
	kontaktWindow = window.open("http://sportal.nunet.de/videonews/sportal-player.html", "poppage", "width=748,height=555,top=155,left=350,scrollbars=no,resizable=no");
}

function open_nl_help() {
	kontaktWindow = window.open("http://www.sport.ch/sportch/service/newsletter/outlook.htm", "poppage", "width=300,height=325,top=10,left=10,scrollbars=no,resizable=no");
}

//<!-- VideoPlayerPopup ende -->

//<!-- VideoPlayer anfang -->
function openNewWindow2(url, name, y, x) {
	try {
		window.open(url, name, "width="+x+", height="+y+", toolbar=no, scrollbars=no");
	}
	catch(e) {
		alert( e.toString() );
	}
}
//<!-- VideoPlayer ende -->
function gallery_popup(url) {
	openNewWindow2(url, 'Galerie','595','720');
}
/** i.P. allgemeine Funktionen */
/** Bildergalerie start */ 
function trim_text(text, strlimit, wordlimit) { 
	if(text.length > strlimit) {
		textA		= text.split(" ");
		text_short	= "";
		for(w=0; w<wordlimit; w++) {
			text_short 	+= textA[w] + " "; 
		}
		text_short 	+= " ...";
	}
	else text_short = text;
	return text_short;
}

function change_div(div_id, content) {
	if(document.getElementById && document.getElementById(div_id)) {
		document.getElementById(div_id).innerHTML = content;
	} else if(document.all && document.all[div_id]) {
		document.all[div_id].innerHTML = content;
	}
}

function in_array(value, array_name) {
	found = false;
	for(n=0; n<array_name.length; n++) {
		if(array_name[n] == value) {
			found = true;
			break;
		}
	}
	return found;
}

function change_class(divname, class_name) {
	try {
		if(document.getElementById(divname)) {
			document.getElementById(divname).className = class_name;
		}
	}
	catch(e) {
	//	show_error(e + ": " + divname);
	}
}

function dummy() {
	//return;
}
/** Bildergalerie end */ 


/** MC - POPUP Start **/
function open_mc(url) {
	// NEU: Neuen Fensternamen für jedes MC!
	var omc_wname = Math.floor(Math.random()*1000000000000);
	var default_window_height = 790;
	var default_window_width = 840;
	var default_scrollbars = "no";
	
	var screen_height = screen.height;
	if (isNaN(screen_height)) {
		screen_height = 768;		
	}
	var max_window_height = Math.floor(screen_height-50);
	var window_height = 830;		//default
	var window_width = 1000;		//
	if (url.indexOf("olympia") > 0) {
		window_height = 825;
		window_width = 1000;
		if (url.indexOf("fussball") > 0 || url.indexOf("tennis") > 0) {
			window_height = 825;
		}
		else if (url.indexOf("basketball") > 0 || url.indexOf("handball") > 0) {
			window_height = 835;
		}
		else if (url.indexOf("radsport") > 0) {
			window_height = 915;
		}
	}
	/*
	if ((url.indexOf("tennis") > 0) || (url.indexOf("radsport") > 0)) {
		var window_height = 735;
		var window_width = default_window_width;
	} else {
		if ((url.indexOf("fussball") > 0) && (url.indexOf("bundesliga") > 0)) {
			// Bundesliga: Wallpaper: Größeres Fenster
			var window_height = 830;
			var window_width = 1000;
		} else {
			// Default
			var window_height = 790;
			var window_width = default_window_width;
		}
	}
	*/
	if (window_height > max_window_height) {
		window_height = max_window_height;
		default_scrollbars = "yes";
		window_width = Math.floor(window_width+20);
	}
	window.open(url, omc_wname, "width=" +(window_width)+ ",height=" +(window_height)+ ",top=50,left=50,scrollbars=" +(default_scrollbars)+ ",resizable=no");
}
/** MC - POPUP End**/

/** MC - POPUP Start **/
function open_mc_count(url) {
	// NEU: Neuen Fensternamen für jedes MC!
	var omc_wname = Math.floor(Math.random()*1000000000000);
	var default_window_height = 790;
	var default_window_width = 840;
	var default_scrollbars = "no";
	
	var screen_height = screen.height;
	if (isNaN(screen_height)) {
		screen_height = 768;		
	}
	var max_window_height = Math.floor(screen_height-50);
	var window_height = 830;		//default
	var window_width = 1000;		//
	if (url.indexOf("olympia") > 0) {
		window_height = 825;
		window_width = 1000;
		if (url.indexOf("fussball") > 0 || url.indexOf("tennis") > 0) {
			window_height = 825;
		}
		else if (url.indexOf("basketball") > 0 || url.indexOf("handball") > 0) {
			window_height = 835;
		}
		else if (url.indexOf("radsport") > 0) {
			window_height = 915;
		}
	}
	/*
	if ((url.indexOf("tennis") > 0) || (url.indexOf("radsport") > 0)) {
		var window_height = 735;
		var window_width = default_window_width;
	} else {
		if ((url.indexOf("fussball") > 0) && (url.indexOf("bundesliga") > 0)) {
			// Bundesliga: Wallpaper: Größeres Fenster
			var window_height = 830;
			var window_width = 1000;
		} else {
			// Default
			var window_height = 790;
			var window_width = default_window_width;
		}
	}
	*/
	if (window_height > max_window_height) {
		window_height = max_window_height;
		default_scrollbars = "yes";
		window_width = Math.floor(window_width+20);
	}
	
	updateScrollerZp_onclick();
	window.open(url, omc_wname, "width=" +(window_width)+ ",height=" +(window_height)+ ",top=50,left=50,scrollbars=" +(default_scrollbars)+ ",resizable=no");
}
/** MC - POPUP End**/

function updateScrollerZp_onclick() {
    if(document.getElementById("scroller_zp")) {
        document.getElementById("scroller_zp").src = "/de/includes/nav/netrating/netrating_scroller.htm";
    }
}

function makeHomepage() { /* Variablen */ 
	var homepage_url 	= "http://www.sport.ch"; 
	var browser 		= navigator.appName; 
	var version 		= navigator.appVersion.substring(0,1); 
	if ((browser=='Netscape') && (version >= 4 && version < 5)) { 
		window.onerror=java_error; 
		netscape.security.PrivilegeManager.enablePrivilege('UniversalPreferencesWrite');
		navigator.preference('signed.applets.codebase_principal_support', true);
		navigator.preference('browser.startup.homepage', homepage_url); 
		alert('Herzlichen Gl&uuml;ckwunsch, ' + homepage_url + ' ist nun Ihre Startseite.'); 
	} 
	else if ((browser=='Microsoft Internet Explorer') && (version >= 4)) { 
		/* MSIE 4.x, 5.x Version */ 
		document.body.style.behavior='url(#default#homepage)'; 
		document.body.setHomePage(homepage_url); 
	} 
	else { 
		/* Manuelle Einstellung noetig */ 
		alert('Bitte stellen Sie Ihre Startseite manuell ein.'); 
	} 
} 

/** SKIONLINE - POPUP Start **/
function open_skionline(url) {
	// NEU: Neuen Fensternamen für jedes MC!
	var omc_wname = Math.floor(Math.random()*1000000000000);
	var default_window_height = 630;
	var default_window_width = 870;
	var default_scrollbars = "yes";
	
	var screen_height = screen.height;
	if (isNaN(screen_height)) {
		screen_height = 768;		
	}
	window.open(url, omc_wname, "width=" +(default_window_width)+ ",height=" +(default_window_height)+ ",top=170,left=150,scrollbars=" +(default_scrollbars)+ ",resizable=no");
}
/** SKIONLINE - POPUP End**/

function addNet(url,titel){if((typeof window.sidebar=="object") && (typeof window.sidebar.addPanel=="function")){window.sidebar.addPanel(titel,url,"");}else{alert("Sie nutzen eine veraltete Netscape Version!\nLesezeichen hinzufügen ist nicht möglich!");}}

function lesezeichen(){
    var url = window.location.href, t = document.title, ap = navigator.appName;
    if(ap=="Microsoft Internet Explorer") {
        window.external.AddFavorite(url,t);
    } else {
        if(ap=="Netscape"){
            addNet(url,t);
        } else { 
            alert("Mit ihrem Browser ist kein Lesezeichen über Javascript möglich.\nBitte legen Sie das Lesezeichen manuell an.\nURL:"+url);
        };
    }
};

/** *************** Scripte für die Top-Navigation (mit Klappmenues; Menüpunkte kommen aus einer eigenen BERND-Maske!) ******* */
function showSpecialLinks(showSpecialLinks) {
    try {
        if(showSpecialLinks != "") {
            
        }
    }
    catch(e) {
        alert_error('showSpecialLinks: '+e);
    }
}
function display_submenu(id) {

    try {         
        if(main_menu_selected == id) { 
            return; //aktives Menue nicht ausklappen
        }
        clear_timer(timer_sub);
        document.getElementById(id).style.display = "block";  
        mark_mainmenu(id);
        if(id != main_menu_selected_temp) {
            hide_submenu(main_menu_selected_temp);                                                  //voriges Submenue deaktivieren
        }
        main_menu_selected_temp = id;
    }
    catch(e) {
        alert_error(('display_submenu: '+e+', id = '+id));
    }
}

function hide_submenu(id) {
    try {
        if(id != main_menu_selected) {
            document.getElementById("main_menu_"+id).className          = "bg_main_menu";
            document.getElementById("main_menu_"+id+"_left").className  = "bg_main_menu_left";
            document.getElementById("main_menu_"+id+"_right").className = "bg_main_menu_right";
        }
        if(document.getElementById(id)) {
            document.getElementById(id).style.display = "none"; /* Subnavi verbergen (immer beimouseout)*/
        }
    }
    catch(e) {
        alert_error('hide_submenu: '+e+', id = '+id);
    }
}

function mark_mainmenu(id) {
//    var topnavi = getCookie("tn1");
//    id = topnavi;
    try {
        if(main_menu_selected != "" && main_menu_selected != null) { // Navipunkt aus der "normalen" Top-Navi wurde gewählt-> Specials und Themes verstecken  
            if(document.getElementById("special_and_theme_links")) {
                document.getElementById("special_and_theme_links").className = "menu_special_hidden";
            }
            if(document.getElementById("subnavi_main")) {
                document.getElementById("subnavi_main").className            = "subnavi_main_divActive";
            }
        }
        else {                          // Specials und Themes anzeigen
            if(document.getElementById("special_and_theme_links")) {
                document.getElementById("special_and_theme_links").className = "menu_special";
            }
            if(document.getElementById("subnavi_main")) {
                document.getElementById("subnavi_main").className            = "subnavi_main_InActive";
            }
        }
        if(document.getElementById("main_menu_"+id)) {  //Hauptmenuepunkte ("normale" Topnavi) anzeigen
            var class_add = "_round"; 

            document.getElementById("main_menu_"+id).className          = "bg_main_menu_active";
            document.getElementById("main_menu_"+id+"_left").className  = "bg_main_menu_left_active"+class_add;
            document.getElementById("main_menu_"+id+"_right").className = "bg_main_menu_right_active";
        }
    }
    catch(e) {
        alert_error('mark_mainmenu: '+e);
    }
}

/** unused */
function markTopmenueByCookie() {
    try {
        var topnavi = getCookie("tn1");
        if(topnavi != null) {
            var id = topnavi;
 //           alert(id);
            mark_mainmenu(id);
            display_submenu(id);
        }
    }
    catch(e) {
        alert_error("markTopmenueByCookie: "+e);    
    }
}

function clear_timer(timer) {
    if(typeof(timer) == "number") {
        clearTimeout(timer);
    }
}

function waitTime(id) {
	timer_sub = window.setTimeout("hide_submenu('"+id+"')",1000);
}

/* mouseover über die Klappmenuepunkte */
function highlite_subrow(id) {
    try {
        clear_timer(timer_sub);
        var class_name = 'submenu_div_sub_active';
        document.getElementById(id).className = class_name;
        document.getElementById('subnavsub_'+id).className = class_name+'_link';
        var main_id = id.substring(0, id.indexOf("_"));
    }
    catch(e) {
        alert_error(e);
    }
}
function delite_subrow(id) {
    try {
        var class_name = 'submenu_div_sub';
        document.getElementById(id).className = class_name;
        document.getElementById('subnavsub_'+id).className = class_name+'_link';
        var main_id = id.substring(0, id.indexOf("_"));
    }
    catch(e) {
        alert_error(e);
    }
}

/* die horizontale Subnavileiste einfärben: dunkel bei mouseover über das Klappmenue */
function subnaviSelected() {
    document.getElementById("subnavi_main").className               = "subnavi_main_divActive";
    document.getElementById("special_and_theme_links").className    = "menu_special_hidden";
}
function subnaviNonSelected() {
    document.getElementById("subnavi_main").className               = "subnavi_main_divInActive";
    document.getElementById("special_and_theme_links").className    = "menu_special";
}
/** **************************** */

/** Positionieren */
function setPosBySky()  {
	var browser 		= navigator.appName.indexOf("Microsoft Internet Explorer") != -1 ? 'MSIE' : 'FF'; 
    var browserVersion	= navigator.appVersion;
    
    try {
        if(initSetPos == false) {
            if( document.getElementById("adtag_banner_sky_wallpaper") ) {
                setPosBySkyWallpaper();
            }
            else {
                var paddingX        = 6;
                var paddingY        = 8;
                var korrX           = -32; //unsichtbarer Rand rechts des mainframes
                var sky             = document.getElementById("adtag_banner_sky");
                var mainframe       = document.getElementById("mainframe");
                mainframeWidth      = mainframe.scrollWidth;
                if(sky) {
                    if(browser == 'MSIE') {
                        skyWidth = sky.scrollWidth;//-getX(sky);
                    }
                    else {
                        skyWidth = sky.scrollWidth;
                    }
                    if(skyWidth > 2) {
                        mainframe.style.width = mainframeWidth+Math.ceil(skyWidth/2)+2*korrX+"px";
                    }
                    
                    skyX                = getX(mainframe)+960+paddingX;
                    skyY                = getY(mainframe)+paddingY;
                    sky.style.left      = skyX+"px";
                    if(browser == 'MSIE') { 
                        skyY += 1;
                    }
                    sky.style.top       = skyY+"px";
                    sky.style.display   = "block";
                }
            }
            initSetPos = true;
        }
    }
    catch(e) {
        alert_error("setPosBySky: "+e);
    }
}

function setPosBySkyWallpaper()  {
    try {
        var browser 		= navigator.appName.indexOf("Microsoft Internet Explorer") != -1 ? 'MSIE' : 'FF';
        var paddingX        = 6;
        var paddingY        = 8;
        var korrX           = -32; //unsichtbarer Rand rechts des mainframes
        
        var sky             = document.getElementById("adtag_banner_sky_wallpaper");
        var leaderboard     = document.getElementById("adtag_banner_leaderboard");
        var mainframe       = document.getElementById("mainframe");

        leaderboardWidth    = leaderboard.scrollWidth;
        mainframeWidth      = mainframe.scrollWidth;
  
        if(sky) {
            if(browser == 'MSIE') {
                skyWidth = sky.scrollWidth;
            }
            else {
                skyWidth = sky.scrollWidth;
            }
            if(skyWidth > 2) { //sky wird angezeigt
                mainframe.style.width = mainframeWidth+Math.ceil(skyWidth/2)+2*korrX+"px";
//                alert(mainframe.style.width);
            }
            skyX                = getX(mainframe)+960+paddingX;
            sky.style.left      = skyX+"px";
            
            leaderboardX            = getX(sky)-leaderboardWidth;
            leaderboard.style.left  = leaderboardX+"px";
            if(document.body.scrollWidth <  mainframeWidth) {
                          
            }
            sky.style.display           = "block";
        }
    }

    catch(e) {
        alert_error("setPosBySkyWallpaper: "+e);
    }  
}
/** */

/** Hilfsfunktionen*/
function getX(el) {
    try {
        x = el.offsetLeft;
        if (!el.offsetParent) return x;
        else return (x+getX(el.offsetParent));
    }
    catch(e) {
        alert_error("getX: "+e);
    }
}

function getY(el) {
    try {
        y = el.offsetTop;
        if (!el.offsetParent) return y;
        else return (y+getY(el.offsetParent));
    }
    catch(e) {
        alert_error("getY: "+e);
    }
}

function alert_error(e) {
    if(location.href.indexOf(".hamsta") != -1) {
        alert(e);   //DEBUG
    }
}
/** */

/** ************************* bookmark.js ********************* */

function sbDo(was) {
	sburl=encodeURIComponent(location.href);
	sbtitle=encodeURIComponent(document.title);
	switch(was) {		
		case 'delicious':
			window.open('http://del.icio.us/post?url='+sburl+'&title='+sbtitle);
			break;
		case 'wong':
			window.open('http://www.mister-wong.de/index.php?action=addurl&bm_url='+sburl+'&bm_description='+sbtitle);
			break;
		case 'blinkList':
			window.open('http://www.blinklist.com/index.php?Action=Blink/addblink.php&Description=&Url='+sburl+'&Title='+sbtitle);
			break;
		case 'yahoo':
			window.open('http://myweb2.search.yahoo.com/myresults/bookmarklet?u='+sburl+'&t='+sbtitle);
			break;
		case 'yigg':
			window.open('http://yigg.de/neu?exturl='+sburl+'&exttitle='+sbtitle);
			break;	
		case 'furl':
			window.open('http://www.furl.net/storeIt.jsp?u='+sburl+'&t='+sbtitle);
			break;
		case 'oneview':
			window.open('http://beta.oneview.de:80/quickadd/neu/addBookmark.jsf?URL='+sburl+'&title='+sbtitle);			
			break;
		case 'folkd':
			window.open('http://www.folkd.com/submit/page/'+sburl);
			break;
		case 'linkarena':	
			window.open('http://linkarena.com/bookmarks/addlink/?url='+sburl+'&title='+sbtitle+'&desc=&tags=');
			break;
		case 'google': 		
			window.open('http://www.google.com/bookmarks/mark?op=add&hl=de&bkmk='+sburl+'&title='+sbtitle);
			break;
		case 'webnews': 		
			window.open('http://www.webnews.de/einstellen?url='+sburl+'&title='+sbtitle);
			break;
	}
	return false;
}

function sbOver(text) {
	if (text == '') {
		text = '...';
	} else {
		text='&nbsp;<strong>'+text+'</strong>';
	}
	document.getElementById('sbText').innerHTML=text;
}

function IconsOver(text) {
	document.getElementById('IconsText').innerHTML	= text;
}
/** ********************* END bookmark.js ********************* */

/** ******************** hier alle init-Scripte rein (Aufruf auch bei resize)*********** */
function init() {
    if(initSetPos == false) {
        setPosBySky();
        setBgByAd();
        setPosOnResize(0);
    }
    initSetPos = true;
    Zeitanzeige();
}   

/** hier alle Resize-Scripte rein */
function resize() {
    initSetPos = false; //wird sonst beim resize nicht auf Anfangszustand gesetzt
    setPosBySky();
    setPosOnResize(0);  
}

function setPosOnResize(korrX) {
    try {
        for(var n=0; n<main_array.length; n++) {
            divX    = getX( document.getElementById("main_menu_"+main_array[n]+"_left") );
            document.getElementById(main_array[n]).style.left = (divX+korrX)+"px";
        }
    }
    catch(e) {
        alert_error("setPos: "+e);
    }
}

 function setPos(korrX) {
    try {
        for(n=0; n<main_array.length; n++) {
            divX    = getX( document.getElementById("main_menu_"+main_array[n]+"_left") );
            document.getElementById(main_array[n]).style.left = (divX+korrX)+"px";
        }
    }
    catch(e) {
        alert_error("setPos: "+e);
    }
}

function setBgByAd() {
    try {
        var leaderboard       = document.getElementById("adtag_banner_leaderboard");
        if(leaderboard && leaderboard.scrollHeight >= 90) {
            document.getElementsByTagName("body")[0].className = "body_with_leaderboard";
        }
        var leaderboard_home       = document.getElementById("adtag_banner_leaderboard_home");
        if(leaderboard_home && leaderboard_home.scrollHeight >= 90) {
            var outer_leaderboard_home = document.getElementById("outer_leaderboard_home"); 
            document.getElementsByTagName("body")[0].className  = "body_with_leaderboard";
            outer_leaderboard_home.className                    = "outer_leaderboard_aktiv";
        }
     }
    catch(e) {
        alert_error("setBgByAd: "+e);
    }
}

function jumpTo(link) {
    self.location.href = link;
}
/** unused */
function setCookieTopnavi(name, value) {
    try {
        if(navigator.cookieEnabled) {
    		document.cookie = name + '=' + escape(value) + ''; 
        }
    }
    catch(e) {
        alert_error("setCookie: "+e);
    }
}
function getCookie(name) { 
	var mein_cookie = document.cookie;
	if (mein_cookie.indexOf(name) == -1) { 
		return null;
	}
	var anfang	= mein_cookie.indexOf(name)+name.length + 1;
	var ende 	= mein_cookie.indexOf(";", anfang);
	if (ende == -1) { 
		ende = mein_cookie.length; 
	} 
	var laenge	= ende - anfang;
	var cookie_wert = unescape( mein_cookie.substr(anfang, laenge) );
	return cookie_wert;
} 
/* ************************************************************* */

/** **************************** TNT-Modul **************************** */
function show_topnews(value) {
    if(document.getElementById("topnews_top_selected_"+value)) {
        if(value=='a') {
            document.getElementById("topnews_top_selected_b").style.display     =   "none";
            document.getElementById("content_topnews_selected_b").style.display =   "none";
            document.getElementById("topnews_top_selected_a").style.display     =   "block";
            document.getElementById("content_topnews_selected_a").style.display =   "block";
        } else {
            document.getElementById("topnews_top_selected_a").style.display     =   "none";
            document.getElementById("content_topnews_selected_a").style.display =   "none";
            document.getElementById("topnews_top_selected_b").style.display     =   "block";
            document.getElementById("content_topnews_selected_b").style.display =   "block";
        }
    }
}
/** Clickzählung TNT-Modul*/
function countclick_tnt_wrapper(id) {
    try {
        if(document.getElementById("netrating_tnt_wrapper_iframe")) {
           document.getElementById("netrating_tnt_wrapper_iframe").src = "/de/includes/nav/netrating/netrating_tnt_wrapper.htm";
        }
    }
    catch(e) {
    
    }
}
/* ************************************************************* */

/**
 * SWFObject v1.4.2: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
 *   legal reasons.
 
 * try-catch added by wschleiwies 20100128
 
 */
try {
 
if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){
if(!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";
this.addParam("quality",q);
this.setAttribute("useExpressInstall",_7);
this.setAttribute("doExpressInstall",false);
var _d=(_9)?_9:window.location;
this.setAttribute("xiRedirectUrl",_d);
this.setAttribute("redirectUrl","");
if(_a){this.setAttribute("redirectUrl",_a);}};
deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
this.attributes[_e]=_f;
},getAttribute:function(_10){
return this.attributes[_10];
},addParam:function(_11,_12){
this.params[_11]=_12;
},getParams:function(){
return this.params;
},addVariable:function(_13,_14){
this.variables[_13]=_14;
},getVariable:function(_15){
return this.variables[_15];
},getVariables:function(){
return this.variables;
},getVariablePairs:function(){
var _16=new Array();
var key;
var _18=this.getVariables();
for(key in _18){_16.push(key+"="+_18[key]);}
return _16;
},getSWFHTML:function(){
var _19="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var _1a=this.getParams();
for(var key in _1a){_19+=key+"=\""+_1a[key]+"\" ";}
var _1c=this.getVariablePairs().join("&");
if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}
_19+="/>";
}else{if(this.getAttribute("doExpressInstall")){
this.addVariable("MMplayerType","ActiveX");}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
var _1d=this.getParams();
for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
var _1f=this.getVariablePairs().join("&");
if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}
_19+="</object>";}
return _19;
},write:function(_20){
if(this.getAttribute("useExpressInstall")){
var _21=new deconcept.PlayerVersion([6,0,65]);
if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
this.setAttribute("doExpressInstall",true);
this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
document.title=document.title.slice(0,47)+" - Flash Player Installation";
this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
var n=(typeof _20=="string")?document.getElementById(_20):_20;
n.innerHTML=this.getSWFHTML();
return true;
}else{
if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
return false;}};
deconcept.SWFObjectUtil.getPlayerVersion=function(){
var _23=new deconcept.PlayerVersion([0,0,0]);
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
}else{
try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}
catch(e){try{
var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
_23=new deconcept.PlayerVersion([6,0,21]);
axo.AllowScriptAccess="always";}
catch(e){
if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}
catch(e){}}
if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}
return _23;};
deconcept.PlayerVersion=function(_27){
this.major=_27[0]!=null?parseInt(_27[0]):0;
this.minor=_27[1]!=null?parseInt(_27[1]):0;
this.rev=_27[2]!=null?parseInt(_27[2]):0;
};
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}
if(this.minor<fv.minor){return false;}
if(this.minor>fv.minor){return true;}
if(this.rev<fv.rev){return false;}
return true;
};
deconcept.util={getRequestParameter:function(_29){
var q=document.location.search||document.location.hash;
if(q){
var _2b=q.substring(1).split("&");
for(var i=0;i<_2b.length;i++){
if(_2b[i].substring(0,_2b[i].indexOf("="))==_29){
return _2b[i].substring((_2b[i].indexOf("=")+1));}}}
return "";}};
deconcept.SWFObjectUtil.cleanupSWFs=function(){
var _2d=document.getElementsByTagName("OBJECT");
for(var i=0;i<_2d.length;i++) {
	_2d[i].style.display="none";
	try {
		for(var x in _2d[i]){
			if(typeof _2d[i][x]=="function"){
				_2d[i][x]=null;
			}
		}
	
	}
	catch (e) {
	//	alert(e);
	}
}
};

if(typeof window.onunload=="function"){
var oldunload=window.onunload;
window.onunload=function(){
deconcept.SWFObjectUtil.cleanupSWFs();
oldunload();};
}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}
if(Array.prototype.push==null){
Array.prototype.push=function(_30){
this[this.length]=_30;
return this.length;};}

var getQueryParamValue=deconcept.util.getRequestParameter;
var FlashObject=deconcept.SWFObject; // for legacy support
var SWFObject=deconcept.SWFObject;

}
catch(e) {
    alert_error(e);
}
/** ********************* END swfobjects.js ********************* */
