var subindshown = false;
var qstring = '';

function togglesubind() {	   
   var b = document.getElementById('browseind');
	if (subindshown == false) {
	   b.className = b.className + " showsubind";
	   subindshown = true;
	} else {
	   b.className = b.className.replace(" showsubind", "");
	   subindshown = false;
	}
}

/*
function selectTab(tab, tabOwner) {
   owner = document.getElementById(tabOwner);
   if (owner != null) {
      owner.className = tab.className;
   }
}
*/
function setInd(elem) {
   var el = document.getElementById(elem);
   if (el == null) return;

   var browse = false;
   var refining = false;
   
   var q = window.location.toString();
   var paramstring = q.split("?");
   if (paramstring.length > 1) {
      var params = paramstring[1].split("&");
      for (i=0; i < params.length; i++) {
         param = params[i].split("=");
         paramName = param[0];
         paramValue = param[1];
         if (paramName == 'ind')
         {
            el.className = "refind " + paramValue;
            qstring = qstring + 'ind='+paramValue + "&";
            browse = true;
         } else {
            if (paramName == 'prod') {
               el.className = "refprod " + paramValue;
               qstring = qstring + 'prod='+paramValue + "&";
               browse = true;
            } else {
               if (paramName == 'ref') {
                  qstring = qstring + 'ref=1&';
                  refining = true;
               }
            }
         }
      }
   }

/*   if (browse) {
      if (refining) {
         document.getElementById('breadcrumb').className='refine';
      } else {
         document.getElementById('breadcrumb').className='browse';
      }
   } else {
      if (refining) {
         document.getElementById('breadcrumb').className='refine';
      } else {
         document.getElementById('breadcrumb').className='search';
      }
   }*/
}