 
 var IE= (navigator.appName=="Microsoft Internet Explorer")?true:false;	
 
function chbackgr1(thisid,trclass){
	document.getElementById(thisid).className = trclass ;
}

function chbackgr(thisid,thisid2,trclass){
	document.getElementById(thisid).className = trclass ;
	document.getElementById(thisid2).className = trclass ;
}

 function fjs_findPos( obj ){
	var pos = Array(0,0);

	if (!obj) return pos;

	while (obj) {
		if (obj.currentStyle) {
			if (obj.currentStyle.position == 'absolute') break;
		} else {
			if (document.defaultView.getComputedStyle(obj, '').getPropertyValue('position') == 'absolute') break;
		}

		var is_div = obj.tagName.toUpperCase() == "DIV" ? true : false;
		pos[0] += obj.offsetLeft - (is_div?obj.scrollLeft:0);
		pos[1] += obj.offsetTop - (is_div?obj.scrollTop:0);

		obj = obj.offsetParent;
	}
	if (navigator.appName=="Microsoft Internet Explorer"){
		//pos[0] = pos[0]+1;
	}


	return pos;
}

function getScrollXY(){
	  var scrOfX = 0, scrOfY = 0;
	  if( typeof( window.pageYOffset ) == 'number' ) {
	    //Netscape compliant
	    scrOfY = window.pageYOffset;
	    scrOfX = window.pageXOffset;
	  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
	    //DOM compliant
	    scrOfY = document.body.scrollTop;
	    scrOfX = document.body.scrollLeft;
	  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
	    //IE6 standards compliant mode
	    scrOfY = document.documentElement.scrollTop;
	    scrOfX = document.documentElement.scrollLeft;
	  }
	  return { x:scrOfX, y:scrOfY };
	}
	
var posban = 0;

function bfxb(){

if(!document.getElementById('banner_fixed')) return false;
	//return false;
	var bb = getScrollXY();
	var tml=posban;
	
	
if( document.getElementById('gbanner_left') ){

	if( bb.y>(300-60)  ){
		var $gbt = ((bb.y - 300 ));
		document.getElementById('gbanner_left').style.top= $gbt+'px';

	} else {
		document.getElementById('gbanner_left').style.top= '-60px';
	
	}

}
	
if( document.getElementById('abanner_right') ){

	if( bb.y>(514)  ){
		var $gbt2 = ((bb.y - 514 ));
		document.getElementById('abanner_right').style.top= $gbt2+'px';

	} else {
		document.getElementById('abanner_right').style.top= '0px';
	
	}

}	
	
	
	
	
	
	
	
	var banH = 110;
	
	//if(IE) banH = 104;
	var hh = (bb.y-106);
		if(hh>banH) hh=banH;
	if( bb.y>106  ){
		
		
		document.getElementById('banner_fixed').style.visibility='visible';

		
		document.getElementById('banner_fixed').style.height=hh+'px';
		document.getElementById('banner_fixed').style.display = 'table-cell';
		document.getElementById('banner_fixed').style.textAlign = 'center';
		document.getElementById('banner_fixed').style.verticalAlign = 'middle';
		
		
	}else if( bb.y<=106 ){
		document.getElementById('banner_fixed').style.visibility='hidden';
		document.getElementById('banner_fixed').style.display = 'none';
		document.getElementById('banner_fixed').style.height=0+'px';
		
		
		
	}
	
	if( bb.y>106 && posban==0 ){
		// document.getElementById('banner_fixed_bottom').appendChild( document.getElementById('banner_top') );
		with ( document.getElementById('banner_fixed') ){
			style.position='fixed';
			style.bottom='10px';
			style.height=hh+'px';
			style.width='760px';
			//style.backgroundColor='#011049';
			style.left='50%';
			style.marginLeft='-376px';
			style.zIndex='199999';
			//style.visibility='hidden';
			//style.display='none';
			style.overflow='hidden';
		}
		posban=1;
	}else if(bb.y<=106 && posban==1 ){
	 	//document.getElementById('inc_banner_top').appendChild( document.getElementById('banner_top') );
	 	with ( document.getElementById('banner_fixed') ){
			style.position='fixed';
			
			style.marginLeft='0px';
			style.bottom='10px';
			style.height='0px';
			style.zIndex='199999';
			style.left='50%';
			style.marginLeft='-376px';
			style.display='none';
			
			//style.backgroundColor='transparent';
		}
		posban=0;
	}

/*
	var bb = getScrollXY();
	var tml=posban;
	if( bb.y>120  ){
		var hh = (bb.y-120)*1.5;
		if(hh>108) hh=108;
		
		document.getElementById('banner_fixed_bottom').style.visibility='visible';
		document.getElementById('banner_fixed_bottom').style.display = 'block';
		document.getElementById('banner_fixed_bottom').style.height=hh+'px';
		
		
	}else if( bb.y<118 ){
		document.getElementById('banner_fixed_bottom').style.visibility='hidden';
		document.getElementById('banner_fixed_bottom').style.display = 'none';
		document.getElementById('banner_fixed_bottom').style.height='0px';
		
		
		
	}
	
	if( bb.y>120 && posban==0 ){
		 document.getElementById('banner_fixed_bottom').appendChild( document.getElementById('banner_top') );
		posban=1;
	}else if(bb.y<118 && posban==1 ){
	 	document.getElementById('inc_banner_top').appendChild( document.getElementById('banner_top') );
		posban=0;
	}
	*/
	//document.getElementById('banner_fixed_bottom').innerHTML = tml;
	//setTimeout('bfxb();',200);
	
	
}


