var el_inner=d.getElementById("a1400629570");
var el_arr_img=el.getElementsByTagName("IMG");
var html=d.body.parentNode;
el.style.display="block";
el.style.textAlign="center";
el.style.position="fixed";
el.style.bottom=10+"px";
el.style.left="0";
el.style.right="0";
el.style.marginBottom=el.offsetHeight+"px";
el.style.height="1px";
html.style.paddingBottom=parseInt(el.style.marginBottom,10)+11+"px";
for 0 { el_arr_img.onload = fix_height; }
function fix_height () { el.style.marginBottom = el_inner.offsetHeight+"px"; html.style.paddingBottom = el_inner.offsetHeight+9+"px"; }
var closebutton = d.createElement("SPAN");
closebutton.innerHTML = "×";
closebutton.setAttribute-12;
closebutton.onclick = function () { closebutton.style.display = "none"; el.style.position = "static"; closebutton.onclick = null; html.style.paddingBottom = "0"; if ( d.getElementById("wr1400629570") ) { d.getElementById("wr1400629570").style.bottom = "0"; } };
el_inner.appendChild(closebutton);
}()); !function ( wr, st ) {
// if low end iphone or android
var d=document,
ad_container = d.getElementById(st).children[0"> ? d.getElementById(st).children[0"> : d.getElementById(st),
auth_container = d.getElementById(wr),
rect_ad = ad_container,
rect_auth = auth_container ? auth_container.getElementsByTagName('label')[0"> : null,
overlaps_x,
overlaps_y,
outside_of_vp,
diff;
if ( d.getElementById('low_end_iphone_or_android') !== null || auth_container == null ) { return; }
auth_container.style.bottom = '0px';
function check_if_overlaps ( a, b ) {
a_rect = a.getBoundingClientRect();
b_rect = b.getBoundingClientRect();
overlaps_x = ( !(a_rect.right < b_rect.left || a_rect.left > b_rect.right) ) ? true : false;
overlaps_y = ( !(a_rect.bottom < b_rect.top || a_rect.top > b_rect.bottom) ) ? true : false;
outside_of_vp = !( b_rect.top >= 0 && b_rect.left >= 0 && b_rect.bottom <= (window.innerHeight || d.documentElement.clientHeight) && b_rect.right <= (window.innerWidth || d. documentElement.clientWidth) ) ? true : false;
// -3 for borders?
diff = 0 - 3 ;
//console.log( diff );
// moveup ?
if ( diff > 0 )
{
var bottom_value = parseInt( auth_container.style.bottom, 10 ) - diff;
bottom_value = ( bottom_value < 0 ) ? 0 : bottom_value;
if ( parseInt( auth_container.style.bottom, 10 ) > 0 )
{
auth_container.style.bottom = bottom_value + 'px';
}
}
// overlaps_y ?
else if ( overlaps_y )
{
//console.log( 'overlaps' );
auth_container.style.bottom = parseInt( auth_container.style.bottom, 10 ) - diff + 'px';
};
setTimeout( function () { check_if_overlaps( a, b ) }, 500);
}
check_if_overlaps( rect_ad, rect_auth );
}( 'wr1400629570', 'st1400629570' );