<!--

function changeTab(tab) {
	if (document.all) {
		document.all.peops.style.backgroundImage = "url(http://images.forbes.com/media/design/quotebg1.gif)";
		document.all.comps.style.backgroundImage = "url(http://images.forbes.com/media/design/quotebg1.gif)";
		document.all.looks.style.backgroundImage = "url(http://images.forbes.com/media/design/quotebg1.gif)";
		document.all.peops.style.borderColor = "#ffffff";
		document.all.comps.style.borderColor = "#ffffff";
		document.all.looks.style.borderColor = "#ffffff";
		document.all(tab).style.backgroundImage = "url(http://images.forbes.com/media/design/quotebg2.gif)";
		document.all(tab).style.borderColor = "#ffffff";
		if (tab == "peops") {
			document.all.thisContent.innerHTML  = searchPeops;
		} else if (tab == "looks") {
			document.all.thisContent.innerHTML  = searchLooks;
		} else {
			document.all.thisContent.innerHTML  = searchComps;
		}
	}
}

function clearTextField(inputField1,inputField2) {
   inputField1.value = "";
   	if (inputField2 != "none") {
   		inputField2.value = "";
   	}
}


function submitTicker(thisForm) {
	
   var userInput = escape( document[thisForm].Symbol.value );

   if( (userInput == null) || (userInput == "") ) {
      return false;
   } 
   else {
      // Possible destinations in drop-down
      var lookups = new Array();
      // Quote
      lookups[0] = "";
      // News
      lookups[1] = "/markets/company_news.jhtml?ticker=" + userInput;
      // Events Lookup
      lookups[2] = "/finance/eventcalendar/OneCompanyEvents.jhtml?symbol=" + userInput;
			// Advance Chart
			lookups[3] = "http://www.forbes.com/finance/mktguideapps/compinfo/AdvancedChart.jhtml?symbol=" +  userInput;
		  // Executives (Netscape only)
      lookups[4] = "/peopletracker/results.jhtml?startRow=0&name=&ticker=" + userInput;
      // Symbol Lookup (Netscape only)
      lookups[5] = "/markets/SymbolLookup.jhtml?passName=" + userInput;
      
      
      if( (userInput.length == 5) && ( (userInput.charAt(4) == "X") || (userInput.charAt(4) == "x") ) ) {
         lookups[0] = "/funds/Tearsheet.jhtml?tkr=" + userInput.toUpperCase();
      } 
      else {
         lookups[0] = "/finance/mktguideapps/compinfo/CompanyTearsheet.jhtml?tkr=" + userInput;
      }


      // Get the selected option
      var selection = document[thisForm].options.selectedIndex;

      // Do the lookup
      window.location = lookups[selection];

      // Form should not submit since we are taking care of everything in the javascript
      return false;

  }
}

function checkKeywordLength()
{
  var keywordInput = escape(document.keywordLookup.passName.value);
  if (keywordInput==null || keywordInput.length < 2) {
    var msg = "Please enter at least two characters and try your search again.";
    alert (msg);
    return false;
  }

  return true;
}


//-->

