var brOK = false;
var mie = false;
var aver = parseInt(navigator.appVersion.substring(0,1));
var aname = navigator.appName;

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();
	}

	brOK = true;
}

var vmin=2;
var vmax=5;
var vr=2;
var timer1;

function Chip(chipname, width, height,x, y)
{
	this.named = chipname;
	this.id = chipname;
	this.vx = vmin + vmax*Math.random();
	this.vy = vmin + vmax*Math.random();
	this.w = width;
	this.h = height;
	//this.xx = 0;
	this.xx = x;
	//this.yy = 0;
	this.yy = y;
	this.timer1 = null;
}

function movechip(chipname)
{
	if(brOK)
	{
		eval("chip=" + chipname + ";");
		if(!mie)
		{
			pageX = window.pageXOffset;
			pageW = window.innerWidth - 50;
			pageY = window.pageYOffset;
			pageH = window.innerHeight - 50;
		}
		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); 
		}
		*/

		document.getElementById(chip.id).style.left = chip.xx;
		document.getElementById(chip.id).style.top = chip.yy;

		chip.timer1=setTimeout("movechip('"+chip.named+"')", 100);
	}
}

function stopme(chipname)
{
	if(brOK)
	{
		eval("chip=" + chipname + ";");
		if(chip.timer1!=null)
		{
			clearTimeout(chip.timer1);
		}
	}
}


//
<!--  Written by Myhyli, 2003/07/21. myhyli.blueidea.com  -->
<!--  Member Of Blueidea Web Team. -->
<!--  Welcome to www.blueidea.com. -->

var delta=0.8;
var collection;
var closeB=false;
var coupletTimerID;
function floaters() 
{
	this.items	= [];
	this.addItem = function(ItemID,id,x,y,content)
	{
		document.getElementById(ItemID).insertAdjacentHTML('afterBegin', '<DIV id='+id+' style="Z-INDEX: 10; POSITION: absolute;  width:80px; height:60px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'">'+content+'</DIV>');
		var newItem				= {};
		newItem.object			= document.getElementById(id);
		newItem.x				= x;
		newItem.y				= y;
		this.items[this.items.length] = newItem;
	}
	
	this.play = function()
	{
		collection				= this.items			
		if(screen.width<1000)
		{
			for(var i=0;i<collection.length;i++)
			{
				collection[i].object.style.display	= 'none';
			}
			return;
		}
		else
		{
			coupletTimerID = setInterval('play()',30);
		}
	}
}
function play()
{
	if(document.body.clientWidth<1000)
	{
		if (collection[0].object.style.display	== 'none') return;
		for(var i=0;i<collection.length;i++)
		{
			collection[i].object.style.display	= 'none';
		}
		return;
	}
	else if (collection[0].object.style.display	== 'none')
	{
		for(var i=0;i<collection.length;i++)
		{
			collection[i].object.style.display	= '';
		}
	}
	for(var i=0;i<collection.length;i++)
	{
		var followObj		= collection[i].object;
		var followObj_x		= (typeof(collection[i].x)=='string'?eval(collection[i].x):collection[i].x);
		var followObj_y		= (typeof(collection[i].y)=='string'?eval(collection[i].y):collection[i].y);

		if(followObj.offsetLeft!=(document.body.scrollLeft+followObj_x))
		{
			var dx=(document.body.scrollLeft+followObj_x-followObj.offsetLeft)*delta;
			dx=(dx>0?1:-1)*Math.ceil(Math.abs(dx));
			followObj.style.left=followObj.offsetLeft+dx;
		}

		if(followObj.offsetTop!=(document.body.scrollTop+followObj_y))
		{
			var dy=(document.body.scrollTop+followObj_y-followObj.offsetTop)*delta;
			dy=(dy>0?1:-1)*Math.ceil(Math.abs(dy));
			followObj.style.top=followObj.offsetTop+dy;
		}
		followObj.style.display	= '';
	}
}	
function closeBanner()
{
	closeB=true;
	window.clearInterval(coupletTimerID);
	document.getElementById('divPanel').innerText = '';
	return;
}

var theFloaters		= new floaters();

function LoadCoupletAd()
{
	/*
	theFloaters.addItem('divPanel','followDiv1','Math.round((document.body.clientWidth-780)/2)-108',115,'<div align="center" ><img src="images/ad_left_right.gif" width="80" height="300" border="0"></div>');
	theFloaters.addItem('divPanel','followDiv2','Math.round((document.body.clientWidth-780)/2)+780+28',115,'<img src="images/ad_left_right.gif" width="80" height="300" border="0">');
	theFloaters.play();	
	*/
}