/*
  website integration code (monitoring and chat)
    yalst LiveSupportTool
    Author: Dr. Markus Jasinski
    Copyright (c) 2003-2010 by rostock-digital, Rostock, Germany
    http://www.rostock-digital.com  
*/ 
// initialisation and basic functions
var tnow=new Date();
var yblocked=0;
var ymtimer=Math.round(tnow.getTime()/1000);
var ycb_chat=0;
if (typeof y_nopid != 'undefined')
  {
  if (y_nopid==true)
    {var ypid=false;}
  else
    {var ypid=true;}
  }
else
  {var ypid=true;}
rnd.today=new Date();
rnd.seed=rnd.today.getTime();
function rnd()
  {
  rnd.seed=(rnd.seed*9301+49297) % 233280;
  return rnd.seed/(233280.0);
  }
function rand(number)
  {return Math.ceil(rnd()*number);}
var scriptid=rand(30000);
function str_replace(search,replace,oldstring)
  {
  result=""+oldstring;
  while (result.indexOf(search)>-1)
    {
    pos=result.indexOf(search);
    result=""+(result.substring(0,pos)+replace+result.substring((pos+search.length),result.length));
    }
  return result;
  }
// Browser detection
var yAgent=navigator.userAgent.toLowerCase();
var isNetscape=!!(document.captureEvents && !document.getElementById);
var isIE4=!!(document.all && !document.documentElement);
var isIE=(navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin=(navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera=(navigator.userAgent.indexOf("Opera") != -1) ? true : false;
var isMac=!!(navigator.userAgent.indexOf("Mac")!=-1);
var isGecko=(yAgent.indexOf('gecko')!=-1);
var hasDOM=!!document.getElementById;
// Layer handling
function yMM_findObj(n,d)
  { //v4.01
  var p,i,x;
  if (!d) d=document;
  if ((p=n.indexOf("?"))>0&&parent.frames.length)
    {d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if (!(x=d[n])&&d.all) x=d.all[n];
  for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=yMM_findObj(n,d.layers[i].document);
  if (!x && d.getElementById) x=d.getElementById(n);
  return x;
  }
function ypositionx()
  { 
  if (window.innerWidth)
    {
    var posx=window.pageXOffset+200;
    var posy=window.pageYOffset+133;
    }
  else if (document.documentElement && document.documentElement.clientWidth)
    { 
    var posx=document.documentElement.scrollLeft+200;
    var posy=document.documentElement.scrollTop+133;
    }
  else if (document.body)
    {
    var posx=document.body.scrollLeft+200;
    var posy=document.body.scrollTop+133;
    }
  else 
    {var posx=200;}
  return posx;
  }  
function ypositiony()
  { 
  if (window.innerWidth)
    {
    var posx=window.pageXOffset+200;
    var posy=window.pageYOffset+133;
    }
  else if (document.documentElement && document.documentElement.clientWidth)
    { 
    var posx=document.documentElement.scrollLeft+200;
    var posy=document.documentElement.scrollTop+133;
    }
  else if (document.body)
    { 
    var posx=document.body.scrollLeft+200;
    var posy=document.body.scrollTop+133;
    }
  else
    {posy=133;}
  return posy;
  }
function yflevSlideDiv()
  { // v2.1
  // Copyright 2002, Marja Ribbers-de Vroed, FlevOOware (www.flevooware.nl/dreamweaver/)
  if (arguments.length < 4) {return;}
  var aA = arguments, sD = aA[0];
  if (sD == "") {return;}
  var oD = eval("yMM_findObj('" + sD + "')");
  if (oD == null) {return;}
  var iNX = parseInt(aA[1]), iNY = parseInt(aA[2]), iS = parseInt(aA[3]);
  var iPx = (aA.length > 4) ? parseInt(aA[4]) : 0, iR = (aA.length > 5) ? parseInt(aA[5]) : 0;
  var iT = 10, sS = "";
  if (!document.layers) {oD = oD.style;} if (oD.tT != null) {clearTimeout(oD.tT);} 
  var iCX = parseInt(oD.left), iCY = parseInt(oD.top);
  if (iR != 0)
    { // relative
    if (iR == 1) {iNX = iCX - iNX; iNY = iCY;} // left
    else if (iR == 2) {iNX = iCX + iNX; iNY = iCY;} // right
    else if (iR == 3) {iNY = iCY - iNY; iNX = iCX;} // up
    else {iNY = iCY + iNY; iNX = iCX;}
    } // down
  var iX = iNX, iY = iNY;
  if ((iCX!=iNX) || (iCY!=iNY))
    {
    if (iPx > 0)
      {
      iT = iS;
      var iPxX = iPx, iPxY = iPx, iMX = Math.abs(iCX - iNX), iMY = Math.abs(iCY - iNY);
      if (iMX < iMY) {iPxY = (iMX != 0) ? ((iMY/iMX)*iPx) : iPx;}
      else {iPxX = (iMY != 0) ? ((iMX/iMY)*iPx) : iPx;}
      if (iPxX >= iMX) {iPxX = Math.min(Math.ceil(iPxX), iPx);}
      if (iPxY >= iMY) {iPxY = Math.min(Math.ceil(iPxY), iPx);}
      if ((iCX < iNX) && (iCX + iPxX < iNX)) {iNX = iCX + iPxX;}
      if ((iCX > iNX) && (iCX - iPxX > iNX)) {iNX = iCX - iPxX;}
      if ((iCY < iNY) && (iCY + iPxY < iNY)) {iNY = iCY + iPxY;}
      if ((iCY > iNY) && (iCY - iPxY > iNY)) {iNY = iCY - iPxY;}
      }
    else
      {
      var iMX = ((iNX - iCX) / iS), iMY = ((iNY - iCY) / iS); 
      iMX = (iMX > 0) ? Math.ceil(iMX) : Math.floor(iMX);
      iNX = iCX + iMX; 
      iMY = (iMY > 0) ? Math.ceil(iMY) : Math.floor(iMY); iNY = iCY + iMY;
      }
    if ((parseInt(navigator.appVersion)>4 || navigator.userAgent.indexOf("MSIE")>-1) && (!window.opera)) {sS="px";}
    if (iMX != 0) {eval("oD.left = '" + iNX + sS + "'");}
    if (iMY != 0) {eval("oD.top = '" + iNY + sS + "'");}
    var sFunction = "yflevSlideDiv('" + sD + "'," + iX + "," + iY + "," + iS + "," + iPx + ",0)";
    oD.tT = setTimeout(sFunction,iT);
    }
  }
function yOpenLayer()
  {
  window.focus();
  yflevSlideDiv('ylinvite',posix,posiy,4,6,0);
  }
function yCloseLayer(cleanup)
  {
  yflevSlideDiv('ylinvite',-300,-218,10,0,0); 
  if (cleanup==1)     
    {linvite.location='http://www.elektrodiscount-24.de/yalst/linvite.php?style=empty&site=1-1&cleanup='+escape(mycookie);}
  else
    {linvite.location='http://www.elektrodiscount-24.de/yalst/linvite.php?style=empty';}
  document.ltitle.src='http://www.elektrodiscount-24.de/yalst/ltitle.php?style=empty';
  } 
// Plugin detection
function ypiCreateActiveX(obj)
  {
  var result=false;
  if (document.body.addBehavior)
    eval('try {result=new ActiveXObject("'+obj+'")} catch(e){};');
  return result;
  }  
function ypiGetFlashVersion() 
  {
  var flash=0;
  for (var version=10; version>0; version--)
    {
    if (ypiCreateActiveX('ShockwaveFlash.ShockwaveFlash.'+version))
      {flash=version;}
    }
  return flash;
  }
function ypiGetShockwaveVersion()  
  {
  var shockwave=0;
  for (var version=10; version>0; version--)
    {
    if (ypiCreateActiveX('SWCtl.SWCtl.'+version))
      {shockwave=version;}
    }
  return shockwave;
  }  
function ypiDetectOther(ClassNo,name)
  {
  var result="";
  if (yns.indexOf(ClassNo)!=-1)
    {
    if (navigator.mimeTypes[ClassNo].enabledPlugin!=null)
      {result=name+",";}
    }
  return result;  
  }
// Cookie handling
function setcookie(value)
  { //v2.0
  var expDate=new Date();
  expDate.setFullYear(expDate.getFullYear()+30);
  document.cookie="YALSTSESSION="+value+"; path=/; expires="+expDate.toGMTString();
  }
function readcookie()
  {
  var allcookies=document.cookie;
  var pos=allcookies.indexOf("YALSTSESSION=");
  if (pos!=-1)
    {
    var start=pos+13;
    var end=allcookies.indexOf(";",start);
    if (end==-1)
      {end=allcookies.length;}
    var value=allcookies.substring(start,end);
    if (value!="")
      {return value;}
    else
      {return "none";}
    }
  else
    {return "none";}
  }
// call via campaign?
function ycampaign()
  {
  var thisurl=String(location.href);
  expression=/ycsess=([a-zA-Z0-9]{20})/;
  result=expression.test(thisurl);
  if (result)
    {
    expression.exec(thisurl);
    return RegExp.$1;
    }
  else
    {return false;}  
  }
// call by reference?  
function ytaf()
  {
  var thisurl=String(location.href);
  expression=/ytaf=([a-zA-Z0-9]{30})/;
  result=expression.test(thisurl);
  if (result)
    {
    expression.exec(thisurl);
    return RegExp.$1;
    }
  else
    {
    expression=/ytaf=(1)/;
    result=expression.test(thisurl);
    if (result)
      {
      expression.exec(thisurl);
      return 'none';
      }
    else
      {return false;}  
    }
  } 
function open_active_livechat(urlparm,width,height)
  {
  if (!width) width=500;
  if (!height) height=350;
  Fpopupwindow=window.open(urlparm,"alivechat_1_1","width="+width+",height="+height+",location=no,menubar=no,statusbar=no,scrollbars=no,dependent=no,screenX=20,screenY=20,left=20,top=20");
  if (Fpopupwindow)
    {
    if (Fpopupwindow.opener==null) Fpopupwindow.opener=self;
    Fpopupwindow.focus();
    }
  else
    {yblocked=1;}  
  }  
function open_marketing(urlparm,width,height)
  {
  if (!width) width=500;
  if (!height) height=350;
  Fpopupwindow=window.open(urlparm,"marketing_1_1","width="+width+",height="+height+",location=no,menubar=no,statusbar=no,scrollbars=yes,dependent=no,screenX=20,screenY=20,left=20,top=20");
  if (Fpopupwindow)
    {
    if (Fpopupwindow.opener==null) Fpopupwindow.opener=self;
    Fpopupwindow.focus();
    }
  else
    {yblocked=1;}  
  }
function yredo(init)
  {
  tnow=new Date();
  ymtimer=Math.round(tnow.getTime()/1000);
  var today=new Date();
  var localtime=today.getHours()+":"+today.getMinutes(); 
  if (ypid==false)
    {var ypdp="&ypid=no";}
  else
    {var ypdp='';}  
  var ysd,ysd2,ysd3,ysd4;
  if (self.innerHeight)
    {ysd=self.innerHeight;}
  else if (document.documentElement && document.documentElement.clientHeight)
    {ysd=document.documentElement.clientHeight;}
  else if (document.body)
    {ysd=document.body.clientHeight;}
  if (self.pageYOffset)
    {ysd2=self.pageYOffset;}
  else if (document.documentElement && document.documentElement.scrollTop)
    {ysd2=document.documentElement.scrollTop;}
  else if (document.body) 
    {ysd2=document.body.scrollTop;}
  var test1=document.body.scrollHeight;
  var test2=document.body.offsetHeight;
  if (test1>test2)
    {ysd3=document.body.scrollHeight;}
  else 
    {ysd3=document.body.offsetHeight;}  
  if ((ysd3-ysd)<=10)
    {ysd4=1;}
  else
    {
    if (ysd2==0)
      {ysd4=2;}
    else
      {
      if (ysd3-ysd2==ysd)
        {ysd4=3;}
      else
        {ysd4=4;}
      }
    }   
  if (typeof y_pagetitle != 'undefined')
    {autotitle="&pagetitle="+escape(y_pagetitle);}
  else
    {autotitle='';}
  document.pixel.src='http://www.elektrodiscount-24.de/yalst/pixel.php?cookie='+escape(mycookie)+'&sd='+ysd4+'&vtime='+escape(localtime)+'&site=1-1&surl=www.elektrodiscount-24.de&sed=3&smnt=300&ssts=true&sfmn=true&scfm=60&r='+rand(30000)+'&r2='+rand(30000)+'&r3='+rand(30000);
  var redotimeout=9000;
  pa="&localtime="+escape(localtime);
  if (typeof(screen)=="object")
    { 
    pa+="&screenxy="+screen.width+"x"+screen.height;
    pa+="&screencd="+screen.colorDepth;
    }
  if (navigator.javaEnabled())
    {pa+="&java=true";}
 
  if (typeof paSkype != 'undefined')
    {
    if (paSkype>0)
      {pa+="&skype="+paSkype;}
    }     
  height=document.pixel.height;
  width=document.pixel.width;
  if (height==2)
    {
    open_active_livechat('http://www.elektrodiscount-24.de/yalst/invite.php?yinit=true&cookie='+escape(mycookie)+autotitle+ypdp+'&site=1-1&from='+escape(window.document.URL),550,530);
    if (yblocked==1)
      {
      document.pixel.src='http://www.elektrodiscount-24.de/yalst/pixel.php?cookie='+escape(mycookie)+'&blocked=true&site=1-1&surl=www.elektrodiscount-24.de&sed=3&smnt=300&ssts=true&sfmn=true&scfm=60&r='+rand(30000)+'&r2='+rand(30000)+'&r3='+rand(30000);
      yblocked=0;
      }
    }
  if (height==3)
    {
    open_active_livechat('http://www.elektrodiscount-24.de/yalst/pachat.php?yinit=true&cookie='+escape(mycookie)+autotitle+'&site=1-1&from='+escape(window.document.URL)+pa,550,530);
    if (yblocked==1)
      {
      document.pixel.src='http://www.elektrodiscount-24.de/yalst/pixel.php?cookie='+escape(mycookie)+'&blocked=true&site=1-1&surl=www.elektrodiscount-24.de&sed=3&smnt=300&ssts=true&sfmn=true&scfm=60&r='+rand(30000)+'&r2='+rand(30000)+'&r3='+rand(30000);
      yblocked=0;
      }
    }
  if (height==4)
    {
    var now = new Date();
    img="&ref="+escape(window.document.referrer);
    img+="&from="+escape(window.document.URL);
    img+="&r="+now.getTime();
    if (typeof(screen)=="object")
      { 
      img+="&screenxy="+screen.width+"x"+screen.height;
      img+="&screencd="+screen.colorDepth;
      }
    if (navigator.javaEnabled())
      {img+="&java=true";}  
           
    document.supportbutton.src='http://www.elektrodiscount-24.de/yalst/button.php?cookie='+escape(mycookie)+'&site=1-1&ypi=no&count=no'+img;  
    }
  if (height==5)
    {
    open_marketing('http://www.elektrodiscount-24.de/yalst/marketing.php?lang=1&cookie='+escape(mycookie)+'&from='+escape(window.document.URL)+'&site=1-1',10,10);
    if (yblocked==1)
      {
      document.pixel.src='http://www.elektrodiscount-24.de/yalst/pixel.php?cookie='+escape(mycookie)+'&blocked=true&site=1-1&surl=www.elektrodiscount-24.de&sed=3&smnt=300&ssts=true&sfmn=true&scfm=60&r='+rand(30000)+'&r2='+rand(30000)+'&r3='+rand(30000);
      yblocked=0;
      }
    }
  if (height==6)
    {
    posix=ypositionx();
    posiy=ypositiony();
    linvite.location='http://www.elektrodiscount-24.de/yalst/linvite.php?yinit=true&cookie='+escape(mycookie)+ypdp+'&color=000000&site=1-1&from='+escape(window.document.URL);
    document.ltitle.src='http://www.elektrodiscount-24.de/yalst/ltitle.php?cookie='+escape(mycookie)+'&color=000000&site=1-1&r='+rand(30000)+'&r2='+rand(30000)+'&r3='+rand(30000);
    move=setTimeout("yOpenLayer()",2000);
    }  
  if (height==7)
    {yCloseLayer(0);}  
  if (height==8)
     {top.location.href='http://www.elektrodiscount-24.de/yalst/push.php?id='+escape(mycookie)+'&r1='+rand(30000)+'&r2='+rand(30000)+'&r3='+rand(30000)+'&site=1-1';}  
  rd=setTimeout("yredo(0)",redotimeout);
  }
function ycontrol()
  {
  tsnow=new Date();
  ts=Math.round(tsnow.getTime()/1000);
  if (ymtimer<(ts-30))
    {
    clearTimeout(rd);
    rd=setTimeout("yredo(0)",500);
    }
  }  
function open_livechat(urlparm,width,height)
  {
  if (!width) width=500;
  if (!height) height=350;
  Fpopupwindow=open(urlparm,"livechat_1_1","width="+width+",height="+height+",location=no,menubar=no,statusbar=no,scrollbars=no,dependent=no,screenX=20,screenY=20,left=20,top=20");
  if (Fpopupwindow.opener==null) Fpopupwindow.opener=self;
  Fpopupwindow.focus();
  }
function yloop()
  {yredo(1);}
function yalst()
  {
  mycookie=readcookie();
  if (mycookie=="none")
    {
    setcookie('1283990850vN0q2366dS9iZs3v2G1n');
    var newcookie=readcookie();
    if (newcookie=='1283990850vN0q2366dS9iZs3v2G1n')
      {mycookie=newcookie;}
    else
      {mycookie="none";}  
    }
  else
    {
    if (mycookie.length!=30)
      {
      setcookie('1283990850vN0q2366dS9iZs3v2G1n');
      var newcookie=readcookie();
      if (newcookie=='1283990850vN0q2366dS9iZs3v2G1n')
        {mycookie=newcookie;}
      else
        {mycookie="none";} 
      }
    }  
  var today=new Date();
  var localtime=today.getHours()+":"+today.getMinutes();
  pa="&localtime="+escape(localtime);  
  if (typeof y_pagetitle != 'undefined')
    {autotitle="&pagetitle="+escape(y_pagetitle);}
  else
    {autotitle='';}
  if (typeof y_comment != 'undefined')
    {
    if (y_comment.length<=80)
      {addcomment="&comment="+escape(y_comment);}
    else
      {addcomment="&comment="+escape(y_comment.substr(0,80));}
    }
  else
    {addcomment="";} 
  urlstring="http://www.elektrodiscount-24.de/yalst/index.php?yinit=true&site=1-1&cookie="+escape(mycookie)+"&from="+escape(window.document.URL)+autotitle+addcomment;
  img="&ref="+escape(window.document.referrer);
  img+="&from="+escape(window.document.URL);
  img+="&r=1283990850";
  if (ycb_chat>0)
    {img+="&ycb=true";}
  if (ypid==false)
    {
    img+="&ypid=no";
    pa+="&ypid=no";
    }  
  if (typeof(screen)=="object")
    { 
    img+="&screenxy="+screen.width+"x"+screen.height;
    img+="&screencd="+screen.colorDepth;
    pa+="&screenxy="+screen.width+"x"+screen.height;
    pa+="&screencd="+screen.colorDepth;
    }
  if (navigator.javaEnabled())
    {
    img+="&java=true";
    pa+="&java=true";
    }  
  if (typeof extra != 'undefined')
    {y_extra=extra;} 
  if (typeof y_extra != 'undefined')
    {img+="&extra="+escape(y_extra);}
  if (typeof y_remark != 'undefined')
      {img+="&remark="+escape(y_remark);}  
  if (ycampaign())
    {img+="&campaign="+escape(ycampaign());}
  if (ytaf())
    {img+="&ytaf="+escape(ytaf());}    
  if (typeof yct_event != 'undefined')
    {
    if (typeof yct_id != 'undefined')
      {
      img+="&yctevent="+escape(yct_event);
      img+="&yctid="+escape(yct_id);
      img+="&yctref="+escape(yct_ref);
      if (typeof yct_comment != 'undefined')
        {img+="&yctcomment="+escape(yct_comment);}
      if (typeof yct_volume != 'undefined')
        {img+="&yctvolume="+escape(yct_volume);}
      if (typeof yct_tan != 'undefined')
        {img+="&ycttan="+escape(yct_tan);}	
      if (typeof yct_notify != 'undefined')
        {img+="&yctnotify="+escape(yct_notify);} 	
      if (typeof yct_campaign != 'undefined')
        {
	if (yct_campaign=='no')
	  {img+="&yctcampaign=no";}
	}
      }  
    }
  if ((typeof y_cartitems != 'undefined') && (typeof y_cartvalue != 'undefined'))
    {
    img+="&ycitems="+escape(y_cartitems);
    img+="&ycvalue="+escape(y_cartvalue);
    if (typeof y_cartcomplete != 'undefined')
      {
      if (y_cartcomplete)
        {img+="&yccompl=true";} 
      }
    }   
  if ((typeof y_cartitems == 'undefined') && (typeof y_cartvalue == 'undefined') && (typeof y_cartcomplete != 'undefined')) 
    {img+="&yccompl=true";} 
  if (typeof yvm != 'undefined')
    {img+="&yvm="+escape(yvm);}   
  if (typeof yam != 'undefined')
    {img+="&yam="+escape(yam);}   
  if (typeof ytrack != 'undefined')
    {
    ytrackparm='';
    for (var ytrackkey in ytrack)
      {ytrackparm=ytrackparm+ytrackkey+'aadmnk1'+ytrack[ytrackkey]+'aadmnk2';}
    if (ytrackparm)
      {img+="&ytrack="+escape(ytrackparm);}
    }
  else
    {
    if (typeof y_track != 'undefined')
      {
      ytrackparm='';
      for (i=0; i<y_track.length; i++)
        {ytrackparm=ytrackparm+y_track[i][0]+'aadmnk1'+y_track[i][1]+'aadmnk2';}
      if (ytrackparm)
        {img+="&ytrack="+escape(ytrackparm);}
      }
    }    
  var yapostroph = '\x27';
  var yquoteMark = '\x22';
  var yjavaScriptOpen = 'javascript:open_livechat(';
  var ychatDimensions = ',550,530)';
  var aopen = "<a href='javascript:void(0)' title='Live-Support - hier klicken' onClick="; // "'>
  var aopen = aopen + yapostroph + yjavaScriptOpen + yquoteMark + urlstring + yquoteMark + ychatDimensions + yapostroph + '>'; 
  image='<img name="supportbutton" src="http://www.elektrodiscount-24.de/yalst/button.php?cookie='+escape(mycookie)+autotitle+'&site=1-1&ypi=no&t=1283990850'+img+'" border="0">';
  document.write("<!-- yc"+"b -->");
  document.write(aopen);
  document.write(image);
  document.write('</a>');
  document.write('<div id="yalst" style="left:-10px; top:-10px; visibility:hidden;"><img src="http://www.elektrodiscount-24.de/yalst/pixel.php?cookie='+escape(mycookie)+'&site=1-1&surl=www.elektrodiscount-24.de&sed=3&smnt=300&ssts=true&sfmn=true&scfm=60&r=1283990850" name="pixel"></div>');
  document.write('<div id="ylinvite" style="position:absolute; left: -350px; top: -268px; width: 300px; height: 218px; z-index: 9999; border: 0px none #000000; visibility: visible">');
  document.write('<table border="0" cellpadding="0" cellspacing="0" width="300"><tr><td bgcolor="#000000" width="284"><img name="ltitle" src="http://www.elektrodiscount-24.de/yalst/ltitle.php?style=empty&color=000000" height="18" width="284"></td><td bgcolor="#000000" width="16"><a href="javascript:void(0)" onClick="javascript:yCloseLayer(1)" title="schlie&szlig;en"><img src="http://www.elektrodiscount-24.de/yalst/button.close.gif" border="0" height="16" width="16"></a></td></tr></table>'); 
  document.write('<table width="300" border="0" cellspacing="0" cellpadding="0" height="200"><tr>');
  document.write('<td valign="top" align="center" width="200"><iframe src="http://www.elektrodiscount-24.de/yalst/linvite.php?style=empty" width="300" height="200" name="linvite" scrolling="no" frameborder="0" scrollbar="no"></iframe></td>');
  document.write('</tr></table></div>');
  document.write("<!-- yc"+"e -->");
  iv=setInterval("ycontrol()",15000); 
  if (typeof window.addEventListener!='undefined')
    {window.addEventListener('load',yloop,false);}
  else if (typeof document.addEventListener!='undefined')
    {document.addEventListener('load',yloop,false);}
  else if (typeof window.attachEvent!='undefined')
    {window.attachEvent('onload',yloop);}
  else
    {
    if (typeof window.onload=='function')
      {
      var existing=onload;
      window.onload=function()
        {
	existing();
	yloop();
	};
      }
    else
      {window.onload=yloop;}
    }
  }
yalst();
