// Cookie Handler for Windows Media Player
//**********************************************************************************************
function Cookie(document, name, hours, path, domain, secure)
{
  this.$document = document;
  this.$name = name;
  if (hours)
    this.$expiration = new Date((new Date()).getTime() + hours*3600000);
  else this.$expiration = null;
  if (path) this.$path = path; else this.$path = null;
  if (domain) this.$domain = domain; else this.$domain = null;
  if (secure) this.$secure = true; else this.$secure = false;
}
function _Cookie_store()
{
  var cookieval = "";
  for(var prop in this) {
    // Ignore properties with names that begin with '$' and also methods.
    if ((prop.charAt(0) == '$') || ((typeof this[prop]) == 'function'))
      continue;
    if (cookieval != "") cookieval += '&';
    cookieval += prop + ':' + escape(this[prop]);
  }
  var cookie = this.$name + '=' + cookieval;
  if (this.$expiration)
    cookie += '; expires=' + this.$expiration.toGMTString();
  if (this.$path) cookie += '; path=' + this.$path;
  if (this.$domain) cookie += '; domain=' + this.$domain;
  if (this.$secure) cookie += '; secure';
  // Now store the cookie by setting the magic Document.cookie property.
  this.$document.cookie = cookie;
}
function _Cookie_load()
{
  // First, get a list of all cookies that pertain to this document.
  // We do this by reading the magic Document.cookie property.
  var allcookies = this.$document.cookie;
  if (allcookies == "") return false;
  // Now extract just the named cookie from that list.
  var start = allcookies.indexOf(this.$name + '=');
  if (start == -1) return false;   // Cookie not defined for this page.
  start += this.$name.length + 1;  // Skip name and equals sign.
  var end = allcookies.indexOf(';', start);
  if (end == -1) end = allcookies.length;
  var cookieval = allcookies.substring(start, end);
  var a = cookieval.split('&');    // Break it into array of name/value pairs.
  for(var i=0; i < a.length; i++)  // Break each pair into an array.
    a[i] = a[i].split(':');
  for(var i = 0; i < a.length; i++) {
    this[a[i][0]] = unescape(a[i][1]);
  }
  // We're done, so return the success code.
  return true;
}
// This function is the remove() method of the Cookie object.
function _Cookie_remove()
{
  var cookie;
  cookie = this.$name + '=';
  if (this.$path) cookie += '; path=' + this.$path;
  if (this.$domain) cookie += '; domain=' + this.$domain;
  cookie += '; expires=Fri, 02-Jan-1970 00:00:00 GMT';
  this.$document.cookie = cookie;
}
// Create a dummy Cookie object, so we can use the prototype object to make
// the functions above into methods.
new Cookie();
Cookie.prototype.store = _Cookie_store;
Cookie.prototype.load = _Cookie_load;
Cookie.prototype.remove = _Cookie_remove;

function setBandwidth(bandwidth) 
{
  // hostname einlesen
  var myHostName="t-online.de";
  var bandwidthcookie = new Cookie(document, "bandwidth" , 1, "/" ,myHostName); 
  bandwidthcookie.value=bandwidth; 
  bandwidthcookie.store(); 
} 
// Copas Javascript functions
//**********************************************************************************************
var plugininstalled = 0;
var hostname = "copaslnk.t-online.de";
var pluginErrUrl = "http://" + hostname + "/errnoclnt.html"; var pluginNotFoundUrl = "http://" + hostname + "/errnoplg.html"; var downloadUrl = "ftp://software.t-online.de/pub/service/copas/CopasInst.exe";
isMac = (navigator.appVersion.indexOf("Mac")!=-1) ? true : false; NS4 = (document.layers) ? true : false; IEmac = ((document.all)&&(isMac)) ? true : false; IE4plus = (document.all) ? true : false; IE4 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 4.")!=-1)) ? true : false; IE5 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 5.")!=-1)) ? true : false; IE6 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 6.")!=-1)) ? true : false; ver4 = (NS4 || IE4plus) ? true : false; NS6 = (!document.layers) && (navigator.userAgent.indexOf('Netscape')!=-1)?true:false;
function checkPlugin() {
  var plginst = 0;
  if (navigator.mimeTypes && navigator.mimeTypes.length) {
    x = navigator.mimeTypes["application/x-toi-kickstart"];
    if (x) plginst = 1;
    if (x && x.enabledPlugin) plginst = 2;
  }
  if ((plginst == 0) && (IE4plus && !isMac))
        eval ('try {var xObj=new ActiveXObject("KickStart.KickStart");if (xObj) plginst = 3;xObj = null;} catch (e) {}');
  return plginst;
}
function startPlugin() {
  if (plugininstalled > 1) {
    document.open();
    document.writeln('<OBJECT ID="KickStart" CLASSID="CLSID:43719029-D4ED-11D5-B65C-00E02944413E" Width=0 Height=0><PARAM NAME="ErrUrl" VALUE="'
        + pluginErrUrl + 
        '"><EMBED TYPE="application/x-toi-kickstart" ErrUrl="' 
        + pluginErrUrl + 
        '" WIDTH="0" HEIGHT="0"></EMBED> </OBJECT>');
    document.close();
  } 
}
function startPluginAndJump(jump) {
  if (plugininstalled > 1) {
    document.open();
    document.writeln('<OBJECT ID="KickStart" CLASSID="CLSID:43719029-D4ED-11D5-B65C-00E02944413E" Width=0 Height=0><PARAM NAME="OkUrl" VALUE="' 
        + jump + 
        '"><EMBED TYPE="application/x-toi-kickstart" WIDTH="0" HEIGHT="0"></EMBED> </OBJECT>');
    document.close();
    self.document.location = jump;
  }
}
function copasLnk(url) {
      if (plugininstalled == 0) {
        navigator.plugins.refresh(true);
        plugininstalled = checkPlugin();
      }
      var off = url.search("\\?") + 1;
      if ((plugininstalled > 1) && (off > 0))
        url = url.substring(off);
      openWindow(url ,'ef');
}

/* <!--generated: Sat Mar 20 19:54:56 CET 2010, host: 'cmsweb8u2.aul.t-online.de', release: 6.6.35--> */