// Folgende Scripte werden aufgerufen...
// global.js
// banner.js
// wallpaper.js
// mehrfach Funktion menueAd()
// bet.js (--)
// contentad.js
// und daraus check_contentad.js
// threetext.js
// skyone.js
// skytwo.js (--)
// adinside.js

ODoff=false; VCoff=false; ANoff=false;
Rfirm=''; Sfirm=''; Cfirm='';
Rzahl=0;Szahl=0;Czahl=0;


// Zeitabhängig - intern
var jetzt = new Date();
var Std = jetzt.getHours(); var Stunde='00'+Std; Stunde=Stunde.substr(-2,2);
var Day = jetzt.getDate(); var Tag='00'+Day; Tag=Tag.substr(-2,2);
var Month = jetzt.getMonth()+1; var Monat='00'+Month; Monat=Monat.substr(-2,2);
var Jahr = jetzt.getFullYear();
Zeit = Jahr + '-' + Monat + '-' + Tag + ' ' + Stunde + ':00:00';

// Random = jetzt.getSeconds()+jetzt.getMinutes();
Random = Math.ceil(Math.random()*12);
Random2 = Random/2==Math.round(Random/2);
Random3 = Random/3==Math.round(Random/3);
Random4 = Random/4==Math.round(Random/4);
Random6 = Random/6==Math.round(Random/6);
Random10 = Random/10==Math.round(Random/10);
Random12 = Random/12==Math.round(Random/12);

// Code
adDebug=''; 

// IVW
var p=window.location.pathname.substring(1); if (p.substring(0,3)=='F5/') p=window.location.pathname.substring(4);
var p1p=p.indexOf('/')+1;
var p1=window.location.pathname.substring(1,p1p);
var p2p=window.location.pathname.substring(p1p+1).indexOf('/')+1;
var p2=window.location.pathname.substring(p1p+1,p1p+p2p);
if (p1=="/") {p1='home'; p2='';}
document.write('<div id=\"ivwbox\" style=\"vertical-align:middle; position:absolute; top:92px; left:264px; height:1px; width:1px; float:left; clear:both; display:block;\">');
//document.write('<scr'+'ipt type="text/javascript">');
//document.write('document.write(\'<img src=\"http://fussball.ivwbox.de/cgi-bin/ivw/CP/'+p1+';'+p2+'?r=\'+escape(document.referrer)+\'&d=\'+(Math.random()*100000)+\'\" width=\"1\" height=\"1\" alt=\"smztag\" />\');');
//document.write('</scr'+'ipt>');
document.write('</div>');
document.getElementById('ivwbox').innerHTML='<img src=\"http://fussball.ivwbox.de/cgi-bin/ivw/CP/'+p1+';'+p2+'?r=\'+escape(document.referrer)+\'&d=\'+(Math.random()*100000)+\'\" width=\"1\" height=\"1\" alt=\"smztag\" />';
//adDebug+='IVW written ('+p1+';'+p2+')<br>\n';


// Ströer Interactive Init und Behaviour Targeting
if (window.location.hash=='#wallpaper') fbdPage='SI_testseite';
else if (window.location.hash=='#expwallpaper') fbdPage='SI_testseite';
if (fbdPage=='SI_testseite') var fbdPage='SI_testseite';
else if (window.location.pathname.substr(0,12)=='/bundesliga/' || window.location.pathname.substr(0,15)=='/F5/bundesliga/') var fbdPage='ErsteBundesliga';
else if (window.location.pathname.substr(0,12)=='/zweiteliga/' || window.location.pathname.substr(0,15)=='/F5/zweiteliga/') var fbdPage='ZweiteBundesliga';
else if (window.location.pathname=='/' || window.location.pathname=='/F5/') var fbdPage='Startseite';
else var fbdPage='Rest';
var WlWebsiteId= "fussballdaten.de";
var wlrcmd= "";
var tile=1;
ord=Math.round(Math.random()*10000000000000000);
var n_pbt = "";
document.write('<scr'+'ipt type="text/javascript" src="http://si.nuggad.net/rc?nuggn=571289945&nuggsid=520847736&nuggtg='+fbdPage+'"></scr'+'ipt>');
adDebug+='Nuggad written - still in use!<br>\n';
adDebug+='Searching for ads for '+fbdPage+'...<br>\n';

