
function win_open(url,win_name,features) {
  top1=(screen.height-685);
  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 hideMe() {
  document.getElementById('theLayer').style.display="none";
}

 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 order(mode)  {
     top.document.location="index.php?mode=order&action="+mode;
  } 