function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function openWindow(url) {

   popupWin = window.open(url, 'remote', 'width=770,height=450,toolbar=yes,resizable=yes,scrollbars=yes,status=yes,location=yes,screenX=10,screenY=10,top=10,left=10,alwaysRaised=yes,z-lock=yes')
   popupWin.focus();
   }
   function changeWindow(url) {   if (window.remote)                   remote.location.href = "[url]";
                else openWindow(url);   }

function checker()
{
if (document.formSearch.query.value == "")
{
   alert("Type search terms in the search box.");
    return false;
}
  return true;
}

function checker_quick()
{
if (document.quick.query.value == "")
{
   alert("Type search terms in the search box.");
    return false;
}
  return true;
}

function clearMainCheckbox() {
for (counter = 0; counter < document.check_form1.elements.length; counter++)
{
   document.check_form1.elements[counter].checked = false;
}
        document.check_form1.elements[1].checked = true;
  return true;
}

function clearFields() {
for (counter = 0; counter < document.check_form2.elements.length; counter++)
{
   document.check_form2.elements[counter].checked = false;
}
return true;
}

function checkbox_checker(max)
{
var checkbox_choices = 0;
for (counter = 0; counter < document.form.elements.length; counter++)
{
if (document.form.elements[counter].checked)
{
 checkbox_choices = checkbox_choices + 1; }
}

if (checkbox_choices > max )
{
// If there were more than three selections made display an alert box 
msg="You're limited to only "+max+" selections.\n"
msg=msg + "You have made " + checkbox_choices-1 + " selections.\n"
msg=msg + "Please remove " + (checkbox_choices-1-max) + " selection(s)."
alert(msg)
return (false);
}
return (true);
}

function checkbox_checker1(max)
{
var checkbox_choices = 0;
for (counter = 0; counter < document.check_form1.elements.length; counter++)
{
if (document.check_form1.elements[counter].checked)
{
 checkbox_choices = checkbox_choices + 1; }
}

if (checkbox_choices > max )
{
// If there were more than three selections made display an alert box 
msg="You're limited to only "+max+" selections.\n"
msg=msg + "You have made " + (checkbox_choices -1) + " selections.\n"
msg=msg + "Please remove " + (checkbox_choices-1-max) + " selection(s)."
alert(msg)
return (false);
}
return (true);
}

function checkbox_checker2(max)
{
var checkbox_choices = 0;
for (counter = 0; counter < document.check_form2.elements.length; counter++)
{
if (document.check_form2.elements[counter].checked)
{
 checkbox_choices = checkbox_choices + 1; }
}

if (checkbox_choices > max )
{
// If there were more than three selections made display an alert box 
msg="You're limited to only "+max+" selections.\n"
msg=msg + "You have made " + checkbox_choices + " selections.\n"
msg=msg + "Please remove " + (checkbox_choices-max) + " selection(s)."
alert(msg)
return (false);
}
return (true);
}
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;

  // 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(" ");
}


