﻿if (screen.width >= 1280) {
	document.write("<link href=\"StyleSheets/MainStyleHi.css\" rel=stylesheet")
} else if (screen.width >= 1024) {
	document.write("<link href=\"StyleSheets/MainStyleMi.css\" rel=stylesheet")
} else {
	document.write("<link href=\"StyleSheets/MainStyleLo.css\" rel=stylesheet")
}
var theImages = new Array()
theImages[0] = 'Images/ImageNatSci1'
theImages[1] = 'Images/ImageNatSci1_2'
theImages[2] = 'Images/ImageNatSci2Day'
theImages[3] = 'Images/ImageNatSci2Night'
theImages[4] = 'Images/ImageMcGaughDay'
theImages[5] = 'Images/ImageSteinhausDay'
theImages[6] = 'Images/ImageMcgaughNight'
var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
	 preBuffer[i] = new Image()
	 preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
	if (screen.width >= 1280) {
		document.write('<img src=\"'+theImages[whichImage]+'Hi.jpg\" alt=\"BioSci Building Image\" width=\"750\" height=\"490\">');
	} else if (screen.width >= 1024) {
		document.write('<img src=\"'+theImages[whichImage]+'Mi.jpg\" alt=\"BioSci Building Image\" width=\"540\" height=\"350\">');
	} else {
		document.write('<img src=\"'+theImages[whichImage]+'Lo.jpg\" alt=\"BioSci Building Image\" width=\"430\" height=\"280\">');
	}
}
function showImageDNA(){
	if (screen.width >= 1280) {
		document.write('<img src=\"Images/DNABackgroundImageHi.jpg\" alt=\"DNA Background Image\" width=\"280\" height=\"240\">');
	} else if (screen.width >= 1024) {
		document.write('<img src=\"Images/DNABackgroundImageMi.jpg\" alt=\"DNA Background Image\" width=\"235\" height=\"200\">');
	} else {
		document.write('<img src=\"Images/DNABackgroundImageLo.jpg\" alt=\"DNA Background Image\" width=\"190\" height=\"160\">');
	}
}
function showTable(){
	if (screen.width >= 1280) {
		document.write('<table cellpadding=\"0\" cellspacing=\"0\" width=\"749\" class=\"mpCalendarNewsInner\">');
	} else if (screen.width >= 1024) {
		document.write('<table cellpadding=\"0\" cellspacing=\"0\" width=\"539\" class=\"mpCalendarNewsInner\">');
	} else {
		document.write('<table cellpadding=\"0\" cellspacing=\"0\" width=\"429\" class=\"mpCalendarNewsInner\">');
	}
}