/* search box toggle */
/* search box toggle */
/* search box toggle */
function searchToggle() 
{
  if (document.getElementById("searchbox").value == "")
  {
    document.getElementById("searchbox").value = "HCCS Course Finder";
  }
}






/* 2nd sub-menu levels */
/* 2nd sub-menu levels */
/* 2nd sub-menu levels */
menu_status = new Array();

function showHide(theid)
{
  if (document.getElementById)
  {
    var switch_id = document.getElementById(theid);

    if(menu_status[theid] != 'show')
	{
      switch_id.className = 'show';
      menu_status[theid] = 'show';
    }
	/*
	else
	{
      switch_id.className = 'hide';
      menu_status[theid] = 'hide';
    }*/
  }
}






/* drop-down fix for IE6 */
/* drop-down fix for IE6 */
/* drop-down fix for IE6 */

/*
sfHover = function() 
{
   var sfEls = document.getElementById("navbar").getElementsByTagName("li");
   for (var i=0; i<sfEls.length; i++)
   {
      sfEls[i].onmouseover=function()
	  {
	     this.className+=" sfhover";
	  }
	  
	  sfEls[i].onmouseout=function()
	  {
	     this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
      }
   } 
} 

if (window.attachEvent) window.attachEvent("onload", sfHover);

*/






/* footer icons */
/* footer icons */
/* footer icons */
if (document.images) /* webinar schedule */
{
  webinariconup = new Image();
  webinariconup.src = "/img/footer/footer_webinar_lo.gif";

  webinaricondown = new Image();
  webinaricondown.src = "/img/footer/footer_webinar_hi.gif";
}

function buttondown(webinaricon)
{
  if (document.images)
  {
    document[webinaricon].src = eval(webinaricon + "down.src");  
  }
}

function buttonup(webinaricon)
{
  if (document.images)
  {
    document[webinaricon].src = eval(webinaricon + "up.src");  
  }
}


if (document.images) /* course catalog */
{
  catalogiconup = new Image();
  catalogiconup.src = "/img/footer/footer_catalog_lo.gif";

  catalogicondown = new Image();
  catalogicondown.src = "/img/footer/footer_catalog_hi.gif";
}

function buttondown(catalogicon)
{
  if (document.images)
  {
    document[catalogicon].src = eval(touricon + "down.src");  
  }
}

function buttonup(catalogicon)
{
  if (document.images)
  {
    document[catalogicon].src = eval(catalogicon + "up.src");  
  }
}


if (document.images) /* take the tour */
{
  touriconup = new Image();
  touriconup.src = "/img/footer/footer_tour_lo.gif";

  touricondown = new Image();
  touricondown.src = "/img/footer/footer_tour_hi.gif";
}

function buttondown(touricon)
{
  if (document.images)
  {
    document[touricon].src = eval(touricon + "down.src");  
  }
}

function buttonup(touricon)
{
  if (document.images)
  {
    document[touricon].src = eval(touricon + "up.src");  
  }
}


if (document.images) /* request a free demo */
{
  demoiconup = new Image();
  demoiconup.src = "/img/footer/footer_demo_lo.gif";

  demoicondown = new Image();
  demoicondown.src = "/img/footer/footer_demo_hi.gif";
}

function buttondown(demoicon)
{
  if (document.images)
  {
    document[demoicon].src = eval(demoicon + "down.src");  
  }
}

function buttonup(demoicon)
{
  if (document.images)
  {
    document[demoicon].src = eval(demoicon + "up.src");  
  }
}


if (document.images) /* contact us */
{
  contacticonup = new Image();
  contacticonup.src = "/img/footer/footer_contact_lo.gif";

  contacticondown = new Image();
  contacticondown.src = "/img/footer/footer_contact_hi.gif";
}

function buttondown(contacticon)
{
  if (document.images)
  {
    document[contacticon].src = eval(contacticon + "down.src");  
  }
}

function buttonup(contacticon)
{
  if (document.images)
  {
    document[contacticon].src = eval(contacticon + "up.src");  
  }
}





















var quoteArray = new Array();
var currentQuote = 0;
function changeQuote(quoteNum)
{
  //alert(quoteNum + " " + quoteArray.length); ';
	  if(quoteNum >= quoteArray.length){ quoteNum = 0; }
	  
	  else if(quoteNum < 0){ quoteNum = quoteArray.length - 1; }
	  
	  //alert(quoteNum + " " + quoteArray.length);
	  var currentQuoteHTML = "&quot;" + quoteArray[quoteNum].toString().split("|")[0] + "&quot;<br />";
      var currentQuoteByHTML = "<br /><i>--" + quoteArray[quoteNum].toString().split("|")[1] + "</i>";
	  document.getElementById("div_currentQuote").innerHTML = currentQuoteHTML;
	  document.getElementById("div_currentQuoteBy").innerHTML = currentQuoteByHTML;
	  currentQuote = quoteNum;
}




/* new function */
/* new function */
/* new function */
	function scrollImage(newImg) {
		if(newImg < 0){ return; }
		if(newImg >= ssImages.length){ return; }

		document.getElementById("ssImg").src = ssImages[newImg];
		document.getElementById("ssText").innerHTML = (newImg + 1) + " of " + ssImages.length;
		currentImg = newImg;
	}