function clearDefault(el) {
      if (el.value == '0') el.value = ""
}

function restoreDefault(el) {
      if (el.value == '') el.value = "0"
}
$(document).ready(function(){
    $("tr:nth-child(odd)").addClass("odd");
    $('.dropdown_menu').hover(function() {
        $('.dropdown').css('display','block');
    }, function() {
        $('.dropdown').css('display','none');
    });
    $('.dropdown').hover(function() {
        $('.dropdown').css('display','block');
    }, function() {
        $('.dropdown').css('display','none');
    });
});

function addBookmark(url, title){ 
  if (!url){
      url = location.href; 
  }
  if (!title){
      title = document.title; 
  }
  
  //Gecko 
  if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")){ 
      window.sidebar.addPanel (title, url, ""); 
  } else if (typeof window.external == "object"){
      window.external.AddFavorite(url, title); 
  }else if (window.opera && document.createElement) { 
    var a = document.createElement('A'); 
    if (!a) return false; //IF Opera 6 
    a.setAttribute('rel','sidebar'); 
    a.setAttribute('href',url); 
    a.setAttribute('title',title); 
    a.click(); 
  } 
  else return false; 
  
  return true; 
}
function min(arg){
    item = $('#item_'+arg);
    value = item.attr('value'); 
    if (value != 0){
        newValue = value - 1;
        item.attr('value',newValue);
    }
}
function pls(arg){
    item = $('#item_'+arg);
    value = item.attr('value'); 
    newValue = parseInt(value) + 1;
    item.attr('value',newValue);
}

