var useragent = navigator.userAgent;
var isIE6 = false;

if (useragent.indexOf("MSIE 6") != -1) 
{
	isIE6 = true;
}

function highlight(elt)
{
  elt.className = 'highlight';
}

function dehighlight(elt)
{
  elt.className = '';
}

function openHelp(content)
{
  if (content == "myiq")
  {
	document.getElementById('help_content').innerHTML = "<p>MyIQ is a feature of IdiomQuest.com that lets you create and share idiom Study Lists with your colleagues.</p><p>To share your Study List with your colleagues and friends, use the <u>Invite</u> function above the navigation bar after you sign in to the site.<img src=\"/images/MyIQ_Invite.jpg\" alt=\"MyIQ Invitation Help\"/></p><p><a href='/faq/#MyIQ'>Click here</a> for business and academic applications of MyIQ Study Lists.<p>Currently, we support 1 Study List per user, and up to 25 idioms per Study List.  Friends you invite to the site will be able to view your list, as well as the IdiomQuest.com system Study Lists we created to highlight important idioms for you.</p>";
  }
  if (content == "search")
  {
	document.getElementById('help_content').innerHTML = "<p><b>Idiom Search and Browse</b></p><p>Lookup idioms with any search option or filter, or browse idioms by starting letter.</p><p>The search options are mutually exclusive, with the exception of the Speech Filters with which you can select both a Context and a Category.</p><p>Please see our <a href='/faq/'>FAQ</a> page to learn about all of our search options.</p>";
  }
  document.getElementById('help').style.display = "block";

  if (isIE6)
  {
     ie6SelectBoxes("hidden");
  }
}

function closeHelp()
{
  document.getElementById('help').style.display = "none";
  if (isIE6)
  {
     ie6SelectBoxes("visible");
  }
}

function ie6SelectBoxes(action)
{
  if (document.getElementById('Context')) document.getElementById('Context').style.visibility = action;
  if (document.getElementById('Category')) document.getElementById('Category').style.visibility = action;
  if (document.getElementById('SelLang')) document.getElementById('SelLang').style.visibility = action;
  if (document.getElementById('Study-List')) document.getElementById('Study-List').style.visibility = action;
}