﻿function viewportheight() {
    var viewportheight;
     // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
     if (typeof window.innerHeight != 'undefined') {
         viewportheight = window.innerHeight
     }
     // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
     else if (typeof document.documentElement != 'undefined'
     && typeof document.documentElement.clientHeight !=
     'undefined' && document.documentElement.clientHeight != 0) {
         viewportheight = document.documentElement.clientHeight
     }
     // older versions of IE
     else {
         viewportheight = document.getElementsByTagName('body')[0].clientHeight
     }
     //alert(viewportheight)
    return viewportheight;
 }

// end viewport functions


function popupScreenDumpLarge(url) {
    var popupWindow = open(url, "PopupScreen", "height=830,width=1060,location=no,menubar=no,scrollbars=auto,status=no,toolbar=no,resize=no");
    return false;
}

var fadeContent;
var opacityContent = 0;
var nextPage;

function fadeIn() {
    if (navigator.appName.toLowerCase()!= 'microsoft internet explorer') {
        clearTimeout(fadeContent);
        //showElement('content');
        opacityContent = opacityContent + 10;

        if (opacityContent <= 100) {
            if (navigator.appName.toLowerCase().indexOf('netscape') != -1) {
                document.getElementById('content').style.opacity = (opacityContent / 100);
            } else {
                document.getElementById('content').style.filter = 'alpha(opacity=' + opacityContent + ')';
            }
            fadeContent = setTimeout("fadeIn();", 100);
        } else {
            return;
        }
    }
}

function fadeOut(link) {
    if (link != null) {
        nextPage = link;
    }
    
        if (nextPage == 'home') {
            document.location = '/index.asp'
        } else {
            document.location = "/" + nextPage + "/index.asp"
        }
  
}
