/* popUp script
Developer: Patrick Beeson
Created: 08/29/06
*/

// Soundslides popup function
function soundslideOpen (winURL) {
	window.open(winURL,"soundslide_popup","width=740,height=670");
}

// Photogallery popup function
function photogalleryOpen (winURL) {
	window.open(winURL,"photogallery_popup","width=645,height=725");
}

// Contact online form popup function
function contactonlineOpen (winURL) {
	window.open(winURL, "contactonline_popup","width=500,height=400");
}

// Actual popup function
function popUp() {
	if (!document.getElementsByTagName) return false;
	var lnks = document.getElementsByTagName("a");
	for (var i=0; i<lnks.length; i++) {
		if (lnks[i].className == "soundslide_popup") {
			lnks[i].onclick = function() {
				soundslideOpen(this.getAttribute("href"));
				return false;
			}
		}
		else if (lnks[i].className == "photogallery_popup") {
				lnks[i].onclick = function() {
				photogalleryOpen(this.getAttribute("href"));
				return false;
			}
		}
		else if (lnks[i].className == "lakewebcam_popup") {
				lnks[i].onclick = function() {
				lakewebcamOpen(this.getAttribute("href"));
				return false;
			}
		}
		else if (lnks[i].className == "contactonline_popup") {
				lnks[i].onclick = function() {
				contactonlineOpen(this.getAttribute("href"));
				return false;
			}
		}	
	}
}
