function togglePanel() {
  var panel = document.getElementById('panelMore');
  var panelControl = document.getElementById('morePanel');
  var panelBtn = panelControl.getElementsByTagName('a')[0];
  panelBtn.blur();

  if (panel.style.display == '' || panel.style.display == 'none') {
          panel.style.display = 'block';
          panelBtn.style.backgroundImage = 'url(/images/arrow_up_gray.gif)';
          panelBtn.firstChild.data = 'Òþ²Ø';
  } else {
          panel.style.display = 'none';
          panelBtn.style.backgroundImage = 'url(/images/arrow_down_gray.gif)';
          panelBtn.firstChild.data = '¸ü¶à';
  }
}
function initPanel() {
  document.getElementById('morePanel').getElementsByTagName('a')[0].onclick = togglePanel;
}

function dropMenu(btn, menu) {
  btn.parentNode.getElementsByTagName('span')[0].style.backgroundPosition = 'right top';
  btn.parentNode.getElementsByTagName('ul')[0].style.display = 'block';
}
function hideMenu(btn, menu) {
  btn.parentNode.getElementsByTagName('span')[0].style.backgroundPosition = 'left top';
  btn.parentNode.getElementsByTagName('ul')[0].style.display = 'none';
}

function showMenu(obj){
  if(obj.style.display!="block"){
    obj.style.display="block";
  }
}

function hiddenMenu(obj){
  if(obj.style.display!="none"){
    obj.style.display="none";
  }
}

function limitImageW(param_objImg,param_355_width) {
  if(param_objImg.width) {
    if(param_objImg.width>param_355_width) {
      param_objImg.width = param_355_width
    }
  }
}

function limitImageH(param_objImg,param_355_height) {
  if(param_objImg.height) {
    if(param_objImg.height>param_355_height) {
      param_objImg.height = param_355_height
    }
  }
}

function limitImage(param_objImg,param_355_length) {
  if(param_objImg.width&&param_objImg.height) {
    if(param_objImg.width>=param_objImg.height) {
      limitImageW(param_objImg,param_355_length);
    } else {
      limitImageH(param_objImg,param_355_length);
    }
  }
}

function limitImageWH(param_objImg,param_355_width,param_355_height) {
  limitImageW(param_objImg,param_355_width);
  limitImageH(param_objImg,param_355_height);
}

