window.onload = setVenuePopups;


function setVenuePopups(){    
    
    if (!document.getElementsByTagName) return false;
    //var test = document.getElementsByTagName("*");
    //alert(test.length);
    //for (var i=0; i<test.length; i++) {
        //alert (test[i].tagName);
    //}    
    var lnks = document.getElementsByTagName("a");
    //alert(lnks.length);
    for (var i=0; i<lnks.length; i++) {
        if ((lnks[i].getAttribute("className") == "popupVenue") || (lnks[i].getAttribute("class") == "popupVenue")) {
            //alert(lnks[i].tagName)
            lnks[i].onclick = function() {
                                popUpVenue(this.getAttribute("href"));
                                return false;
                                }
        }
        
        if ((lnks[i].getAttribute("className") == "popupSeatPlan") || (lnks[i].getAttribute("class") == "popupSeatPlan")) {
			 lnks[i].onclick = function() {
                                popUpSeatPlan(this.getAttribute("href"));
                                return false;
                                }
        }
  
    }
}
    

function popUpVenue(winURL) {
  popupVenue = window.open(winURL,"popupVenue","width=800,height=600,menubar=yes,scrollbars=yes,resizable=yes");
  if (window.focus) {popupVenue.focus()}
} 

function popUpSeatPlan(winURL) {
  popupVenue = window.open(winURL,"popupSeatPlan","width=800,height=600,menubar=yes,scrollbars=yes,resizable=yes");
  if (window.focus) {popupVenue.focus()}
} 