if (fbdPage=='SI_testseite') {
  adDebug+='Interstitial written because of '+fbdPage+'...<br>\n';
  document.write('<!-- Interstitial Stöer Interactive -->\n');
  //tile++;
  document.write('<div id="adVI"><scr'+'ipt type="text/javascript" language="JavaScript" src="http://ad.de.doubleclick.net/adj/P4444.si.fussballdaten.de_de/grmvinterstitial;sz=2x2;'+n_pbt+';tile='+(tile++)+';ord='+ord+'?"></scr'+'ipt></div>');
  }

// Menue-Links
function menueAd(punkt) {
  return true;
  if (false && punkt=='Frauen' && Zeit<'2009-12-07 20:00:00') {
    document.write('  <tr>\n');
    document.write('  <td colspan=\"2\" valign=\"top\"><img width=\"50\" height=\"3\" src=\"/bilder/clear.gif\" border=\"0\" alt=\"\"></td>\n');
    document.write('  </tr>\n');
    document.write('  <tr>\n');
    document.write('    <td align=\"right\" valign=\"top\"><img width=\"9\" height=\"9\" src=\"/bilder/clear.gif\" border=\"0\" alt=\"\"></td>\n');
    document.write('    <td class=\"nav\" width=\"2%\" nowrap valign=\"middle\"><a class=\"ueberschrift\" style=\"color:#FFCC00\" href=\"http://adserver.itsfogo.com/click.aspx?zoneid=8208\" target=\"_blank\">Sportwetten</a></td>\n');
    document.write('  </tr>\n');
    document.write('  <tr>\n');
    document.write('  <td colspan=\"2\" valign=\"top\"><img width=\"50\" height=\"3\" src=\"/bilder/clear.gif\" border=\"0\" alt=\"\"></td>\n');
    document.write('  </tr>\n');
    document.write('  <tr>\n');
    document.write('  <td colspan=\"2\" background=\"/bilder/allgemein/whiteline.gif\" valign=\"top\"><img width=\"50\" height=\"1\" src=\"/bilder/clear.gif\" border=\"0\" alt=\"\"></td>\n');
    document.write('  </tr>\n');    
    }
  }

function writeAdFrame(text) {
  document.write('<table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr><td width=\"100%\" valign=\"top\"><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td bgcolor=\"#006000\" valign=\"top\">');
  document.write('<table width=\"100%\" cellpadding=\"1\" cellspacing=\"1\" border=\"0\"><tr bgcolor=\"#006000\"><th width=\"100%\">Anzeige</th><th nowrap align=\"right\"></th></tr><tr><td bgcolor=\"#FFFFFF\" colspan=\"2\" valign=\"top\">');
  document.write(text);
  document.write('</td></tr></table></td></tr></table></td><td width=\"6\" background=\"/bilder/schatten/vert.gif\" valign=\"top\"><img width=\"6\" height=\"6\" src=\"/bilder/schatten/ecke_or.gif\" border=\"0\" alt=\"\"></td></tr>');
  document.write('<tr><td height=\"6\" background=\"/bilder/schatten/hor.gif\" valign=\"top\"><img width=\"6\" height=\"6\" src=\"/bilder/schatten/ecke_ul.gif\" border=\"0\" alt=\"\"></td><td height=\"6\" width=\"6\" valign=\"top\">');
  document.write('<img width=\"6\" height=\"6\" src=\"/bilder/schatten/ecke_ur.gif\" border=\"0\" alt=\"\"></td></tr></table><img width=\"50\" height=\"5\" src=\"/bilder/clear.gif\" border=\"0\" alt=\"\">\n');
  }

