/* JSライブラリ*/
var _id = '';
var _offsetx = 0;
var _offsety = 0;
var _timerhandle = 0;

function set_contents1(arg1, arg2)
{
	inframe = document.getElementById("imageArea");
	inframe.innerHTML = 
		  "<table border=0 width=100% height=500 CELLPADDING=0 CELLSPACING=0>"
		+ "<tr>"
		+ "<td align=center>"
		+ "<img src='./images/loading.gif'><br><span class=text04>Loading...</span><br>"
		+ "</td>"
		+ "</tr>"
		+ "</table>";

	var param =  'mode=' + arg1;

	var a =  new Ajax.Request('pageimg.php', {method:'get', parameters: param, 
		onSuccess: function(ret){

			inframe.innerHTML = ret.responseText;


		}
	});

/*
    var params =  'mode=' + arg1;

    $.get('pageimg.php', params, function(message, status) { 
  
//	alert(message);

        if ('error' != status) {
//        	alert(message);
            $('#imageArea').html(message); 

        }

	//scroll
	if (arg2!='' && arg2!='undefined'){
		var targetOffset = $('#' + arg2).offset().top;
		$('html,body').animate({scrollTop: targetOffset}, 1000);
		return false; 
	}

    }); 
*/
}


/*
function setoffset() {
  var x1 = 0;
  var x2 = 0;
  var x3 = 0;
  var y1 = 0;
  var y2 = 0;
  var 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;

	x3 = _offsetx;
	y3 = _offsety;


  var x = Math.max(x1, Math.max(x2, x3));
  var y = Math.max(y1, Math.max(y2, y3));

  $('#x1').html('X1:' + x1);
  $('#y1').html('Y1:' + y1);
  $('#x2').html('X2:' + x2);
  $('#y2').html('Y2:' + y2);
  $('#x').html(  'X:' + x);
  $('#y').html(  'Y:' + y);

  window.scrollTo(Math.floor(x), Math.floor(y));

  if (x < _offsetx || y < _offsety) {
      window.setTimeout("setoffset()", 25);
  }
}


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);
  }

}
*/


