
var AjaxLoad = Class.create();
  AjaxLoad.prototype = {
    initialize: function(source,url) {	 
         this.source = source;
         this.url = url;
		 this.processAjax();
	},
   loading:function(){
       Element.show(this.source+'_indicator');
	},
	complete:function(){
	    Element.hide(this.source+'_indicator');
	},
	failure:function(){
	    //window.location.href = this.url;
	},
	processAjax:function(){
       var obj = this; 
       var aj = new Ajax.Updater( this.source, this.url, {
       asynchronous: true,
       method: 'post',
       evalScripts: true,
       onUninitialized:this.failure,
       onLoading:this.loading(),
       onFailure:this.failure,
       onComplete:this.complete()
    });
	}
  }

  var innerHtmls = Class.create();
       innerHtmls.prototype = {
          initialize:function(source,url){
			   this.url = url;
			   this.source = source.split(",");
               this.processAjax();
		   },
        processAjax:function(){
			  var obj = this;
			  new Ajax.Request(this.url, {
              asynchronous:true,
              method:'post',
              evalScripts:true,
              onSuccess:function(request){
				  var  text = request.responseText;	
	              if(null != text || ""!= text){
		          var array = text.split(",");			
		          for(var i=0;i<array.length;i++){		      
			         Element.update(obj.source[i],array[i]);
			       }
		       }	  
		   }
	   });
	} 
 }


function showMessageInfo(d,strId,e,text){
	var scrollT;
	if(typeof(document.pageYOffset)!="undefined"){
		scrollT = document.pageYOffset;
	}else if(typeof(document.documentElement)!="undefined" && typeof(document.documentElement.scrollTop)!="undefined"){
		scrollT = document.documentElement.scrollTop;
	}else if(typeof(document.documentElement)!="undefined"){
		scrollT = document.body.scrollTop;
	}
    var pos = Position.positionedOffset(strId);
	$("messageLayer").style.top=e.clientY+10+scrollT;
	$("messageLayer").style.left=e.clientX-260;
	new Ajax.Updater("context","./tradeCalendarFrontAction!getTip.action?date="+d+"&id="+text,{
		method:'get'
	});
	//$("context").innerHTML=text;
	Element.show("messageLayer");	

}



 function closeMessageInfo(){
	  Element.hide("messageLayer");
 }

 //setInterval("ajaxload", 30 * 1000);