/*stock market */
function ChangeTxtClass( obj ) {
	if(obj.className == 'TxtGetQuote') {
		obj.value = '';
		obj.className = 'TxtGetQuoteType';
	}
}

/* called on blur */
function CheckTxtClass( obj ) {
	if((obj.className == 'TxtGetQuoteType') && (obj.value == '')) {
		obj.className = 'TxtGetQuote';
		obj.value = 'enter symbol';
	}
}
/*stock market */


/*search */
function ChangeSearchClass( obj ) {
	if(obj.className == 'SearchBox') {
		obj.value = '';
		obj.className = 'SearchBoxType';
	}
}

/* called on blur */
function CheckSearchClass( obj ) {
	if((obj.className == 'SearchBoxType') && (obj.value == '')) {
		obj.className = 'SearchBox';
		obj.value = 'enter search term';
	}
}
/*search */



/* tabbed windows */

function synchTab(frameName) {

  var elList, i;

  // Exit if no frame name was given.

  if (frameName == null)
    return;

  // Check all links.

  elList = document.getElementsByTagName("A");
  for (i = 0; i < elList.length; i++)

    // Check if the link's target matches the frame being loaded.

    if (elList[i].target == frameName) {

      // If the link's URL matches the page being loaded, activate it.
      // Otherwise, make sure the tab is deactivated.

      if (elList[i].href == window.frames[frameName].location.href) {
        elList[i].className += " activeTab";
        elList[i].blur();
      }
      else
        removeName(elList[i], "activeTab");
    }
}

function removeName(el, name) {

  var i, curList, newList;

  if (el.className == null)
    return;

  // Remove the given class name from the element's className property.

  newList = new Array();
  curList = el.className.split(" ");
  for (i = 0; i < curList.length; i++)
    if (curList[i] != name)
      newList.push(curList[i]);
  el.className = newList.join(" ");
}
/* tabbed windows */


/* Live Window Popup */
function xOpenWin() {	myWindow = window.open("livestream.html", "liveWindow", 'width=748,height=623,resizable=0,status=0,location=0,scrollbars=0,left=10,top=10') }	
/* Live Window Popup */

/* Live Window Popup */
function xOpenLiveWin() {	myWindow = window.open("http://cfc.wjla.com/wmvstream.cfm?stat=wjla&file=http://www.wjla.com/rebath_pre.asx", "liveWindow", 'width=748,height=623,resizable=0,status=0,location=0,scrollbars=0,left=10,top=10') }	
/* Live Window Popup */


/* NC8 Live Window Popup */
function xNC8OpenWin() {	myWindow = window.open("livestreamnc8.html", "liveWindow", 'width=748,height=623,resizable=0,status=0,location=0,scrollbars=0,left=10,top=10') }	
/* Live Window Popup */


/* AP Live Window Popup */
function xAPOpenWin() {	myWindow = window.open("aplivestream.html", "liveWindow", 'width=780,height=523,resizable=0,status=0,location=0,scrollbars=0,left=10,top=10') }	
/* Live Window Popup */


/* WJLA AP Live Window Popup */
function WJLA_APOpenWin() {	myWindow = window.open("http://www.wjla.com/aplivestream.html", "liveWindow", 'width=780,height=523,resizable=0,status=0,location=0,scrollbars=0,left=10,top=10') }	
/* Live Window Popup */


function setActiveStyleSheet(style_title) {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == style_title) a.disabled = false;
    }
  }
}

function getActiveStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
  }
  return null;
}