// POPUP Miembros. Clase popup

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 popuplinks = document.getElementsByTagName("a");
	// loop through each of these links (anchor tags)
	for (var i=0; i < popuplinks.length; i++) {
		// if the link has a class of "popup"...
		if (popuplinks[i].className == "popup") {
			// add an onclick event on the fly to pass the href attribute
			// of the link to our second function, openPopUp
			popuplinks[i].onclick = function() {
			openPopUp(this.getAttribute("href"));
			return false;
			}
		}
		if (popuplinks[i].className == "external") {
			// add an onclick event on the fly to open a new browser window
			popuplinks[i].onclick = function() {
			window.open(this.getAttribute("href"));
			return false;
		   }
		}
	}
	
	// POPUP Fotos. Clase popup2 -->
	
	// create an array of objects of each link in the document
	var popup2links = document.getElementsByTagName("a");
	// loop through each of these links (anchor tags)
	for (var i=0; i < popup2links.length; i++) {
		// if the link has a class of "popup2"...
		if (popup2links[i].className == "popup2") {
			// add an onclick event on the fly to pass the href attribute
			// of the link to our second function, openPopUp2
			popup2links[i].onclick = function() {
			openPopUp2(this.getAttribute("href"));
			return false;
			}
		}
	}
	
	// POPUP Clasificación. Clase popup3 -->

	// create an array of objects of each link in the document
	var popup3links = document.getElementsByTagName("a");
	// loop through each of these links (anchor tags)
	for (var i=0; i < popup3links.length; i++) {
		// if the link has a class of "popup3"...
		if (popup3links[i].className == "popup3") {
			// add an onclick event on the fly to pass the href attribute
			// of the link to our second function, openPopUp3
			popup3links[i].onclick = function() {
			openPopUp3(this.getAttribute("href"));
			return false;
			}
		}
	}
	
	
}

function openPopUp(linkURL) {
window.open(linkURL,'popup','width=480,height=430,scrollbars=no,resizable=no')
}


function openPopUp2(linkURL) {
window.open(linkURL,'popup2','width=900,height=768,scrollbars=yes,resizable=no')
}


function openPopUp3(linkURL) {
window.open(linkURL,'popup3','width=1000,height=768,scrollbars=yes,resizable=yes')
}



