var ADFeeWelCome_5 = "";
var brOK_5=false;
var mie_5=false;
var aver_5=parseInt(navigator.appVersion.substring(0,1));
var aname_5=navigator.appName;
var smallpic_5 = "";
var bigpic_5 = "";
function checkbrOK_5(){
	if(aname_5.indexOf("Internet Explorer")!=-1){
		if(aver_5>=4) brOK_5=navigator.javaEnabled();
		mie_5=true;
	}
 	if(aname_5.indexOf("Netscape")!=-1){
 		if(aver_5>=4) brOK_5=navigator.javaEnabled();
 	}
}

var vmin=2;
var vmax=5;
var vr=2;
var timer1;

function Chip_5(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_5(chipname){
	if(brOK_5){
 		eval("chip="+chipname);
		if(!mie_5){
			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_5) {
			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_5('"+chip.named+"')",100);
	}
}

function stopme_5(chipname){
	if(brOK_5){	//alert(chipname)
		eval("chip="+chipname);
		if(chip.timer1!=null)	{
			clearTimeout(chip.timer1);
			
		}
	}
}


var ADFeeLay_5;
var clickurl_5 = "";	
function ADFeeStart_5(ADFeeLinkADDress,ADFeeImgURL1,ADFeeImgURL2){
	clickurl_5 = ADFeeLinkADDress;
	smallpic_5 = ADFeeImgURL1;
	bigpic_5 = ADFeeImgURL2;	
	checkbrOK_5(); 
	if (mie_5){
		document.write( " <DIV id=ADFeeLay_5 style=\"POSITION: absolute\"> ");
		document.write( " <A href=\"" + clickurl_5 + "\" target=_blank> ");
		document.write( " <IMG border=0 name='Image1' ");
		document.write( " src=\"" + smallpic_5 + " \" ");
		document.write( " onmouseover =\"brOK_5=true;stopme_5('ADFeeLay_5');changeImg_5('" + bigpic_5 + "');\" ");
		document.write( " onmouseout = \"movechip_5('ADFeeLay_5');changeImg_5('" + smallpic_5 + "');\" >");
		document.write( " </A>");
		document.write( " </DIV>");	
	}else{
		document.write("<layer name=ADFeeLay_5  visibility=\"show\" >");
		document.write( " <A href=\"" + clickurl_5 + "\" target=_blank> ");
		document.write( " <IMG border=0 name='Image1' ");
		document.write( " src=\"" + smallpic_5 + " \" ");
		document.write( " onmouseover =\"brOK_5=true;stopme_5('ADFeeLay_5');changeImg_5('" + bigpic_5 + "');\" ");
		document.write( " onmouseout = \"movechip_5('ADFeeLay_5');changeImg_5('" + smallpic_5 + "');\" >");
		document.write( " </A>");
		document.write( " </layer>");
		
	}
	ADFeeLay_5=new Chip_5("ADFeeLay_5",60,80);	
	 if(brOK_5) {
  		movechip_5("ADFeeLay_5");		
	}
}
function changeImg_5(strImgAddress){
	var iLen = 0;
	iLen = strImgAddress.indexOf(" ");
	if ( iLen >0 )
		strImgAddress = strImgAddress.substring(0,iLen);
	Image1.src = strImgAddress;
	Image1.alt = ADFeeWelCome_5;
}