//Warenkorb extended by Flo
//MooTools laden
function AddJsFile(src)
{
	// hole alle vorhandenen Script-Elemente
	var scripts = document.getElementsByTagName('script');
	if(scripts) {
	  for(var k=0; k<scripts.length; k++) {
	    // script schon geladen, abbrechen
	    if(scripts[k].src == src) {
	      return;
	    }
	  }
	}

	// script noch nicht geladen, binde es ein
	var script = document.createElement('script');
	script.src = src;
	script.type = 'text/javascript';
	(document.getElementsByTagName('HEAD')[0] || document.body).appendChild(script);
}

AddJsFile("/scripts/mootools.js");
AddJsFile("/scripts/mootools_more.js");


//Warenkorb extended by Flo end fuers erste

var mPdbwkContextDrawn = 0;
var mPdbwkActMid = 0;
var mPdbwkCtxStopper = 0;
var mWkContactLinkCounterLng = 0;

function swd()
{
  warenkorb = null;
}

function clw()
{
  if (warenkorb != null)
  {
    if (warenkorb.closed == false)
    {
      warenkorb.close();
    }
  }
}


function lcfun() 
{
  if (typeof warenkorb == "undefined")
  {
    warenkorb = window.open('','warenkorb','resizable=yes,menubar=no,location=no,height=500,width=500,scrollbars=yes');
    warenkorb.location.href = "/cgi-gulp/lucgiwarenkorb.exe?kontakt";
    warenkorb.focus();
  }
  else
  {
    if (warenkorb != null)
    {
      if (warenkorb.closed == false)
      {
        warenkorb.location.href = "/cgi-gulp/lucgiwarenkorb.exe?kontakt";
        warenkorb.focus();
      }
      else
      {
        warenkorb = window.open('','warenkorb','resizable=yes,menubar=no,location=no,height=500,width=500,scrollbars=yes');
        warenkorb.location.href = "/cgi-gulp/lucgiwarenkorb.exe?kontakt";
        warenkorb.focus();

      }
    }
    else
    {
      warenkorb = window.open('','warenkorb','resizable=yes,menubar=no,location=no,height=500,width=500,scrollbars=yes');
      warenkorb.location.href = "/cgi-gulp/lucgiwarenkorb.exe?kontakt";
      warenkorb.focus();

    }
  } 
}

function getCookieVal (offset) 
{
   var endstr = document.cookie.indexOf (";", offset);
   if (endstr == -1)
      endstr = document.cookie.length;
   return unescape(document.cookie.substring(offset, endstr));
}

/////////////////////////////////////////////
// Cookie lesen
function GetCookie (name) 
{
   var arg = name + "=";
   var alen = arg.length;
   var clen = document.cookie.length;
   var i = 0;
   while (i < clen) 
   {
      var j = i + alen;
      if (document.cookie.substring(i, j) == arg)
         return getCookieVal (j);
      i = document.cookie.indexOf(" ", i) + 1;
      if (i == 0) 
         break; 
   }
   return "";
}

/////////////////////////////////////////////
// Cookie setzen
function SetPdbCookie (name, value) 
{
   var argv = SetPdbCookie.arguments;
   var argc = SetPdbCookie.arguments.length;
   var vtemp = new Date();
   var expires = new Date(vtemp.getTime() + 1000*60*60*24*7);
   var domain = (3 < argc) ? argv[3] : null;
   var secure = (4 < argc) ? argv[4] : false;
   document.cookie = name + "=" + escape (value) + "; path=/" +
   ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
   ((domain == null) ? "" : ("; domain=" + domain)) +
   ((secure == true) ? "; secure" : "");
}

/////////////////////////////////////////////
// ist eine Zeichenfolge im Cookie enthalten?
function IsInCookie(name, sPart)
{
   var sCookieStr = GetCookie (name);
   return sCookieStr.indexOf(sPart);
}

