function resize(size) {

  var other;
    
  switch (size) {
    case "compare":
      if ((other = getFrame("head")))    
        other.location.replace("top.php?cart_size=small&nocache=" + randStr() + '&' + php_sessionid);
      location.replace("compare_list.php?cart_size=small&nocache=" + randStr() + '&' + php_sessionid);
      break;      
    case "small":
      if ((other = getFrame("head")))    
        other.location.replace("top.php?cart_size=small&nocache=" + randStr() + '&' + php_sessionid);
      location.replace("content.php?cart_size=small&nocache=" + randStr() + '&' + php_sessionid);
      break;
      
    case "medium":
      if ((other = getFrame("content")))
        other.location.replace("content.php?cart_size=medium&nocache=" + randStr() + '&' + php_sessionid);
      if ((other = getFrame("head")))
        other.location.replace("top.php?cart_size=medium&nocache=" + randStr() + '&' + php_sessionid);
      break;
      
    case "large":
      location.replace("cart.php?cart_size=large&nocache=" + randStr() + '&' + php_sessionid);
      break;     
  }
  
  return false;
}

function notes_resize(size) {

  var other;
    
  switch (size) {
    case "compare":
      if (other = getFrame("head")) {    
        other.location.replace("top.php?notes_size=small&nocache=" + randStr() + '&' + php_sessionid);
      }
      location.replace("compare_list.php?notes_size=small&nocache=" + randStr() + '&' + php_sessionid);
      break;
      
    case "small":
      if (other = getFrame("head")) {    
        other.location.replace("top.php?notes_size=small&nocache=" + randStr() + '&' + php_sessionid);
      }
      location.replace("content.php?notes_size=small&nocache=" + randStr() + '&' + php_sessionid);
      break;
      
    case "medium":
      if (other = getFrame("content"))
        other.location.replace("content.php?notes_size=medium&nocache=" + randStr() + '&' + php_sessionid);
      if (other = getFrame("head"))
        other.location.replace("top.php?notes_size=medium&nocache=" + randStr() + '&' + php_sessionid);
      break;
      
  }
  
  return false;
}

function getFrame(name) {
  for (var i = 0; i < parent.frames.length; i++) {
    if (parent.frames[i].name == name)
      return parent.frames[i];
  }

  return null;
}

function randStr() {

  var ret = "";
  for (var i = 0; i < 10; i++)
    ret += i + "";
  
  return ret;
}