//run function to allow for multiple onload events
getOLs();
window.onload = function() {
	// check to see that the browser supports the getElementsByTagName method
	// if not, exit the loop 
	if (!document.getElementsByTagName) {
		return false; 
	} 
	// create an array of objects of each link in the document 
	var popupvideo = document.getElementsByTagName("a");
	// loop through each of these links (anchor tags) 	
	for (var i=0; i < popupvideo.length; i++) {	
		// if the link has a class of "popup"...	
		if (popupvideo[i].className == "popupvideo") {	
			// add an onclick event on the fly to pass the href attribute	
			// of the link to our second function, openPopUp 	
			popupvideo[i].onclick = function() {	
			openPopUpVideo(this.getAttribute("href"));	
			return false; 	
			} 	
		}
	} 
	
	var popup700x600 = document.getElementsByTagName("a");
	// loop through each of these links (anchor tags) 	
	for (var i=0; i < popup700x600.length; i++) {	
		// if the link has a class of "popup"...	
		if (popup700x600[i].className == "popup700x600") {	
			// add an onclick event on the fly to pass the href attribute	
			// of the link to our second function, openPopUp 	
			popup700x600[i].onclick = function() {	
			openPopUp700x600(this.getAttribute("href"));	
			return false; 	
			} 	
		}
	}
	
	var popup600x600 = document.getElementsByTagName("a");
	// loop through each of these links (anchor tags) 	
	for (var i=0; i < popup600x600.length; i++) {	
		// if the link has a class of "popup"...	
		if (popup600x600[i].className == "popup600x600") {	
			// add an onclick event on the fly to pass the href attribute	
			// of the link to our second function, openPopUp 	
			popup600x600[i].onclick = function() {	
			openPopUp600x600(this.getAttribute("href"));	
			return false; 	
			} 	
		}
	}
	
	// Used by Admission Form
	var popup820x600 = document.getElementsByTagName("a");
	// loop through each of these links (anchor tags) 	
	for (var i=0; i < popup820x600.length; i++) {	
		// if the link has a class of "popup"...	
		if (popup820x600[i].className == "popup820x600") {	
			// add an onclick event on the fly to pass the href attribute	
			// of the link to our second function, openPopUp 	
			popup820x600[i].onclick = function() {	
			openPopUp820x600(this.getAttribute("href"));	
			return false; 	
			} 	
		}
	}
	
	// Used by Virtual Tour
	var popup720x485 = document.getElementsByTagName("a");
	// loop through each of these links (anchor tags) 	
	for (var i=0; i < popup720x485.length; i++) {	
		// if the link has a class of "popup"...	
		if (popup720x485[i].className == "popup720x485") {	
			// add an onclick event on the fly to pass the href attribute	
			// of the link to our second function, openPopUp 	
			popup720x485[i].onclick = function() {	
			openPopUp720x485(this.getAttribute("href"));	
			return false; 	
			} 	
		}
	}
	
	// Used by Athletic Site
	var popup940x600 = document.getElementsByTagName("a");
	// loop through each of these links (anchor tags) 	
	for (var i=0; i < popup940x600.length; i++) {	
		// if the link has a class of "popup"...	
		if (popup940x600[i].className == "popup940x600") {	
			// add an onclick event on the fly to pass the href attribute	
			// of the link to our second function, openPopUp 	
			popup940x600[i].onclick = function() {	
			openPopUp940x600(this.getAttribute("href"));	
			return false; 	
			} 	
		}
	}
} 

function openPopUpVideo(linkURL) {
window.open(linkURL,'popup','status=1,toolbar=0,titlebar=0,scrollbars=1,width=520,height=400')
}

function openPopUp700x600(linkURL) {
window.open(linkURL,'popup','status=1,toolbar=0,titlebar=0,scrollbars=1,width=700,height=600')
}

function openPopUp820x600(linkURL) {
window.open(linkURL,'popup','status=1,toolbar=0,titlebar=0,scrollbars=1,width=820,height=600')
}

function openPopUp600x600(linkURL) {
window.open(linkURL,'popup','status=1,toolbar=0,titlebar=0,scrollbars=1,width=600,height=600')
}

function openPopUp940x600(linkURL) {
window.open(linkURL,'popup','status=1,toolbar=1,titlebar=1,location=1,scrollbars=1,width=940,height=600')
}

function openPopUp720x485(linkURL) {
window.open(linkURL,'popup','status=1,toolbar=0,titlebar=0,scrollbars=1,width=720,height=485')
}

