function m_menu_item_show_active(obj){
  temp=layer(obj.id);
  temp.setBgColor("#b6bdd2");
  temp.style.borderColor="#0a246a";
  temp.style.borderStyle="solid";
  temp.style.borderWidth="1px";}

function m_menu_item_show_not_active(obj){
  temp=layer(obj.id);
  temp.setBgColor("#dbd8d1");
  temp.style.borderColor="#dbd8d1";
  temp.style.borderStyle="solid";
  temp.style.borderWidth="1px";}

function check_category_params(value){
  checkbox=document.forms[0].elements['param_name_'+value];
  input=document.forms[0].elements['param_order_'+value];
  if (checkbox.checked) input.disabled=false;
  else input.disabled=true;}

function getMyWindowWidth(w){
  if(!w) w=self
  if(isMSIE) return w.document.body.clientWidth
  if(isNC || isOpera) return w.innerWidth
}

function getMyWindowHeight(w){
  if(!w) w=self
  if(isMSIE) return w.document.body.clientHeight
  if(isNC || isOpera) return w.innerHeight
}

function erase_record(table,id){
window.open('erase.php?table='+table+'&id='+id,'message_window','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no,width=300,height=100,top='+(top.getMyWindowHeight()/2-50)+',left=='+(top.getMyWindowWidth()/2-150)+',screenX=,screenY=');
}

function up_record(table,id,idup,currorder,up_currorder){
  window.open('move.php?table='+table+'&id='+id+'&idup='+idup+'&currorder='+currorder+'&up_currorder='+up_currorder,'message_window','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no,width=300,height=100,top='+(top.getMyWindowHeight()/2-50)+',left=='+(top.getMyWindowWidth()/2-150)+',screenX=,screenY=');
}

function down_record(table,id, iddown, currorder, down_currorder){
  window.open('move.php?table='+table+'&id='+id+'&iddown='+iddown+'&currorder='+currorder+'&down_currorder='+down_currorder,'message_window','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no,width=300,height=100,top='+(top.getMyWindowHeight()/2-50)+',left=='+(top.getMyWindowWidth()/2-150)+',screenX=,screenY=');
}

function update_record(table,id){
  window.open('','message_window','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no,width=300,height=100,top='+(top.getMyWindowHeight()/2-50)+',left=='+(top.getMyWindowWidth()/2-150)+',screenX=,screenY=');
}

function reload_combobox(table,field,where){
  form=document.forms['form_record_add_update'];
window.open('combobox.php?update_table='+table+'&update_field='+field+'&update_where='+where,'inner_select_'+field);
}

function refuse_record(table,id){
window.open('orders.php?act=refuse&table='+table+'&id='+id,'message_window','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no,width=300,height=100,top='+(top.getMyWindowHeight()/2-50)+',left=='+(top.getMyWindowWidth()/2-150)+',screenX=,screenY=');
}
function confirm_record(table,id){
window.open('orders.php?act=confirm&table='+table+'&id='+id,'message_window','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no,width=300,height=100,top='+(top.getMyWindowHeight()/2-50)+',left=='+(top.getMyWindowWidth()/2-150)+',screenX=,screenY=');
}
function buy_record(table,id){
window.open('orders.php?act=buy&table='+table+'&id='+id,'message_window','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no,width=300,height=100,top='+(top.getMyWindowHeight()/2-50)+',left=='+(top.getMyWindowWidth()/2-150)+',screenX=,screenY=');
}
function otk_record(table,id){
window.open('orders.php?act=otk&table='+table+'&id='+id,'message_window','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no,width=300,height=100,top='+(top.getMyWindowHeight()/2-50)+',left=='+(top.getMyWindowWidth()/2-150)+',screenX=,screenY=');
}