/////////////////////////////////////////////////////////////////////
// Zeichenfolge Cookie hinzufügen bzw. entfernen, falls schon drinnen
function AddToCookie (name, value) 
{
   var sCookieStr = GetCookie (name);
   var sNewPart = "s" + value + "d" + Date.parse(Date()) + "x";
   var sCheckPart = "s" + value + "d";
   var nPosAdd = IsInCookie(name, sCheckPart);
   if ( nPosAdd >= 0 )    // aus dem Cookie entfernen
   {
       var sNewCookieStr = "";
       if ( nPosAdd > 0 )
       {
           sNewCookieStr = sCookieStr.substring(0, nPosAdd);
           sCookieStr = sCookieStr.substr(nPosAdd, sCookieStr.length - nPosAdd);
           var nPosOldStart = sCookieStr.indexOf("x");
       }
       else
       {
          var nPosOldStart = IsInCookie(name, "x");
       }
       sNewCookieStr = sNewCookieStr + sCookieStr.substr(nPosOldStart + 1, sCookieStr.length - nPosOldStart);
       sCookieStr = sNewCookieStr;
   }
   else                // zum Cookie hinzufügen
   sCookieStr = sCookieStr + sNewPart;
   SetPdbCookie (name, sCookieStr); 
}

/////////////////////////////
// Ist ID schon im Warenkorb?
function IsInWarenkorb (name, value) 
{
   var sNewPart = "s" + value + "d";
   if (  IsInCookie(name, sNewPart) >= 0 )
      return 1;
   else
      return 0;
}


function AddMidToKorb(value, Ereignis)
{
  

  var sCookieStr = GetCookie("PDB");
  Anzahl = sCookieStr.split("xs");
  if (Anzahl.length + 1 > 50 && IsInWarenkorb("PDB", value) == 0)
  {
     alert("Maximale Anzahl der zu kontaktierenden Profile erreicht!");
  }
  else
  {
    if (Ereignis == -1){
      AddToCookie ("aPDB", value);
      DeleteFromCookie("PDB", value);
    }else{
      AddToCookie ("PDB", value);
      DeleteFromCookie("aPDB", value);
   };
   
   if ( IsInWarenkorb("PDB", value) == 0 )
     {
     if ( IsInWarenkorb("aPDB", value) == 0 ){
         pdbwksetallimg('M' + value, "/images/icons/ic_auswahlAUS_16x16.gif");  
       }else{
       pdbwksetallimg('M' + value, "/images/icons/ic_auswahlX_16x16.gif");  
     }
     } else {
       pdbwksetallimg('M' + value, "/images/icons/ic_auswahlAN_16x16.gif"); 
     };
   
   };
   UpdateWKCounter();
}

// alle images zu dieser mid updaten
function pdbwksetallimg(pValue, pNewImg){
   document.images[pValue].src=pNewImg
   if (self.name == "warenkorb")
     if (opener != null){
       if (opener.closed == false){
         if (opener.document != null){
           if (opener.document.images != null){
             if (opener.document.images[pValue] != null){
               opener.document.images[pValue].src="/images/icons/ic_auswahlAN_16x16.gif";
             }
           }
         }
       }
     }
}

function ShowPdbLinkDescr(OnOff)
{
   return 'window.status=" Profil markieren"; return true;'
}

function GetPdbLink(MID, IsMarked)//, pWithContext)
{
   var QUT = '"';
   var sReturn="<a href='javascript:void(0);'";
   sReturn=sReturn + " onClick='return AddMidToKorb(" + MID + ");' ";
   sReturn=sReturn + " onMouseOver='window.status=" + QUT;
   sReturn=sReturn + " Profil markieren" + QUT;
   sReturn=sReturn + ";return true;' onMouseOut='window.status=" + QUT + " " + QUT + ";return true;' id=\"pdbwklink"+MID+"\">";
   return sReturn;
}

function xxxfun(e){
    alert("fun");
};

function GetPdbImage(MID)
{
  SetPdbCentralCheckCookie();
  if ( IsInCookie('COOKIE_ON','1') >= 0 )   // Cookies generell an?
  {
    if ( IsInWarenkorb('PDB', MID) == 1 )
    {
      return GetPdbLink(MID,'1') + "<IMG border=0 SRC='/images/icons/ic_auswahlAN_16x16.gif' align=top alt='Korb' name='M" + MID + "'></IMG></a> ";
    }
    else
    {
      if ( IsInWarenkorb('aPDB', MID) == 1 )
      {
        return  GetPdbLink(MID,'0') + "<IMG border=0 SRC='/images/icons/ic_auswahlX_16x16.gif' align=top alt='Korb' name='M" + MID + "'></IMG></a> ";
      }else{
        return  GetPdbLink(MID,'0') + "<IMG border=0 SRC='/images/icons/ic_auswahlAUS_16x16.gif' align=top alt='Korb' name='M" + MID + "'></IMG></a> ";
      }
    }
  }
  else
  {
  return ""; 
  }
}

