
var WindowObjectReference = null; // global variable

function openRequestedPopup(strUrl, strWindowName)
{
	strUrl = "intro.php";
	strWindowName = "showIntro";
	 
  if(WindowObjectReference == null || WindowObjectReference.closed)
  {
    WindowObjectReference = window.open(strUrl, strWindowName, 						"toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=900,height=692");
  }
  else
  {
    WindowObjectReference.focus();
  };
}


function applySelectedTo(link) {
	
	var allDivs = document.getElementById('nypulse_content').getElementsByTagName("div");
	for (var k=0; k<allDivs.length; k++) {
		allDivs[k].className = "";	
	}
	
	var lyricId = link.getAttribute("href").split("#")[1];
	lyricId = document.getElementById(lyricId);
	lyricId.className = "on";
	
	
	var div = document.getElementsByTagName("div")[2]; // get the first ul tag on the page
	var allLinks = div.getElementsByTagName("a"); // get all the links within that ul
	for (var i=0; i<allLinks.length; i++) { // iterate through all those links
		allLinks[i].className = ""; // and assign their class names to nothing
	}
	
	link.className = "selected";  // finally, assign class="selected" to our chosen link
	
}


function applySelectedSchedule(link) {
	
	var allDivs = document.getElementById('schedule').getElementsByTagName("div");
	for (var k=0; k<allDivs.length; k++) {
		allDivs[k].className = "";	
	}
	
	var lyricId = link.getAttribute("href").split("#")[1];
	lyricId = document.getElementById(lyricId);
	lyricId.className = "on";
	
	
	var div = document.getElementsByTagName("div")[2]; // get the first ul tag on the page
	var allLinks = div.getElementsByTagName("a"); // get all the links within that ul
	for (var i=0; i<allLinks.length; i++) { // iterate through all those links
		allLinks[i].className = ""; // and assign their class names to nothing
	}
	link.className = "selected";  // finally, assign class="selected" to our chosen link
	
}


function clearStyle(id) { 
	
    document.getElementById("id").style = ""; 
	
} 





function switchOn (subs) {
		
		ulId = subs.id.replace("top", "sub");
		document.getElementById(ulId).className = document.getElementById(ulId).className == 'yes' ? 'none' : 'yes';
				
}

function checkClick (subs,thisOne) {
				var getAgn = document.getElementById(subs).getElementsByTagName("LI");
				for (var z=0; z<getAgn.length; z++) {
				if (thisOne.id != getAgn[z].id){
				getAgn[z].className = '';
			}
		}
	}

function allOff (subs) {
			var getListSub = document.getElementById(subs).getElementsByTagName("UL");
			for (var s=0; s<getListSub.length; s++) {
					getListSub[s].className = "none";
				}
			}

function switchOff (subs) {
			var getListElts = document.getElementById(subs).getElementsByTagName("UL");
			for (var i=0; i<getListElts.length; i++) {
			if (ulId != getListElts[i].id && getListElts[i].className == "yes"){
					getListElts[i].className = "none";
				}
			}
			var getListSub = document.getElementById(subs).getElementsByTagName("LI");
			for (var s=0; s<getListSub.length; s++) {
					getListSub[s].className = "";
				}
		}

