/////////////////////////////////////////////////////////////
var initCategory;
var theCategory;
var selectCategory;
var selectLinks;

if (location.search) {
     initCategory =  location.search.substring(1);
     document.write('<SCR'+'IPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="scripts/links_'+initCategory+'.js"></SCR'+'IPT>');
     }

/////////////////////////////////////////////////////
function reloadCatPage(){
          selectCategory = document.multiForm.category;
          theCategory = selectCategory.options[selectCategory.selectedIndex].value;
          location.href = location.pathname+'?'+theCategory;
}


/////////////////////////////////////////////////////
function loadCategory() {if (initCategory) {
          selectCategory = document.multiForm.category;
          selectLinks = document.multiForm.links;
               selectLinks.options.length = 0;
               for(var i=0; i<eval(initCategory+1).length; i++)
               selectLinks.options[selectLinks.options.length] = new Option(eval(initCategory+2)[i]);selectLinks.options[0].selected = true;
           }
}

/////////////////////////////////////////////////////
function multiReset() {document.multiForm.reset();}

/////////////////////////////////////////////////////
function multiSelectValue() {return document.multiForm.links.selectedIndex;}

/////////////////////////////////////////////////////
function multiLink()      {
          selectCategory = document.multiForm.category;
               if (selectCategory.options[selectCategory.selectedIndex].value == 0)
                         {theCategory = initCategory;}
               else      {theCategory = selectCategory.options[selectCategory.selectedIndex].value;}
     window.open(eval(theCategory+1)[multiSelectValue()],theCategory)
     }

/////////////////////////////////////////////////////
function multiDesc()  {
          selectCategory = document.multiForm.category;
               if (selectCategory.options[selectCategory.selectedIndex].value == 0)
                         {theCategory = initCategory;}
               else      {theCategory = selectCategory.options[selectCategory.selectedIndex].value;}
     document.multiForm.DesBox.value = eval(theCategory+3)[multiSelectValue()] ? eval(theCategory+3)[multiSelectValue()] : eval(theCategory+2)[multiSelectValue()];
     document.multiForm.URLBox.value = eval(theCategory+1)[multiSelectValue()];
}
