function showFlyOutBanner() {
    var $browserWidth = 0;
	var $isIE = false;
	if( window.innerWidth ) { //if FF or Opera
		$browserWidth = window.innerWidth;
	} else { //if IE
		$isIE = true;
		$browserWidth = document.body.clientWidth;
	}
	var $flyOutBanner = document.getElementById( 'banner-flyout' );
	if( $flyOutBanner && !getCookie('banneris_eng') ) {
		var $width = $flyOutBanner.style.width;
		$flyOutBanner.style.left = Math.round( ( $browserWidth/2 ) - ( parseInt($width)/2 ) ) + 'px';
		if( $isIE ) {
			$flyOutBanner.style.position = "absolute";
			window.attachEvent("onscroll", fixShowFlyOutBanner);
			window.attachEvent("onresize", fixShowFlyOutBanner);
		}
		$flyOutBanner.style.display = '';
		setCookie('banneris_eng','1',null,'/');
	}
}

function fixShowFlyOutBanner(){
	document.getElementById("banner-flyout").style.top = parseInt( document.documentElement.scrollTop + 200 ) + "px";
}

function closeFlyOutBanner( $id ) {
	//setCookie( 'popOutBanner', $id + '|', null, '/' );
	document.getElementById( 'banner-flyout' ).style.display = 'none';
}
function getCookie( $name ) {
	var $start = document.cookie.indexOf( $name+"=");
	var $len = $start + $name.length+1;
	if ( !$start && $name != document.cookie.substring( 0, $name.length ) )  {
   		return null;
	}
	if ( $start == -1 ) {
		return null;
	}
	var $end = document.cookie.indexOf(";",$len);
	if ( $end == -1 ) {
		$end = document.cookie.length;
	}
	return unescape(document.cookie.substring($len,$end));
}

function setCookie( $name, $value, $expires, $path, $domain, $secure ) {
    var $cookieString = $name + "=" + escape( $value ) +
       ( ( $expires ) ? ";expires=" + $expires.toGMTString() : "") +
       ( ( $path) ? ";path=" + $path : "") +
       ( ( $domain ) ? ";domain=" + $domain : "") +
       ( ( $secure ) ? ";secure" : "");
    document.cookie = $cookieString;
}
