//right-side floating advertisement code
floatX=10;
floatY=20;
pixelScoot=9;		//the ad will move by this many pixels at a time (smaller number = smoother movement)
minTop=213;		//offset from top of viewable area (leaves room for header)
minBottom=127;		//offset from bottom of viewable area (leaves room for footer)
offsetCenter=240;	//offset ad from center of page by this many pixels

var isIE = 0;
var isFF = 0;
if (document.all){
	var isIE = 1;
}else if (document.getElementById){
	var isFF = 1;
}

function move() {

var pointX = (isFF)? window.pageXOffset : document.body.scrollLeft;
var pointY = (isFF)? window.pageYOffset : document.body.scrollTop;
var adObject = (isFF)? document.getElementById('ad_box') : document.all['ad_box'];
var scrollHeight = document.body.scrollHeight;
var langCode = move.arguments[0];
	
if (lastX==-1 || pixelScoot==0){
	lastX=pointX + floatX;
	lastY=pointY + floatY;
}else{
	if (pointY+floatY>lastY) {lastY=lastY+pixelScoot;}
	if (pointY+floatY<lastY) {lastY=lastY-pixelScoot;}
	if (lastY > scrollHeight-minBottom-adObject.offsetHeight){	//stops ad from displaying any lower than our main content area
	lastY=scrollHeight-minBottom-adObject.offsetHeight; }
	if (lastY < minTop) lastY = minTop;				//stops ad from displaying any higher than our main content area

	if(langCode == "he")
	adObject.style.right=document.body.clientWidth/2+offsetCenter;
	else
	adObject.style.left=document.body.clientWidth/2+offsetCenter;
	adObject.style.top=lastY; } 
	
	setTimeout("move('"+langCode+"')",50); }

function define(){

	floatX = document.body.clientWidth/2+offsetCenter;
	floatY = ifloatY; }

//end right-side floating advertisement code