﻿//GLOBALS
var screenWidthRight;
var screenHeightRight;
var beokAreaRight;
var divWidthRight;

function _$o(id){
    return document.getElementById(id);
};

function CheckScreenRight(){
    _$o('bannerRight').style.left=windowWidthRight();
   try{
    //IE6, IE7, FF
    ScreenArealeftRight();
    if (windowWidthRight() < 800){
	    _$o('bannerRight').style.visibility = 'hidden';
	    _$o('bannerRight').style.display = 'none';
	}
    else{
	    _$o('bannerRight').style.visibility = 'visible';
	    _$o('bannerRight').style.display = 'block';
    }
   }
   catch(e){}
};

function windowWidthRight(){
    return (window.innerWidth) || (document.documentElement && document.documentElement.offsetWidth + 21) || (document.body && document.body.offsetWidth);
};

function getBodyScrollTopRight(){
    return (self.pageYOffset) || (document.documentElement && document.documentElement.scrollTop) || (document.body && document.body.scrollTop);
};

function ScreenArealeftRight(){
    var mainTableLefLocation=_$o('MainInnerTd4542').scrollLeft;
    screenWidthRight=windowWidthRight();
    screenHeightRight=screen.height;
    divWidthRight=110;//_$o('bannerRight').style.width;
    beokAreaRight=parseInt(_$o('MainInnerTable4542').style.width);//748;
   
    //alert(navigator.userAgent);
    var nav=navigator.userAgent;
    var exp = new RegExp('MSIE 6.0','ig');
    if(nav.match(exp)){
        _$o('bannerRight').style.left=(beokAreaRight+((screenWidthRight-beokAreaRight)/2))-10+'px';//(wd)+"px";
    }
    else{
        _$o('bannerRight').style.left=(beokAreaRight+((screenWidthRight-beokAreaRight)/2))+ 10 +'px';//(wd)+"px";
    }
};

ScreenArealeftRight();
