function checkFlash() {

    if( hasFlash() ) {
        return;
    }

    var headerDiv = document.getElementById( "header73" );
    if( headerDiv != null && headerDiv.style != null ) {
        headerDiv.style.visibility = "hidden";
    }

    headerDiv = document.getElementById( "adsk73-header-html" );
    if( headerDiv != null && headerDiv.style != null ) {
        var html = document.getElementById( "adsk73-noscript" );
        if( html.firstChild ) {
            // Mozilla
            headerDiv.innerHTML = html.firstChild.nodeValue;
        } else {
            // IE6
            headerDiv.innerHTML = html.innerHTML;
        }
    }

}

function hasFlash() {
    var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
    if ( plugin ) {
        var words = navigator.plugins["Shockwave Flash"].description.split(" ");
        for (var i = 0; i < words.length; ++i) {
            if (isNaN(parseInt(words[i])))
                continue;
            var MM_PluginVersion = words[i];
        }
        return MM_PluginVersion >= 7;
    } else if ( navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1 ) ) {
        try {
            oFlash = new ActiveXObject( "ShockwaveFlash.ShockwaveFlash.7" );
        } catch( ex ) {
            return false;
        }
        return oFlash != null;
	}

    return false;
}

function openPopup( url, width, height, name, features ) {

    function addFeature( features, name, value ) {
        if( value == null || value == "" ) {
            return features;
        }
        if( features != "" ) {
            features += ",";
        }
        return features + name + "=" + value;
    }

    if( features == null || features == "") {
        features = "";
        features = addFeature( features, "scrollbars", "yes" );
        features = addFeature( features, "resizable", "yes" );
    }
    if( name == null ) {
        name = "popupWindow";
    }
    if( name == "viewlarger" ) {
        if( width == null || width == "" ) {
            width = 600;
        }
        if( height == null || height == "" ) {
            height = 400;
        }
    }

    features = addFeature( features, "width", width );
    features = addFeature( features, "height", height );
    var popupWindow = window.open( url, name, features );
    popupWindow.focus();

    return false;
}

function setFooter() {
	if (document.getElementById) {
		var windowHeight = document.getElementById('container73').offsetHeight;
		if (windowHeight > 0) {
			var contentHeight = document.getElementById('content').offsetHeight + document.getElementById('header73').offsetHeight;
			var footerElement = document.getElementById('footer');
			var footerHeight  = footerElement.offsetHeight;
			var topValue      = windowHeight - contentHeight;
			if (topValue >= 57) {
				footerElement.style.position = 'relative';
				footerElement.style.top = topValue-footerHeight + 'px';
			}
			else {
				footerElement.style.position = 'static';
			}
		}
	}
}
window.onresize = function() {
	setFooter();
}
