function genLayer(title,subtitle,link,img)
{
	document.write("<DIV id=chip1 style=\"HEIGHT: 80px; POSITION: absolute; WIDTH: 70px; z-index: 3;\" ;return false;\">");
	

	
	
	document.write("<table width=\"196\" height=\"61\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"image/bgi.gif\">");
	document.write("  <tr>");
	document.write("    <td align=\"center\" valign=\"middle\"><table width=\"186\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\">");
	document.write("        <tr> ");
	document.write("          <td width=\"50\" rowspan=\"2\" align=\"center\"><a href=\"" + link + "\" target=\"_blank\"><img src=\"" + img + "\" width=\"46\" height=\"47\"  border=0></a></td>");
	document.write("            <td width=\"140\" align=\"center\"><strong><a href=\"" + link + "\" target=\"_blank\"><font color=\"#FF9900\">" + title + "</font></a></strong></td>");
	document.write("        </tr>");
	document.write("        <tr> ");
	document.write("            <td align=\"center\"><a href=\"" + link + "\" target=\"_blank\"><font color=\"#FF9900\">" + subtitle + "</font></a></td>");
	document.write("        </tr>");
	document.write("      </table></td>");
	document.write("  </tr>");
	document.write("</table>");
	
	

	

	
	
	
	
	
	
	
	document.write("</DIV>");
}

function goUrl(url)
{
	window.open (url,'','width=1024,height=600,scrollbars=yes,resizable=yes,toolbars=1,menubar=1');
}
function pagestart()
{
	checkbrOK();
	chip1=new Chip("chip1",70,80);
	
	if(brOK)
	 {
		movechip("chip1");
		
	 }
}

function checkbrOK()
{if(aname.indexOf("Internet Explorer")!=-1)
   {if(aver>=4) brOK=navigator.javaEnabled();
    mie=true;
   }
 if(aname.indexOf("Netscape")!=-1)
   {if(aver>=4) brOK=navigator.javaEnabled();}
}

var vmin=2;
var vmax=5;
var vr=2;
var timer1;

function Chip(chipname,width,height)
{this.named=chipname;
 this.vx=vmin+vmax*Math.random();
 this.vy=vmin+vmax*Math.random();
 this.w=width;
 this.h=height;
 this.xx=0;
 this.yy=0;
 this.timer1=null;
}

function movechip(chipname)
{
 if(brOK)
  {eval("chip="+chipname);
   if(!mie)
    {pageX=window.pageXOffset;
     pageW=window.innerWidth;
     pageY=window.pageYOffset;
     pageH=window.innerHeight;
    }
   else
    {pageX=window.document.body.scrollLeft;
     pageW=window.document.body.offsetWidth-8;
     pageY=window.document.body.scrollTop;
     pageH=window.document.body.offsetHeight;
    }

   chip.xx=chip.xx+chip.vx;
   chip.yy=chip.yy+chip.vy;

   chip.vx+=vr*(Math.random()-0.5);
   chip.vy+=vr*(Math.random()-0.5);
   if(chip.vx>(vmax+vmin))  chip.vx=(vmax+vmin)*2-chip.vx;
   if(chip.vx<(-vmax-vmin)) chip.vx=(-vmax-vmin)*2-chip.vx;
   if(chip.vy>(vmax+vmin))  chip.vy=(vmax+vmin)*2-chip.vy;
   if(chip.vy<(-vmax-vmin)) chip.vy=(-vmax-vmin)*2-chip.vy;


   if(chip.xx<=pageX)
     {chip.xx=pageX;
      chip.vx=vmin+vmax*Math.random();
     }
   if(chip.xx>=pageX+pageW-chip.w)
     {chip.xx=pageX+pageW-chip.w;
      chip.vx=-vmin-vmax*Math.random();
     }
   if(chip.yy<=pageY)
     {chip.yy=pageY;
      chip.vy=vmin+vmax*Math.random();
     }
   if(chip.yy>=pageY+pageH-chip.h)
     {chip.yy=pageY+pageH-chip.h;
      chip.vy=-vmin-vmax*Math.random();
     }

   if(!mie)
      {eval('document.'+chip.named+'.top ='+chip.yy);
       eval('document.'+chip.named+'.left='+chip.xx);
      }
   else
      {eval('document.all.'+chip.named+'.style.pixelLeft='+chip.xx);
       eval('document.all.'+chip.named+'.style.pixelTop ='+chip.yy);
      }
   chip.timer1=setTimeout("movechip('"+chip.named+"')",200);
  }
}


function stopme(chipname)
{if(brOK)
  {//alert(chipname)
   eval("chip="+chipname);
   if(chip.timer1!=null)
    {clearTimeout(chip.timer1)}
  }
}
