<!--

sfHover = function() {
  var sfEls = document.getElementById("navdd").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);


function checkform(f) {
   if (f.Category.value == ''){
     alert ('please enter a new category');
     return false;
   }
   else {
     return true;
   }
}

function checkitem(f) {
   if ((f.Category.value == '')||(f.Price.value == '')){
     alert ('please enter a new item');
     return false;
   }
   else {
     return true;
   }
}

function selchange() {
  var r_sel=parent.thehead.document.r_form.r_select;
  var d=parent.thebody.additemform;
  parent.thebody.document.location='additembody.php?theindex=' + r_sel.selectedIndex;
}

function editcat(catid) {
  var w=window.open('editcat.php?thecat='+catid,'viewwin','width=500,height=300,left=0,top=0,titlebar=no,menubar=no,location=no,resizable=no,scrollbars=no,toolbar=no','false');
  var d=w.document;
  w.focus(); 
}

function edititem(itemid,theindex) {
  var w=window.open('edititem.php?theitem='+itemid+'&theindex='+theindex,'viewwin','width=500,height=300,left=0,top=0,titlebar=no,menubar=no,location=no,resizable=no,scrollbars=no,toolbar=no','false');
  var d=w.document;
  w.focus(); 
}


function OnButtonGoTo(theForm,thePage) {
  document.forms[theForm].action = thePage;
  document.forms[theForm].submit();
  return true;
}


//-->