OJ.prototype.ajaxBlock = function()
{
  function a(o)
  {
    var LOCATION = window.location.protocol + "//" + window.location.host;
    var da = o.getElementsByTagName('a');
    var ID = (o.getAttribute("forID"))?o.getAttribute("forID"):o.id;
    for(var j = 0; j < da.length; j++)
    	if(da[j].href != window.location && da[j].href != window.location + "#" && da[j].href != LOCATION && da[j].href != LOCATION + "/" && da[j].href != LOCATION + "/#" && da[j].href.indexOf(":") == 4)
    	{
        da[j].setAttribute("idSpan", ID);
        da[j].onclick = function()
        {
        	var ID = this.getAttribute("idSpan");
        	$(ID).post(this.getAttribute("href"),{AjaxLinksID:ID});
         	return false;
        }
      }
    var df = o.getElementsByTagName('form');
    for(var j = 0; j < df.length; j++)
    {
    	df[j].setAttribute("idSpan", ID);
     	df[j].onsubmit = function()
     	{
     		var ID = this.getAttribute("idSpan");
     		arr = $(this).formArray();
     		arr['AjaxLinksID'] = ID;
     		if(this.getAttribute("method") && this.getAttribute("method").toLowerCase() == "post")	$(ID).post(this.action, arr);
     		  else $(ID).get(this.action, arr);
     		return false;
     	}
    }
  }
  if(this.o)a(this.o);
  else
  { 
    var d = document.body.getElementsByTagName('span');
    for(var i = 0; i< d.length; i++) if(d[i].getAttribute("ajax")!=null)a(d[i]);
  }
}
