var news_uid_1 = 905;
var news_uid_2 = 904;
var news_uid_3 = 903;
var user_uid = 1;
var slides= new Array('home_topnews_item'+news_uid_1, 'home_topnews_item'+news_uid_2, 'home_topnews_item'+news_uid_3);
var i = 0;
var intv;
function SlideShow() {
Effect.Fade(slides[i], { duration:1, from:1.0, to:0.0 });
i++;
if (i == 3) i = 0;
refreshToolbar(i);
Effect.Appear(slides[i], { duration:1, from:0.0, to:1.0 });
}
function start_slideshow() { intv = setInterval('SlideShow()',5000); }
function writeUMContainer () {
document.getElementById("umContainer").innerHTML = 'Willkommen philipp,
';
}
function checkLogin(inputField) {
if(inputField.value == "Username" | inputField.value == "password")
inputField.value = "";
}
function showFirstBox() {
if(document.getElementById('usermenue') != null) {
document.getElementById('usermenue').style.display = 'block';
}
else {
document.getElementById('quicklinks').style.display = 'block';
document.getElementById("quicklinks_link").style.backgroundImage = "url(fileadmin/layout/img/topbg_over.gif)";
}
}
function manageBoxes(shown_object) {
document.getElementById('quicklinks').style.display = 'none';
document.getElementById('specials').style.display = 'none';
document.getElementById('poll').style.display = 'none';
document.getElementById('faq').style.display = 'none';
if(document.getElementById('usermenue') != null)
document.getElementById('usermenue').style.display = 'none';
document.getElementById("quicklinks_link").style.backgroundImage = "url(fileadmin/layout/img/topbg.gif)";
document.getElementById("specials_link").style.backgroundImage = "url(fileadmin/layout/img/topbg.gif)";
document.getElementById("poll_link").style.backgroundImage = "url(fileadmin/layout/img/topbg.gif)";
document.getElementById("faq_link").style.backgroundImage = "url(fileadmin/layout/img/topbg.gif)";
document.getElementById(shown_object).style.display = 'block';
if(shown_object != "usermenue")
document.getElementById(shown_object+"_link").style.backgroundImage = "url(fileadmin/layout/img/topbg_over.gif)";
}
function writeToolbar() {
document.getElementById('toolbar').innerHTML = '
TOP-THEMEN
1
2
3
';
}
function showNewsId(uid) {
document.getElementById('home_topnews_item'+news_uid_1).style.display = 'none';
document.getElementById('home_topnews_item'+news_uid_2).style.display = 'none';
document.getElementById('home_topnews_item'+news_uid_3).style.display = 'none';
document.getElementById('toolbar_icon'+news_uid_1).style.backgroundImage = "url(fileadmin/img/topnews/topnews_bg.gif)";
document.getElementById('toolbar_icon'+news_uid_2).style.backgroundImage = "url(fileadmin/img/topnews/topnews_bg.gif)";
document.getElementById('toolbar_icon'+news_uid_3).style.backgroundImage = "url(fileadmin/img/topnews/topnews_bg.gif)";
document.getElementById('toolbar_icon'+uid).style.backgroundImage = "url(fileadmin/img/topnews/topnews_bg_over.gif)";
document.getElementById('home_topnews_item'+uid).style.display = 'block';
}
function refreshToolbar(activeIcon) {
if(activeIcon == 0) uid = news_uid_1;
if(activeIcon == 1) uid = news_uid_2;
if(activeIcon == 2) uid = news_uid_3;
document.getElementById('toolbar_icon'+news_uid_1).style.backgroundImage = "url(fileadmin/img/topnews/topnews_bg.gif)";
document.getElementById('toolbar_icon'+news_uid_2).style.backgroundImage = "url(fileadmin/img/topnews/topnews_bg.gif)";
document.getElementById('toolbar_icon'+news_uid_3).style.backgroundImage = "url(fileadmin/img/topnews/topnews_bg.gif)";
document.getElementById('toolbar_icon'+uid).style.backgroundImage = "url(fileadmin/img/topnews/topnews_bg_over.gif)";
}
function getElementsByClassName (type,name) {
var returner = new Array();
var obj=document.getElementsByTagName(type);
for(i=0;i < obj.length;i++) {
if(obj[i].className==name) {
returner.push(obj[i]);
}
}
return returner;
}
function checkPicDesc() {
var img = getElementsByClassName("img","news-single-image");
var imgcaptions = getElementsByClassName("div","news-single-imgcaption");
for(i=0;i< imgcaptions.length;i++) {
if(imgcaptions[i].innerHTML!="" && imgcaptions[i].innerHTML!="no_img") {
imgcaptions[i].style.display = 'block';
imgcaptions[i].style.width = (img[i].width+2)+'px';
}
if(imgcaptions[i].innerHTML=="no_img") {
img[i].style.display = 'none';
}
}
}
function addParam(param) {
if(document.location.href.indexOf('?') > -1)
document.location.href = document.location.href + '&' + param;
else
document.location.href = document.location.href + '?' + param;
}
function loadURLTODiv (url, div, evalJSCode) {
var req = null;
try{
req = new XMLHttpRequest();
}
catch (ms){
try{
req = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (nonms){
try{
req = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (failed){
req = null;
}
}
}
if (req == null)
alert("Error creating request object!");
//anfrage erstellen (GET, url ist localhost,
//request ist asynchron
req.open("GET", url, true);
//Beim abschliessen des request wird diese Funktion ausgeführt
req.onreadystatechange = function(){
switch(req.readyState) {
case 4:
if(req.status!=200) {
alert("Fehler:"+req.status);
}else{
if(evalJSCode)
document.getElementById(div).innerHTML = eval(req.responseText);
else
document.getElementById(div).innerHTML = req.responseText;
}
break;
default:
return false;
break;
}
};
req.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded");
req.send(null);
}
var actual_game = 0;
function disable() {
if(document.getElementById('cfc-league-termine-0') != null)
document.getElementById('cfc-league-termine-0').style.display = 'none';
if(document.getElementById('cfc-league-termine-1') != null)
document.getElementById('cfc-league-termine-1').style.display = 'none';
if(document.getElementById('cfc-league-termine-2') != null)
document.getElementById('cfc-league-termine-2').style.display = 'none';
if(document.getElementById('cfc-league-termine-3') != null)
document.getElementById('cfc-league-termine-3').style.display = 'none';
}
function prev_termine() {
if(actual_game>=1)
actual_game -= 1;
disable();
if(document.getElementById('cfc-league-termine-'+actual_game) != null)
document.getElementById('cfc-league-termine-'+actual_game).style.display = 'block';
}
function next_termine() {
if(actual_game<=2)
actual_game += 1;
disable();
if(document.getElementById('cfc-league-termine-'+actual_game) != null)
document.getElementById('cfc-league-termine-'+actual_game).style.display = 'block';
}
function followCE(selector) {
if(location.href.indexOf('?cid') > -1)
location.href=location.href.substr(0,location.href.indexOf('?cid'))+selector;
else
location.href=location.href+selector;
}