// selbe wie oben nur mit contextmenu
function GetPdbImageContext(MID){

    var returnStr = "";

  SetPdbCentralCheckCookie();
  
  returnStr = "";
  
  if ( IsInCookie('COOKIE_ON','1') >= 0 )   // Cookies generell an?
  {
    if ( IsInWarenkorb('PDB', MID) == 1 )
    {
      return GetPdbLink(MID,'1') + "<IMG border=0 SRC='/images/icons/ic_auswahlAN_16x16.gif' align=top alt='Korb' name='M" + MID + "'></IMG></a> ";
    }
    else
    {
      if ( IsInWarenkorb('aPDB', MID) == 1 )
      {
        return  GetPdbLink(MID,'0') + "<IMG border=0 SRC='/images/icons/ic_auswahlX_16x16.gif' align=top alt='Korb' name='M" + MID + "'></IMG></a> ";
      }else{
        return  GetPdbLink(MID,'0') + "<IMG border=0 SRC='/images/icons/ic_auswahlAUS_16x16.gif' align=top alt='Korb' name='M" + MID + "'></IMG></a> ";
      }
    };
    //pdbwklink
    
  }
  else
  {
  return ""; 
  }
};

function pdbwkhidectx(){
    if (mPdbwkCtxStopper==0){
        document.getElementById("pdbwkctx").style.display="none";
  };
};

function pdbwksettimeout(){
    window.setTimeout("pdbwkhidectx();",100);
};

// dem element eine funktion zum handeln der onmousedown events zuweisen
function pdbwkAddContext(pValue){
    
  if (!document.getElementById) return false;
  var eElem = document.getElementById('pdbwklink'+pValue);
  eElem.onmousedown = pdbwkOnMouseUpCatcher;
  eElem.onmouseup = pdbwkOnMouseDownCatcher;
  eElem.oncontextmenu = function() {return false};
  
  if (mPdbwkContextDrawn == 0){
   //wir brauchen noch ein contextmenu
   var drawStr = "";
   drawStr = "";
   mPdbwkContextDrawn = 1;
   drawStr = "<div id=\"pdbwkctx\" style=\"position:absolute; display:none; \" onMouseOut=\"mPdbwkCtxStopper=0; pdbwksettimeout();\" onMouseMove=\"mPdbwkCtxStopper=1;\" oncontextmenu = \"return false;\";>"      ;
     drawStr = drawStr+"<table bgcolor=\"000000\" border=0 cellspacing=0 cellpadding=1><tr><td><table bgcolor=\"FFFFFF\"><tr><td>"               ;
     drawStr = drawStr+"<div id=\"pdbwkawk\" style=\"background-color:#FFFFFF; color:#003399; width:100%\" onClick=\"AddMidToKorb(mPdbwkActMid, -1); document.getElementById('pdbwkctx').style.display='none';\" onMouseOver=\"document.getElementById('pdbwkawk').style.color=document.getElementById('pdbwkawk').style.backgroundColor; document.getElementById('pdbwkawk').style.backgroundColor='003399';\" onMouseOut=\"document.getElementById('pdbwkawk').style.backgroundColor=document.getElementById('pdbwkawk').style.color;document.getElementById('pdbwkawk').style.color='';\">Anti-Warenkorb</div>" ;
     drawStr = drawStr+"</td></tr><tr><td>"                               ;
     drawStr = drawStr+"<div id=\"pdbwkwk\" style=\"background-color:#FFFFFF; color:#003399; width:100%\" onClick=\"AddMidToKorb(mPdbwkActMid); document.getElementById('pdbwkctx').style.display='none';\" onMouseOver=\"document.getElementById('pdbwkwk').style.color=document.getElementById('pdbwkwk').style.backgroundColor; document.getElementById('pdbwkwk').style.backgroundColor='003399';\" onMouseOut=\"document.getElementById('pdbwkwk').style.backgroundColor=document.getElementById('pdbwkwk').style.color;document.getElementById('pdbwkwk').style.color='';\">Warenkorb</div>" ;
     drawStr = drawStr+"</td></tr></table></td></tr></table></div>"                         ;
   document.write(drawStr);
  };
  
  return true;
};

