function check(obj_form, ch) {
  for(i = 0; i < obj_form.length; i++) {
    if(obj_form[i].type == 'checkbox') {
      obj_form[i].checked = ch;
    }
  }
  
  return false;
}

function resize_image() {
  var img = document.getElementById('main_image');

  if(img.width > img.parentNode.offsetWidth) {
    img.height = (img.height*img.parentNode.offsetWidth)/img.width;
    img.width = img.parentNode.offsetWidth;
  }
}

function select_text(obj) {
  obj.focus();
  obj.select();
}
