function fError(obj){ 
obj.src="http://shopping-life.jp/image/gif/OnError.gif";
}

function backToTop() {
  var x1 = x2 = x3 = 0;
  var y1 = y2 = y3 = 0;
  if (document.documentElement) {
      x1 = document.documentElement.scrollLeft || 0;
      y1 = document.documentElement.scrollTop || 0;
  }
  if (document.body) {
      x2 = document.body.scrollLeft || 0;
      y2 = document.body.scrollTop || 0;
  }
  x3 = window.scrollX || 0;
  y3 = window.scrollY || 0;
  var x = Math.max(x1, Math.max(x2, x3));
  var y = Math.max(y1, Math.max(y2, y3));
  window.scrollTo(Math.floor(x / 2), Math.floor(y / 2));
  if (x > 0 || y > 0) {
      window.setTimeout("backToTop()", 25);
  }
}

msg1="\n\n\nBonjour! dames et monsieur\n\n通販三昧では、楽天市場やYahoo!ショッピング\nYahoo!オークション・ビッダーズ・大手通販ショップ等から\nまとめて商品検索やお買物が出来るよ。\n\n安くて沢山良い物あるから検索してね！\n\n\nv(。^＿^。)v";
msg =msg1.split("\n");
function scrollText(){
msgTmp=msg;
for(i=0;i<msg.length-1;i++){
msg[i]=msgTmp[i+1];
}
msg[msg.length-1]=msgTmp[0];
document.message.message_area.value=msg.join("\n");
setTimeout("scrollText()",1500);
}


function imgResize(Img){
var maxH = 125;//制限したい最大高
var maxW = 125;//制限したい最大幅
if(Img.height > maxH || Img.width > maxW) {
var HH = maxH / Img.height;
var WW = maxW / Img.width;
if(WW < HH) Img.width = Img.width * WW;
else Img.height = Img.height * HH;
}
}


function imgResize2(Img){
var maxH = 110;//制限したい最大高
var maxW = 110;//制限したい最大幅
if(Img.height > maxH || Img.width > maxW) {
var HH = maxH / Img.height;
var WW = maxW / Img.width;
if(WW < HH) Img.width = Img.width * WW;
else Img.height = Img.height * HH;
}
}


function rep(){
moto = document.FORMname.keyword.value;
document.FORMname.keyword.value = moto.replace("　"," ");
}