﻿if (window.addEventListener) { window.addEventListener("load", InitPage, false); } else { window.attachEvent("onload", InitPage); }
function InitPage() { if (document.all) { document.getElementById('divDetails').style.width = (getWindowWidth() - 18) + "px"; } else { document.getElementById('tblWFBHeader').style.width = '100%'; } setPositionScrollAds(null, 770, 180, 405); }
function setPositionScrollAds(obj, content_w, ads_w, ads_t) {
    //if (!document.all) { content_w = content_w - 20 }
    var scroll_t = 0;
    //if (obj != null) { if (obj.scrollTop <= ads_t) scroll_t = ads_t; else scroll_t = obj.scrollTop; } else scroll_t = ads_t;
    var scroll_h = 0;
    if (obj != null) {
        if (obj.scrollTop <= ads_t) {
            scroll_t = ads_t; scroll_h = 0;
        }
        else {
            scroll_t = obj.scrollTop; scroll_h = obj.scrollHeight
        }
    } else scroll_t = ads_t;
    if (scroll_h - 636 > 0) {
        if (scroll_t > scroll_h - 636)
            scroll_t = scroll_h - 636;
    }
    if (!document.all) { scroll_t = scroll_t + 5 }
    var ads_l = (content_w - ads_w) + ((getWindowWidth() - content_w) / 2); if (getWindowWidth() - content_w < 0) ads_l = content_w - ads_w;
    if (ads_l < 635) ads_l = 635;
    if (document.all) {
        document.all.divAdFloater.style.visibility = 'visible';
        document.all.divAdFloater.style.pixelLeft = ads_l;
        document.all.divAdFloater.style.pixelTop = scroll_t;
    }
    else if (document.layers) {
        document.divAdFloater.visibility = 'show';
        document.divAdFloater.left = ads_l;
        document.divAdFloater.top = scroll_t;
    }
    else if (document.getElementById) {
        document.getElementById('divAdFloater').style.visibility = 'visible';
        document.getElementById('divAdFloater').style.left = ads_l + 'px';
        document.getElementById('divAdFloater').style.top = scroll_t + 'px';
    }
}
function getWindowWidth() { return f_filterResults(window.innerWidth ? window.innerWidth : 0, document.documentElement ? document.documentElement.clientWidth : 0, document.body ? document.body.clientWidth : 0); }
function f_filterResults(n_win, n_docel, n_body) {
    var n_result = n_win ? n_win : 0;
    if (n_docel && (!n_result || (n_result > n_docel))) n_result = n_docel;
    return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}
function go(sURL) { sURL = 'GetResource.aspx?source=wfb&key1=/geos/' + sURL; location.href = sURL; }
