function cookieseingeschaltet()
{
    document.cookie = "cookieaktiv=ja";
    if (document.cookie.indexOf("cookieaktiv", 0) == -1) 
    {
      return false;
    }
    return true;
}

function checkFlashPluginNS()
{
  var plugin = 'Shockwave Flash';
  if (navigator.plugins && navigator.plugins[plugin]) return true;
  return false;
}

function checkFlashPluginIE()
{
  var flash = false;
  if (navigator.mimeTypes['application/x-shockwave-flash'])
  {
   flash = true;
  }  
  else if (navigator.appName=="Microsoft Internet Explorer")
  {
      //erweiterung nach fehler im ie 5.0 aw 28.08.03
   // var msw = writeComp("Macromedia Shockwave Director","{2A202491-F00D-11CF-87CC-0020AFEECF20}","ComponentID");
   var msw = writeComp("Macromedia Flash","{D27CDB6E-AE6D-11CF-96B8-444553540000}","ComponentID");
    if (msw==true)
      { 
     flash = true;
    }   
  /* 
    var seb = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); 
    if (seb!=null)
    { 
     flash = true;
    }   
 */
    
  }
  return flash;
}

function guestLogin()
{
 // alert("gast");
  document.GLOGIN.submit();
  //var $m = window.location="knshop/servlet/index.html";
}
  
function loginFenster()
{
  //alert("member");
  var myname = "Login";
  var w = 451;
  var h = 300;
    
  LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
  TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
  var settings =
  'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no';
  // var $m = window.location;

  // $s = ""+ $m;
  var $s = window.location.protocol + "//" + window.location.hostname + "/";
    
//    if ($s.charAt($s.length - 1) != "/") $s = $s + "/";
  var mypage = $s+"knshop/servlet/login.html";
    
//    alert(settings);
//    alert(mypage);

  window.open(mypage,myname,settings);
}

function writeComp(cname,cid,idtype)
{
var bCompAvailable;
var sCompVersion;
if (typeof(caps) != "undefined" && typeof(caps.id) != "undefined" && typeof(caps.getComponentVersion) != "undefined") {
bCompAvailable = caps.isComponentInstalled(cid,idtype);
sCompVersion = caps.getComponentVersion(cid,idtype);
}
return (bCompAvailable);
}