function pdbwkOnMouseDownCatcher (evt) {
    evt = (evt) ? evt : ((window.event) ? window.event : "");
    var elem = (evt.target) ? evt.target : evt.srcElement;
  if (evt.button == 2){
      
      mPdbwkActMid = elem.name.substr(1);
    
    var tempX = 0;
    var tempY = 0;
        if (evt.clientX) { // grab the x-y pos.s if browser is IE
          tempX = evt.clientX + document.body.scrollLeft;
          tempY = evt.clientY + document.body.scrollTop;
        } else {  // grab the x-y pos.s if browser is NS
          tempX = evt.pageX;
          tempY = evt.pageY;
        };
    document.getElementById("pdbwkctx").style.left=tempX - 5;
    document.getElementById("pdbwkctx").style.top=tempY - 5;
    
        window.setTimeout("document.getElementById(\"pdbwkctx\").style.display=\"\";", 10);
    
      return false;
  }else{
        return false;
  };
}

function pdbwkOnMouseUpCatcher(evt) {
    evt = (evt) ? evt : ((window.event) ? window.event : "");
    var elem = (evt.target) ? evt.target : evt.srcElement;
  if (evt.button == 2){
      //alert("up");
      return false;
  }else{
      return false;
  };
}


function SetPdbCentralCheckCookie()
{
  if ( IsInCookie('COOKIE_ON','1') < 0 )
  {
    SetPdbCookie("COOKIE_ON","1");    // Akzeptiert der User ueberhaupt Cookies?
  }
}

function GetPdbWarenkorbDescr()
{
  var QUT = '"';
  var sReturn="";
  SetPdbCentralCheckCookie();
  if ( IsInCookie('COOKIE_ON','1') >= 0 )   // Cookies generell an?
  {
      sReturn = "<table border='0' cellspacing='0' cellpadding='0'>"
      sReturn = sReturn + "<tr>"
      sReturn = sReturn + "<td><img src='/images/icons/ic_auswahlAUS_16x16.gif' width='16' height='16' alt='Korb'></td>"
      sReturn = sReturn + "<td class='small'>Klicken Sie auf dieses Symbol, um die f&uuml;r Sie interessanten Profile zu markieren.</td>"
      sReturn = sReturn + "</tr>"
      sReturn = sReturn + "<tr>"
      sReturn = sReturn + "<td><img src='/images/icons/ic_auswahlAN_16x16.gif' width='17' height='16' alt='Korb'></td>"
      sReturn = sReturn + "<td class='small'>Die so markierten Profile k&ouml;nnen Sie hier "
      if (typeof lucgiwarenkorb == "undefined") 
      {
        sReturn = sReturn + "<a href='/cgi-gulpsearch/Kontakt.exe/PMOMG?1405' target='_parent'>kontaktieren</a>.</td>";
      }
      else
      {
        sReturn = sReturn + "<a target=" + QUT + "_self" + QUT + " href=" + QUT + "#" + QUT + " onClick=" + QUT + "lcfun()" + QUT + ">kontaktieren</a>.</td>";
      }
      sReturn = sReturn + "</tr>"
      sReturn = sReturn + "<tr>"
      if (typeof lucgiwarenkorb == "undefined") 
      {
        var sCookieStr = GetCookie("PDB");
        var AnzahlStr = sCookieStr.split("xs");
        var Anzahl = 0;
        if (AnzahlStr.length > 0) {
          if (AnzahlStr[0].length > 0) {
            Anzahl = AnzahlStr.length;
          }
        }
        mWkContactLinkCounterLng++;
        sReturn = sReturn +  "<td class='small' colspan=2><br><a href=" + QUT + "#" + QUT + " onClick=" + QUT + "opw()" + QUT + ">Warenkorb anzeigen (<div id=wkcounter" + mWkContactLinkCounterLng + " style='display:inline'>" + Anzahl + "</div>)</a>";
      }
      else
      {
        sReturn = sReturn  + "<td class='small' colspan=2><br><a target=" + QUT + "_self" + QUT + " href=" + QUT + "#" + QUT + " onClick=" + QUT + "opw()" + QUT + ">Warenkorb anzeigen</a>";
      }

      sReturn = sReturn + "</td>"
      sReturn = sReturn + "</tr>"
      sReturn = sReturn + "</table><p>"

  }
 return sReturn;
}

