/*
 * Written September 2000 by David Kim -- unless stated otherwise
 * Various scripts for Biochemistry 440 Webpage
 */


window.status = 'Biochemistry 440 - Introduction to Protein Structure and Intermediary Metabolism';

// Reloads window if resized (For Netscape Users to refresh style sheet properties
if(!window.W) {
  window.onresize = resize;
  window.W = window.innerWidth;
  window.H = window.innerHeight;
}

function printIE(printimg) { // adds print image on IE browsers
	var IE4;
	if (parseInt(navigator.appVersion) >= 4) {
		IE4 = (navigator.appName.indexOf("Microsoft") != -1);
	}
	if (IE4) {
		document.write('<a href="javascript:print()"><font face="Verdana, Arial, Helvetica, Sans-Serif" size=-2>Print this frame </font></a> &nbsp; ');
		document.write('<img src="' + printimg + '" onclick="print()" alt="Print this page" title="Print this page">');
        }
}

function resize() {
    if (W < window.innerWidth ||
        W > window.innerWidth ||
        H > window.innerHeight ||
        H < window.innerHeight )
    {
        window.history.go(0);
    }
} 

var Months = new Array(
        'January',
        'February',
        'March',
        'April',
        'May',
        'June',
        'July',
        'August',
        'September',
        'October',
        'November',
        'December'
        );

var current = new Date();  

function getDate() {
        var day = current.getDate();
        var month = Months[current.getMonth()];
        var year = current.getYear();
        if(navigator.appName == 'Netscape') {
                year = year + 1900;
        }
        var todays_date = month + " " + day + ", " + year;
        return todays_date;
}

