
function win_open(url,win_name,features) {
  top1=(screen.height-455)/2;
  left1=(screen.width-755)/2;
  window.open(url,win_name,features+',top='+top1+',left='+left1);
}

function sell_over(id) {
  document.getElementById('id'+id).className="tbl_over";
}

function sell_out(id) {
  document.getElementById('id'+id).className="tbl_out";
}

function showFloatForm() {
  document.getElementById('div_auth').style.display="block";
}

function showFloatRegForm() {
  document.getElementById('div_reg_auth').style.display="block";
}

function hiddenFloatForm() {
  document.getElementById('div_auth').style.display="none";
  document.getElementById('div_pass').style.display="none";
}

function hiddenFloatPassForm() {
  document.getElementById('div_pass').style.display="none";
}


function hiddenFloatRegForm() {
  document.getElementById('div_reg_auth').style.display="none";
}

function showFloatPassForm() {
  document.getElementById('div_pass').style.display="block";
}


function layer1() {
  document.getElementById('id_1').style.display="block";
  setTimeout("document.getElementById('id_1').style.display='none';", 1000);
}

function addToOrder(id, falias, mode) {
 if (mode == 'collection') {
   document.orderForm.coll_id.value = id;
 }
 
 if (mode == 'tovar') {
   document.orderForm.prod_id.value = id;
 }

  fobj = eval("document.productsForm."+falias);
   if(fobj){
     document.orderForm.q.value = fobj.value;
     //fobj.value="1";
     layer1();
   }
   document.orderForm.submit();
 }
  
 function submitOrderForm() {
   window.frames['cartFrameProduct'].document.orderFrameForm.submit();
   window.frames['cartFrame'].document.orderFrameForm1.submit();
 }

 function submit_order() {
   document.orderFrameForm.submit();
 }

 function submit_order(mode) {
   //parent.main.f2.mode.value=id;
   if (mode == 'edit' || mode == 'to_order') {
        document.orderFrameForm.command.value=mode;
        document.orderFrameForm.submit();
    }
   //parent.main.f2.submit();
 }

  function menuPage(id) {
    if(document.getElementById("layer"+id).style.display == 'none') {
        document.getElementById("layer"+id).style.display = 'block';
      } else {
        document.getElementById("layer"+id).style.display = 'none';
     }
  }

  function MM_openBrWindow(theURL,winName,features) { //v2.0
     window.open(theURL,winName,features);
  }

  function tbl_hover(id) {
    document.getElementById('id'+id).className="tbl_over";
  }

  function check(val) {
    if (val.name.value=='') {
       alert('Введите название');
       val.name.focus();
       return false;
    }

    if (val.price.value=='') {
      alert('Вы не указали цену товара');
      val.price.focus();
      return false;
    }

    if (val.type.value=='') {
      alert('Выберите вид товара');
      val.type.focus();
      return false;
    }

    if (val.valuta.value=='') {
      alert('Укажите валюту товара');
      val.valuta.focus();
      return false;
    }
      val.sb.disabled=true;
  }

  function show_div() {
    if (document.getElementById('auth_div').style.display == "block") {
         document.getElementById('auth_div').style.display="none";    
      } else {
        document.getElementById('auth_div').style.display="block";
    }
  }
  
  function hideMe() {
     document.getElementById('theLayer').style.display="none";
  }

function open_call() {
   document.getElementById("call").style.display = 'block';
}

function close_call() {
   document.getElementById("call").style.display = 'none';
}