function DropMid(mid)
{
  DeleteFromCookie("PDB", mid);
  DeleteFromCookie("aPDB", mid);
  UpdateWKCounter();
}

function DeleteFromCookie(name, value)
{
   SetPdbCentralCheckCookie();
   if ( IsInCookie('COOKIE_ON','1') >= 0 )   // Cookies generell an?
   {
    var sCookieStr = GetCookie (name);
    var sNewPart = "s" + value + "d" + Date.parse(Date()) + "x";
    var sCheckPart = "s" + value + "d";
    var nPosAdd = IsInCookie(name, sCheckPart);
    if ( nPosAdd >= 0 )    // aus dem Cookie entfernen
    {
          var sNewCookieStr = "";
          if ( nPosAdd > 0 )
          {
              sNewCookieStr = sCookieStr.substring(0, nPosAdd);
              sCookieStr = sCookieStr.substr(nPosAdd, sCookieStr.length - nPosAdd);
              var nPosOldStart = sCookieStr.indexOf("x");
          }
          else
          {
              nPosAdd = 0;
              var nPosOldStart = IsInCookie(name, "x");
          }
          sNewCookieStr = sNewCookieStr + sCookieStr.substr(nPosOldStart + 1, sCookieStr.length - nPosOldStart - 1);
          sCookieStr = sNewCookieStr;
    }
    SetPdbCookie (name, sCookieStr); 
   }
}

function FormWarenkorb()
{
  for (i = 0; i < document.warenkorb.select.options.length; i++)
  {
    if (document.warenkorb.select.options[i].selected == true) {eingabe = document.warenkorb.select.options[i].value};
  }

  switch(eingabe)
  {
    case "1":
      self.close();
    break;
    
    case "2":
      if (typeof lucgiwarenkorb == "undefined") 
      {
        window.open("/cgi-gulpsearch/Kontakt.exe/PMOMG?1405",'kontakt','status=yes,toolbar=yes,resizable=yes,menubar=yes,location=yes,scrollbars=yes');
        self.close();
      }
            else
            {
            window.location.href = "/cgi-gulp/lucgiwarenkorb.exe?kontakt";
            }     
    break;
    
    case "3":
      window.open("http://www.gulp.de");
      self.close();
    break;
    
    case "4":
      EraseWarenkorb("PDB");
      EraseWarenkorb("aPDB");
      opener.location.reload(true);
      self.close();
    break;
    
    case "5":
      window.open("/cgi-gulpsearch/Kontakt.exe/PRINTALLFBS",'kontakt','status=yes,toolbar=yes,resizable=yes,menubar=yes,location=yes,scrollbars=yes');
      //opener.location.reload(true);
      self.close();
    break;

    case "6":
      window.open("/cgi-gulpsearch/Kontakt.exe/UBTEXTALLFBS",'kontakt','status=yes,toolbar=yes,resizable=yes,menubar=yes,location=yes,scrollbars=yes');
      //opener.location.reload(true);
      self.close();
    break;

    case "7":
      window.open("/cgi-gulpsearch/Kontakt.exe/UBWORDALLFBS",'kontakt','status=yes,toolbar=yes,resizable=yes,menubar=yes,location=yes,scrollbars=yes');
      //opener.location.reload(true);
      self.close();
    break;

    case "8":
      window.open("/cgi-gulpsearch/Kontakt.exe/UBDISPALLFBS",'kontakt','status=yes,toolbar=yes,resizable=yes,menubar=yes,location=yes,scrollbars=yes');
      //opener.location.reload(true);
      self.close();
    break
    
  }
}

function EraseWarenkorb(name)
{
  werte = GetCookie(name).split("x");
  if (werte.length - 1 > 0)
  {
    for (i = 0; i < werte.length - 1; i++)
    {
      id = werte[i].substring(1, werte[i].search("d"));
      if (self.name == "warenkorb")
      if (opener != null)
      { 
        if (opener.closed == false)
                {
          if (opener.document != null)
          {
            if (opener.document.images != null)
            {
              if (opener.document.images['M' + id] != null)
              {
                opener.document.images['M' + id].src="/images/icons/ic_auswahlAUS_16x16.gif";
              }
            }
          }
        }
      }
    }
  }

  SetPdbCookie (name, "");
}

