  function showing (id)
   { 

    if (document.getElementById(id).style.display=='block')
      document.getElementById(id).style.display='none';
    else document.getElementById(id).style.display='block';
   }


nn4 = (document.layers) ? true : false;
ie4 = (document.all) ? true : false;
dom = (document.createTextNode)? true : false;

function pop (fileUrl, winW, winH, winN, scrollB)
 {
  var winWidth = (winW)? winW : 740;
  var winHeight = (winH)? winH : 520;
  var winName = (winN)? winN : 'popupWin';
  var scrollBars = "yes";
  if (nn4 || ie4 || dom)
   {
    if (screen.width < winWidth + 50) { winWidth = screen.width - 50; scrollbars = 'yes' }
    if (screen.height < winHeight + 100) { winHeight = screen.height - 100; scrollbars = 'yes' }
    posX = Math.round((screen.width - winWidth) / 2);
    posY = Math.round((screen.height - winHeight) / 2);
    posCode = (nn4)? "screenX="+posX+",screenY="+posY : "left="+posX+",top="+posY;
   }
  else
   {
    posCode = "";
   }
  var popupWin = window.open(fileUrl, winName,"menubar=no,toolbar=no,scrollbars=" + scrollBars + ",status=yes,resizable=yes,width=" + winWidth + ",height=" + winHeight + "," + posCode);
  if (popupWin) popupWin.focus();
 }


function show_image(img, a_root)
 {
  var popupWin5 = window.open(a_root+"/img_show.php?img="+img, "Image" ,"menubar=no,toolbar=no,scrollbars=yes,status=no,resizable=yes,width=500,height=500");
  if (popupWin5) popupWin5.focus();
 }




function sel_brand (obj_type, arr)                                                                                                                                               
 {
  conf = document.getElementById(obj_type + '_brand_all').checked;
                                            
//alert (conf);                                                                                                                     
  for (key in arr)                                                                                                                                                
   {
    document.getElementById(obj_type + '_brand_' + key).checked = conf;                                                                                                                 
    document.getElementById(obj_type + '_brand_' + key).disabled = conf;
   }                                                                                                                                                                  
 }

