	var nav = navigator.appName;
	// used by everyone to make the "topline" layer visible when necessary
	DHTML = (document.getElementById || document.all || document.layers);
	
	function detectIframe() {
		if(frames && DHTML) {				
			if(frames['city_name_iframe']) {	
				if(frames['city_name_iframe'].location) {
					if(frames['city_name_iframe'].location.href) {
						return;
					}
				}
			}
		}
alert('REDIRECT'); return;
		// did not make it thru rigourous test for iframes
		document.location = '/AboutUs/BroadcastArea/List/';
	}

	// used by top-level page to retrieve handles to object w/in its page
	function getObj(name)
	{
	  // sld: added null state
	  this.obj = null;
	  if (document.getElementById)
	  {  
		  
		// added qualifier (in case sent in bogus element id)
		if (document.getElementById(name)) 
		{
		  this.obj = document.getElementById(name);
		  this.style = document.getElementById(name).style;
		}
	  }
	  else if (document.all)
	  {
		// added qualifier (in case sent in bogus element id)
		if (document.all[name]) 
		{
		  this.obj = document.all[name];
		  this.style = document.all[name].style;
		}
	  }
	  else if (document.layers)
	  {
		// added qualifier (in case sent in bogus element id)
		if (document.layers[name]) 
		{	  
		  this.obj = document.layers[name];
		  this.style = document.layers[name];
		}
	  }
	}	
	
	// used by pages w/in framesets, to retrieve handles to objects w/in the top-level page
	function getParentObj(name)
	{
	
	  // sld: added null state
	  this.obj = null;
	  if (parent.document.getElementById)
	  {  
		  
		// added qualifier (in case sent in bogus element id)
		if (parent.document.getElementById(name)) 
		{
		  this.obj = parent.document.getElementById(name);	  
		  this.style = parent.document.getElementById(name).style;
		}
	  }
	  else if (parent.document.all)
	  {
		// added qualifier (in case sent in bogus element id)
		if (parent.document.all[name]) 
		{
		  this.obj = parent.document.all[name];
		  this.style = parent.document.all[name].style;
		}
	  }
	  else if (parent.document.layers)
	  {
		// added qualifier (in case sent in bogus element id)
		if (parent.document.layers[name]) 
		{	  
		  this.obj = parent.document.layers[name];
		  this.style = parent.document.layers[name];
		}
	  }
	}
	
	
	function vis(val, obj_name)
	{	
		if (!DHTML) return;
		var f = new getParentObj(obj_name);
		// sld: added qualifier to make sure property exists (won't if you have created an empty object)
		if(f.style) f.style.visibility = val;
	}
	
	
	// used by schedule frame jump to individual program info record in "program info" frame.
	var dateShowing;
	var lyrShowing = 'initial';
	function showCityInfo(jumplink) { 
		// get a handle on the document		
		var programInfo = parent.frames['city_info_iframe'].document;
		
		//if(curDate == dateShowing) {	
			// make old layer invisible
			//if(lyrShowing) {	
				var old_lyrObj = new getObjOtherFrame(lyrShowing, programInfo);	
				if(old_lyrObj.obj) {
					old_lyrObj.obj.style.visibility = 'hidden';
				}	
				// make new layer visible
				var new_lyrObj = new getObjOtherFrame(jumplink, programInfo);
					//if(new_lyrObj.obj.style) {
				new_lyrObj.obj.style.visibility = 'visible';
				lyrShowing = jumplink;
					//} else {
						// we might not still have a handle on the old layer, if the user has clicked internal links
						// inside the program window. So, go straight to the page
						//programInfo.location.href = "/Schedule/ProgramData/?date=" + curDate + "&lyr=" + jumplink;
						//dateShowing = curDate;
						//lyrShowing = jumplink;
					//}
			
				//} else {
					// we might not still have a handle on the old layer, if the user has clicked internal links
					// inside the program window. So, go straight to the page
					//programInfo.location.href = "/Schedule/ProgramData/?date=" + curDate + "&lyr=" + jumplink;
					//dateShowing = curDate;
					//lyrShowing = jumplink;
				//}
			
			
			
		/*} else {			
			programInfo.location.href = "/Schedule/ProgramData/?date=" + curDate + "&lyr=" + jumplink;			
			dateShowing = curDate;
			lyrShowing = jumplink;*/
		//}
		
		// set hidden vars for printable url
		//setHiddenPrintableVars(dateShowing, lyrShowing, null);
		
		// make the "program info" header visible
		//vis('visible', 'topline');		
	}

	
	/*function setHiddenPrintableVars(dateShowing, lyrShowing, subtract_date) {
		parent.document.forms["hidden_vars"].input_dateShowing.value = dateShowing;
		parent.document.forms["hidden_vars"].input_lyrShowing.value = lyrShowing;
		parent.document.forms["hidden_vars"].input_subtract_date.value = subtract_date;
	}*/
	
	// get handle on object in other document
	function getObjOtherFrame(name, documentObj)
	{
	  if (documentObj.getElementById)
	  {  		  
		// added qualifier (in case sent in bogus element id)
		if (documentObj.getElementById(name)) 
		{
		  this.obj = documentObj.getElementById(name);
	 
		}
	  }
	  else if (documentObj.all)
	  {
		// added qualifier (in case sent in bogus element id)
		if (documentObj.all[name]) 
		{
		  this.obj = documentObj.all[name];
		 
		}
	  }
	  else if (documentObj.layers)
	  {
		// added qualifier (in case sent in bogus element id)
		if (documentObj.layers[name]) 
		{	  
		  this.obj = documentObj.layers[name];
		}
	  }
	}
			  
			  
	// Higlighting functionality used by "schedule" frame
	// keep track of which td cell is highlighted and what its class name used to be
	var oldClassName;
	var oldTDObj;

    function Highlight(e) {  
		// un-highlight previous row
		Unhighlight();
			
		var r = null;
		if (e.parentNode && e.parentNode.parentNode) {
			r = e.parentNode;
		}
		else if (e.parentElement && e.parentElement.parentElement) {
			r = e.parentElement;
		}
			
		if (r) {
			oldClassName = r.className;
			oldTDObj = r;
			r.className = "highlightrow";
		}
	}
	
    function Unhighlight() {
		// if something had been highlighted, it is now unhighlighted
		if(oldTDObj) {
			oldTDObj.className = oldClassName;
			oldTDObj = null;
			oldClassName = null;
		}
    }	
	

	/*function getPrintableURL(url, params) {	
		myDate = document.forms["hidden_vars"].input_dateShowing.value;
		myjumpLink = document.forms["hidden_vars"].input_lyrShowing.value;
		mysubtract_date = document.forms["hidden_vars"].input_subtract_date.value;
		
		mylocation = url + '?date=' + myDate + '&lyr=' + myjumpLink + '&subtract_date=' + mysubtract_date + params;
	
		document.location = mylocation;
	}*/

	


	