function opw()
{
  if (typeof warenkorb == "undefined") 
  {
    if ( typeof lucgiwarenkorb == "undefined") 
    {
      warenkorb = window.open('','warenkorb','resizable=yes,menubar=no,location=no,height=500,width=500,scrollbars=yes');
      warenkorb.location.href = "/cgi-gulpsearch/kontakt.exe/WKSHOW?105";
      warenkorb.focus();
    }
    else
    {
      warenkorb = window.open('','warenkorb','resizable=yes,menubar=no,location=no,height=500,width=500,scrollbars=yes');
      warenkorb.location.href = "/cgi-gulp/lucgiwarenkorb.exe";
      warenkorb.focus();
    }
  }
  else
  {
    if (warenkorb != null)
    {
      if (warenkorb.closed == false)
      {
        warenkorb.focus();
        if(typeof lucgiwarenkorb == "undefined")
        {
          warenkorb.location.href = "/cgi-gulpsearch/kontakt.exe/WKSHOW?105";
        }
        else
        {
          warenkorb.location.href = "/cgi-gulp/lucgiwarenkorb.exe";
        }
      }
      else
      {
        if ( typeof lucgiwarenkorb == "undefined") 
        {
          warenkorb = window.open('','warenkorb','resizable=yes,menubar=no,location=no,height=500,width=500,scrollbars=yes');
          warenkorb.location.href = "/cgi-gulpsearch/kontakt.exe/WKSHOW?105";
          warenkorb.focus();
        }
        else
        {
          warenkorb = window.open('','warenkorb','resizable=yes,menubar=no,location=no,height=500,width=500,scrollbars=yes');
          warenkorb.location.href = "/cgi-gulp/lucgiwarenkorb.exe";
          warenkorb.focus();
        }
      }
    }
    else
    {
      warenkorb = window.open('','warenkorb','resizable=yes,menubar=no,location=no,height=500,width=500,scrollbars=yes');
      warenkorb.location.href = "/cgi-gulpsearch/kontakt.exe/WKSHOW?105";
      warenkorb.focus();
    }
  }
}

function UpdateWKCounter() {
  var sCookieStr = GetCookie("PDB");
  var AnzahlStr = sCookieStr.split("xs");
  var Anzahl = 0;
  if (AnzahlStr.length > 0) {
    if (AnzahlStr[0].length > 0) {
      Anzahl = AnzahlStr.length;
    }
  }
  for (i = 1; i <= mWkContactLinkCounterLng; i++) {
    document.getElementById("wkcounter" + i).innerHTML = Anzahl;
  }
}


//Warenkorb extended by Flo

var corpses = null;
var cookieReader = null;
var CookieOldValue = "";

function upCorpses(){
	corpses.each(function(e){
		if(CookieOldValue){
			if(CookieOldValue.indexOf("s" + e.get("name").substring(1) + "d") > -1){
				e.src = "/images/icons/ic_auswahlAN_16x16.gif";
			}else{
				e.src = "/images/icons/ic_auswahlAUS_16x16.gif";
			}
		}else{
			e.src = "/images/icons/ic_auswahlAUS_16x16.gif";
		}
	});
	
	var cnt = 0;
	
	if(CookieOldValue){
		cnt = CookieOldValue.split("xs").length;
	}
	
	var c1 = $("wkcounter1");
	var c2 = $("wkcounter2");
	
	if(c1){
		c1.innerHTML = cnt;
	}

	if(c2){
		c2.innerHTML = cnt;
	}
}

var cC = function(){
	if(!(CookieOldValue == Cookie.read('PDB'))){
		//Das Cookie hat sich geaendert
		CookieOldValue = Cookie.read('PDB');
		upCorpses();
	}
}


//Cookie wird alle par millisekunden geprueft
function startcC() {
	CookieOldValue = Cookie.read('PDB');
	cookieReader = cC.periodical(200, null);
	//Alle Warenkorbdinger speichern
	ims = $$(document.getElementsByTagName('img'));
	corpses = ims.filter(isCorps);
	upCorpses();
}

function isCorps(element, index, array){
	if(element.get("alt") == "Korb"){
		if(element.get("name")){
			if(element.get("name").indexOf("M") == 0){
				return (true);
			}else{
				return (false);
			}
		}else{
			return (false);
		}
	}else{
		return (false);
	}
}

window.onload = startcC;
