




































































































function show_hide(id, id2, show, inline) { ctrl = document.getElementById(id); ctrl2 = document.getElementById(id2);   if (show == true) { ctrl.style.display =""; ctrl2.style.display = 'none'; } else { ctrl.style.display = 'none'; ctrl2.style.display = 'inline';}}    function all_show_hide_menu()      {     is_hidden = document.getElementById('menu_table').style.display=='none'; show_hide('menu_table', 'return_button', is_hidden);      var disables = '1';     var req = new JsHttpRequest();     req.open('POST', 'F_Disable.php', true);     req.send({ d: disables});     }    function all_show_hide_surf()       {       is_hidden = document.getElementById('menu_table').style.display=='none';  show_hide('menu_table', 'return_button', is_hidden);        }      function sell_input1($id)      {    /* $id='0'; */       JsHttpRequest.query    (        'F_Selector_1.php',          {           Idgame: $id         },            function(result)       {          var objct = document.getElementById("servid");        objct.options.length = 0;           for (i=0; i<result[0].length; i++)           {               objct.options[objct.options.length] = new Option(result[0][i], i);             }         if  (objct.options.length > 0)  objct.options[0].selected = true;       objct = document.getElementById("sideid");        objct.options.length = 0;           for (i=0; i<result[1].length; i++)           {               objct.options[objct.options.length] = new Option(result[1][i], i);           }                objct = document.getElementById("goodsid");        objct.options.length = 0;           for (i=0; i<result[2].length; i++)           {               objct.options[objct.options.length] = new Option(result[2][i], i);           }                     },          true        );     setTimeout( function(){input3(0);}, 2 );     setTimeout( function(){input2(0);}, 2 );      }    function sell_input2($id)      {          JsHttpRequest.query    (        'F_Selector_2.php',          {           Idlots: $id         },            function(result)       {          var objct = document.getElementById("lotsid");        objct.options.length = 0;        if (result){          for (i=0; i<result[3].length; i++)           {               objct.options[objct.options.length] = new Option(result[3][i], i);             } }          var objct = document.getElementById("lotsidII");        objct.options.length = 0;        if (result){          for (i=0; i<result[3].length; i++)           {               objct.options[objct.options.length] = new Option(result[3][i], i);             } }             var objct = document.getElementById("lotsidIII");        objct.options.length = 0;        if (result){          for (i=0; i<result[3].length; i++)           {               objct.options[objct.options.length] = new Option(result[3][i], i);             } }                },          true        );      }      function sell_input3($id)      {         JsHttpRequest.query    (        'F_Selector_3.php',          {           Idgoods: $id         },            function(result)       {           if (result == 'y')      {        document.getElementById('sell-9').style.display='';     document.getElementById('sell-11').style.display='none';              sell_lotsedit (3);      }     else      {     document.getElementById('sell-11').style.display='';     document.getElementById('sell-9').style.display='none';     document.getElementById('sell-L-2-1').style.display='none'; document.getElementById('sell-L-2-2').style.display='none';     document.getElementById('sell-L-2-3').style.display='none'; document.getElementById('sell-L-2-4').style.display='none';     document.getElementById('sell-L-3-1').style.display='none'; document.getElementById('sell-L-3-2').style.display='none';     document.getElementById('sell-L-3-3').style.display='none'; document.getElementById('sell-L-3-4').style.display='none';         }            },          true        );      }      function sell_lotsedit(type)    {      if (type== 1)   {        if(document.getElementById('collots').value==0 )          {            document.getElementById('collots').value=1;            document.getElementById('sell-L-2-1').style.display=''; document.getElementById('sell-L-2-2').style.display='';         document.getElementById('sell-L-2-3').style.display=''; document.getElementById('sell-L-2-4').style.display='';          }       else  if(document.getElementById('collots').value==1 )       {         document.getElementById('collots').value=2;         document.getElementById('sell-L-3-1').style.display=''; document.getElementById('sell-L-3-2').style.display='';      document.getElementById('sell-L-3-3').style.display=''; document.getElementById('sell-L-3-4').style.display='';     }   else(confirm("количество лотов может быть не больше трех"))     }      if (type== 2)   {        if(document.getElementById('collots').value==1 )          {            document.getElementById('collots').value=0;            document.getElementById('sell-L-2-1').style.display='none';  document.getElementById('sell-L-2-2').style.display='none';         document.getElementById('sell-L-2-3').style.display='none';  document.getElementById('sell-L-2-4').style.display='none';          }       else  if(document.getElementById('collots').value==2 )       {         document.getElementById('collots').value=1;         document.getElementById('sell-L-3-1').style.display='none'; document.getElementById('sell-L-3-2').style.display='none';      document.getElementById('sell-L-3-3').style.display='none'; document.getElementById('sell-L-3-4').style.display='none';    }     }        if (type==3)     {       if(document.getElementById('collots').value==1 )        {         document.getElementById('sell-L-2-1').style.display=''; document.getElementById('sell-L-2-2').style.display='';      document.getElementById('sell-L-2-3').style.display=''; document.getElementById('sell-L-2-4').style.display='';         }      else  if(document.getElementById('collots').value==2 )      {         document.getElementById('sell-L-2-1').style.display='';document.getElementById('sell-L-2-2').style.display='';      document.getElementById('sell-L-2-3').style.display='';document.getElementById('sell-L-2-4').style.display='';           document.getElementById('sell-L-3-1').style.display=''; document.getElementById('sell-L-3-2').style.display='';     document.getElementById('sell-L-3-3').style.display=''; document.getElementById('sell-L-3-4').style.display='';       }       }   }     function sell_input4(e)  {       /* Make sure to use event.charCode if available */    var key = (typeof e.charCode == 'undefined' ? e.keyCode : e.charCode);      /* Ignore special key */    if (e.ctrlKey || e.altKey || key < 32)     {         return true;     }     key = String.fromCharCode(key);       /* if ((keynum < 48) || (keynum > 57)) */    return /[\d\.]/.test(key);  }    function sell_comission ($value)  {     var objct = document.getElementById($value);        if (objct.value  != "")     {         if (isNaN(parseFloat(objct.value)))     {      document.getElementById($value+2).value=""       }    else       {      f = parseFloat(objct.value);         prise=eval(f);              /*комиссия*/     var objct2 = document.getElementById("goodsid");      if (objct2.options[objct2.selectedIndex].text=="wow gold")        {          $com = 21;       money=prise+(prise/100*$com);      }     else         {      $com = 10;      if ( $value !='wmz'){ if ((prise/100*$com) < 150) $comis=150; else $comis=(prise/100*$com); }         else { if ((prise/100*$com) < 5) $comis=5; else $comis=(prise/100*$com); }      money=prise+$comis;        }                            /*document.getElementById($value).value=prise.toFixed(2);*/             document.getElementById($value+2).value=money.toFixed(2);      }          }     else      document.getElementById($value+2).value="";  }      function delete_position(url, ask)  {   if(confirm(ask))    {      location.href=url;    }   return false;  }      function price_show_detail(winname, url)    {      var width=390;   var height=470;    var a;      var b;      var url;      vidWindowWidth=width;      vidWindowHeight=height;      a=(screen.height-vidWindowHeight)/5;      b=(screen.width-vidWindowWidth)/2;      features = "top=" + a + ",left=" + b +                  ",width=" + vidWindowWidth +                  ",height=" + vidWindowHeight +                  ",toolbar=no,menubar=no,location=no," +                  "directories=no,scrollbars=yes,resizable=no";              winhandle=window.open(url, winname, features);   winhandle.focus();   return false;    }      function price_input($id)      {    /* $id='0'; */       JsHttpRequest.query    (        'F_Filter.php',          {           IdgameSS: $id         },            function(result)       {          var objct = document.getElementById("servid");        objct.options.length = 0;           for (i=0; i<result[0].length; i++)           {               objct.options[objct.options.length] = new Option(result[0][i], i);             }                      if  (objct.options.length > 0)  objct.options[0].selected = true;              objct = document.getElementById("sideid");        objct.options.length = 0;           for (i=0; i<result[1].length; i++)           {               objct.options[objct.options.length] = new Option(result[1][i], i);           }                       objct = document.getElementById("goodsid");        objct.options.length = 0;           for (i=0; i<result[2].length; i++)           {               objct.options[objct.options.length] = new Option(result[2][i], i);           }                     },          true        );      }     function clean(A, obj)   {    var objct=document.getElementById(obj);    if(objct){A.onblur=function()    {if(!A.value){objct.style.top=""}};objct.style.top="-9999px"}   }   