﻿function Collapse(a) {

    if (document.getElementById(a).style.display == "") {
        document.getElementById(a).style.display = "none";

    }
    else {
        document.getElementById(a).style.display = "";
    }

}

function pageH() {

    var xScroll, yScroll;

    if (window.innerHeight && window.scrollMaxY) {
        yScroll = window.innerHeight + window.scrollMaxY;
    }

    else if (document.body.scrollHeight > document.body.offsetHeight) {
        yScroll = document.body.scrollHeight;
    }
    else {
        yScroll = document.body.offsetHeight;
    }

    backToTop(yScroll);
}


function backToTop(h) {

    var element, tmp, num;

    element = document.getElementById('btt');

    if (h > 1200) {

        num = Math.floor(h / 500);

        tmp = "";
        for (i = 1; i < num; i++) {
            tmp = tmp + "<div style='margin-top: 450px;'><a href='#top'>Back to Top</a></div>";
        }

        element.innerHTML = tmp
    }

}

function setSize(iframe) {


  
}

