   function sendinfo()
   {
      document.write ('<a href="javascript:sendinfo()"> <img src="icons/mail.gif" align=absMiddle border=0></a> <a href="mailto:info@staber.ru" class="simple"><b>Почта</b></a>&nbsp;&nbsp;');
   }
    var str_login = "Логин";
    var str_password = "Пароль";
    var str_search = "Введите строку";
    function LoginOnFocus(state)  // state = 1 - фокусировка
    {
        if(state) {
          if(auto.login.value == str_login) auto.login.value = "";
          }

        else {
          if(auto.login.value == "") auto.login.value = str_login; }
    }

    function PasswordOnFocus(state)  // state = 1 - фокусировка
    {
        if(state) {
          if(auto.password.value == str_password) auto.password.value = "";
          }

        else {
          if(auto.password.value == "") auto.password.value = str_password; }
    }
    function SearchOnFocus(state)  // state = 1 - фокусировка
    {
        if(state) {
          if(search_form.search_str.value == str_search) search_form.search_str.value = ""; }

        else {
          if(search_form.search_str.value == "") search_form.search_str.value = str_search; }
    }
function openWin(name, width, height)
{
  win = window.open(name,'','top=' + (screen.height/2 - height/2) + ',left=' +
             (screen.width/2 - width/2) + ',width='+width+',height='+height+
              'status=no,toolbar=no,menubar=no,scrollbars=no');
  return win;
}
    function ClickOnToBasket(good_id) {
       elem = document.all?document.all["good_num" + good_id]:document.getElementById("good_num" + good_id);

       openWin("commands.php?command=add_basket&good_id=" + good_id + (elem?("&num="+elem.value):""), 300, 100);
    }
    function ClickOnZoomGood(good_id) {
       openWin("zoom.php?good_id=" + good_id, 700, 500);
    }
    function delivery_on_ch() {
       var price = 0;
       var name = "";

       elem = document.forms?document.forms["order"].delivery_id:document.getElementById("delivery_id");
       opt  = elem.options[elem.selectedIndex];
       price = opt.price;
       name  = opt.text;

       elem = document.all?document.all["delivery"]:document.getElementById("delivery");
       elem1 = document.all?document.all["deliveryname"]:document.getElementById("deliveryname");

       elem1.innerText = name;
       elem.innerText = price;

       elem = document.all?document.all["total"]:document.getElementById("total");
       elem1 = document.all?document.all["sum"]:document.getElementById("sum");

       elem.innerText = Number(elem1.innerText) + Number(price);
    }
    function del_basket(good_id) {
       elem = document.forms?document.forms["order"].delivery_id:document.getElementById("delivery_id");
       if(elem) opt = elem.options[ elem.selectedIndex];

       window.location = "commands.php?command=del_basket&good_id=" + good_id + (elem?("&delivery_id=" + opt.value):"");
    }
    function basket_clear() {
       if(confirm("Вы уверены, что хотите очистить корзину ?" ))
          window.location= "commands.php?command=clear_basket";
    }
    function tostep2() {
       elem = document.forms?document.forms["order"].delivery_id:document.getElementById("delivery_id");
       if(elem) opt = elem.options[ elem.selectedIndex];

       window.location = "order.php?step=1"+(elem?("&delivery_id=" + opt.value):"");
    }
    function exit() {
            window.location = "commands.php?command=exit";
    }
    function fogot_passw() {
       elem = document.forms?document.forms["auto"].login:document.getElementById("login");

       window.location = "user.php?fogot_password=1" + (elem?("&Login="+elem.value):"");
    }
    function del_order(order_id) {
       if(confirm("Вы действительно хотите аннулировать заказ ? "))
           window.location = "commands.php?command=delorder&order_id=" + order_id;
    }
    function setImg(good_id, img) {
       elem = document.all?document.all["img" + good_id]:document.getElementById("img" + good_id);
       elem.src = img;
    }