//frame-busting
if (parent.frames.length > 0) {
  var us = self.document.location.href;
  var query = (us.indexOf("?"));

  if (query)
  {
	us = us.substring(0,query);
  }

    parent.location.href = us;
}
//end frame-busting

function gvpop( type, x, y, url ) {
    var p = window.open( url+'&imid=250', '_blank', 'directories=0,height='+y+',width='+x+',hotkeys=0,location=0,menubar=0,resizable=0,scrollbars=0,toolbar=0' );
    if (p) {	
	if ( type == 'under' ) {
	    p.blur();
	    this.focus();
	} else {
	    p.focus();
	}
    }
    return;
}

//right-side floating advertisement code
floatX=10;
floatY=20;
pixelScoot=7;	//the ad will move by this many pixels at a time (smaller number = smoother movement)
minTop=159;  //offset from top of viewable area (leaves room for header)
minBottom=127;	//offset from bottom of viewable area (leaves room for footer)
offsetCenter=186;	//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